:root {
  --colorAppBackground: #121212;
  --colorPrimary900: #e3f140;
  --colorPrimary600: #e3f140;
  --borderRadiusContainer: 8px;
  --borderRadiusButton: 6px;
  --borderRadiusControl: 6px;
}

/* 1. ДЕСКТОП: ОЧИЩЕНІ СТИЛІ ФІЛЬТРІВ ТА ЛЕЙБЛІВ */
.ashby-job-board-filters-label {
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: #cccccc !important;
  padding: 0 !important;
}

.ashby-job-board-filter {
  background-color: #1e1e1e !important;
  background: #1e1e1e !important;
  color: #ffffff !important;
  border: 1px solid #333333 !important;
  border-radius: 6px !important;
}

.ashby-job-board-filter * {
  color: #ffffff !important;
}

.ashby-job-board-filter svg,
.ashby-job-board-filter path {
  fill: #ffffff !important;
  stroke: #ffffff !important;
}

/* 2. ЗВИЧАЙНІ ТЕКСТОВІ ПОСИЛАННЯ В ОПИСІ */
.ashby-job-posting-description-container a {
  background-color: transparent !important;
  color: #e3f140 !important;
  text-decoration: underline !important;
  display: inline !important;
  padding: 0 !important;
  width: auto !important;
}

/* Кнопка "Apply for this Job" — це <button> усередині <a>, а не звичайне
   текстове посилання, тому лишаємо його поза загальним правилом вище й
   стилізуємо окремо: чорний текст за замовчуванням, білий при
   наведенні/тапі (для тапу на мобільному — реальний :active, не тільки :hover) */
/* Батьківський <a>, що обгортає кнопку "Apply for this Job" — знімаємо з
   нього підкреслення й колір, які успадковувались від загального правила
   для текстових посилань вище (секція 2), бо тут це не текстове посилання */
.ashby-job-posting-description-container a:has(button) {
  text-decoration: none !important;
  color: inherit !important;
}

.ashby-job-posting-description-container a button {
  background-color: #e3f140 !important;
  color: #000000 !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease-in-out !important;
}

.ashby-job-posting-description-container a:hover button,
.ashby-job-posting-description-container a:active button,
.ashby-job-posting-description-container a button:active {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* 3. КНОПКИ SUBMIT ТА UPLOAD */
.ashby-application-form-submit-button,
.ashby-application-form-autofill-uploader button,
.ashby-application-form-input-file-dropzone-upload,
.ashby-application-form-autofill-pane button,
button[type="submit"] {
  background-color: #e3f140 !important;
  color: #000000 !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 6px !important;
  transition: all 0.2s ease-in-out !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.ashby-application-form-submit-button *,
.ashby-application-form-autofill-uploader button *,
.ashby-application-form-input-file-dropzone-upload *,
.ashby-application-form-autofill-pane button *,
button[type="submit"] * {
  color: #000000 !important;
  fill: #000000 !important;
}

/* HOVER (десктоп) + ACTIVE (тап на мобільному) — ТА САМА ЗАЛИВКА БІЛИМ, ЧОРНИЙ ТЕКСТ */
.ashby-application-form-submit-button:hover,
.ashby-application-form-submit-button:active,
.ashby-application-form-autofill-uploader button:hover,
.ashby-application-form-autofill-uploader button:active,
.ashby-application-form-input-file-dropzone-upload:hover,
.ashby-application-form-input-file-dropzone-upload:active,
.ashby-application-form-autofill-pane button:hover,
.ashby-application-form-autofill-pane button:active,
button[type="submit"]:hover,
button[type="submit"]:active {
  background-color: #ffffff !important;
  background: #ffffff !important;
  color: #000000 !important;
  cursor: pointer !important;
}

.ashby-application-form-submit-button:hover *,
.ashby-application-form-submit-button:active *,
.ashby-application-form-autofill-uploader button:hover *,
.ashby-application-form-autofill-uploader button:active *,
.ashby-application-form-input-file-dropzone-upload:hover *,
.ashby-application-form-input-file-dropzone-upload:active *,
.ashby-application-form-autofill-pane button:hover *,
.ashby-application-form-autofill-pane button:active *,
button[type="submit"]:hover *,
button[type="submit"]:active * {
  color: #000000 !important;
  fill: #000000 !important;
}

/* 4. ЗАГОЛОВКИ ВІДДІЛІВ */
.ashby-department-heading,
.ashby-department-heading-level,
.ashby-job-posting-brief-department-heading,
.ashby-job-posting-brief-department-heading-level {
  color: #ffffff !important;
  font-weight: 700 !important;
  opacity: 1 !important;
}

/* 5. ВАКАНСІЇ ТА ФОРМИ ВВОДУ */
input:focus, textarea:focus, select:focus, button:focus {
  outline: none !important;
  box-shadow: 0 0 0 2px #e3f140 !important;
  border-color: #e3f140 !important;
}

.ashby-job-posting-brief {
  background-color: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  padding: 16px !important;
  transition: background-color 0.2s ease-in-out !important;
}

.ashby-job-posting-brief:hover {
  background-color: #1e1e1e !important;
  border-color: #2e2e2e !important;
}

.ashby-application-form-autofill-pane,
.ashby-application-form-autofill-input-root,
.ashby-application-form-autofill-input-base-layer {
  background-color: #1e1e1e !important;
  border: 1px solid #333333 !important;
  color: #ffffff !important;
}

.ashby-job-posting-brief-list,
.ashby-job-posting-description-container,
.ashby-application-form-container,
.ashby-job-posting-left-pane,
.ashby-job-posting-right-pane {
  background-color: transparent !important;
  border: none !important;
}

.ashby-job-posting-heading, .ashby-application-form-question-title, h1, h2, h3, h4, strong { color: #ffffff !important; }
.ashby-job-posting-brief-details, p, span, div, li { color: #cccccc !important; }
.ashby-job-posting-brief-title { color: #e3f140 !important; }

.ashby-application-form-input-text,
.ashby-application-form-input-textarea,
.ashby-application-form-input-dropdown,
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], textarea {
  color: #ffffff !important;
  background-color: #1e1e1e !important;
  border: 1px solid #333333 !important;
}

/* 6. ІЗОЛЬОВАНІ МОБІЛЬНІ СТИЛІ (ФІКС БІЛОЇ КНОПКИ ПОШУКУ/ФІЛЬТРА) */
@media (max-width: 768px) {
  /* Пошукова кнопка "Filter Open Positions..." */
  .ashby-job-board-filters-label + button,
  .ashby-job-board-filters-label ~ button,
  input[type="search"],
  button[type="button"] {
    background-color: #1e1e1e !important;
    background: #1e1e1e !important;
    border: 1px solid #333333 !important;
    border-radius: 6px !important;
    color: #ffffff !important;
  }

  .ashby-job-board-filters-label + button *,
  .ashby-job-board-filters-label ~ button *,
  button[type="button"] * {
    color: #e3f140 !important;
  }

  .ashby-job-board-filter {
    background-color: #1e1e1e !important;
    border: 1px solid #333333 !important;
    border-radius: 6px !important;
    color: #ffffff !important;
  }

  [role="tablist"] {
    background-color: #1e1e1e !important;
    border-bottom: 1px solid #333333 !important;
  }

  [role="tab"] {
    background-color: transparent !important;
    color: #ffffff !important;
  }

  [role="tab"][aria-selected="true"] {
    color: #e3f140 !important;
    border-bottom: 2px solid #e3f140 !important;
  }
}

/* 7. МОБІЛЬНА ФІЛЬТР-МОДАЛКА (внутрішні хешовані класи Ashby, напр.
   _filtersContainer_1dvh9_135, _filtersWindow_1dvh9_185, _filtersOpen_1dvh9_152 —
   НЕ входять в офіційний перелік ashby-* класів, тому таргетимо частковим
   збігом [class*="..."], без прив'язки до хеша. Ширший брейкпоінт (900px)
   як запас на випадок, якщо власний брейкпоінт Ashby не збігається з 768px. */
@media (max-width: 900px) {
  [class*="filtersContainer"] {
    background-color: #121212 !important;
  }

  [class*="filtersWindow"] {
    background-color: #121212 !important;
    border: 1px solid #121212 !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    color: #ffffff !important;
  }

  [class*="filtersWindow"] * {
    color: #ffffff !important;
  }

  /* Grid-контейнер, що тримає 4 dropdown-и (Department, Employment Type,
     Location, Location Type) — унікальний за підрядком "filters_" серед
     усіх хешованих класів модалки. За замовчуванням поля йдуть впритул
     одне до одного (спільна рамка, як суцільний список) — додаємо реальний
     проміжок, щоб кожне поле виглядало окремою заокругленою карткою. */
  [class*="filters_"] {
    gap: 10px !important;
  }

  [class*="filtersHeader"] {
    background-color: #121212 !important;
    color: #ffffff !important;
    padding-bottom: 10px !important;
    margin-bottom: 6px !important;
    border-bottom: 1px solid #121212 !important;
  }

  [class*="filtersHeader"] * {
    color: #ffffff !important;
    fill: #ffffff !important;
  }

  /* Заголовок "Filters:" — офіційний клас ashby-job-board-filters-label
     вже стилізується вище (секція 1), тут лише трохи жирніше в темній модалці */
  [class*="filtersHeader"] .ashby-job-board-filters-label {
    font-weight: 600 !important;
    color: #ffffff !important;
  }

  /* Кнопка закриття/скидання фільтрів — офіційний, задокументований клас
     Ashby (ashby-job-board-reset-filters-label), підтверджений у живому DOM.
     Надійніше за хешовані _filtersAction_/_filtersDismissIcon_, тож
     таргетимо саме його напряму, без [class*=...]. */
  .ashby-job-board-reset-filters-label {
    background-color: transparent !important;
    border: none !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease-in-out !important;
  }

  .ashby-job-board-reset-filters-label:active {
    background-color: #333333 !important;
  }

  .ashby-job-board-reset-filters-label:active svg,
  .ashby-job-board-reset-filters-label:active path {
    fill: #e3f140 !important;
    stroke: #e3f140 !important;
  }

  .ashby-job-board-reset-filters-label svg,
  .ashby-job-board-reset-filters-label path {
    fill: #cccccc !important;
    stroke: #cccccc !important;
    transition: fill 0.15s ease-in-out, stroke 0.15s ease-in-out !important;
  }

  /* :hover лишаємо тільки для пристроїв із курсором (миша/трекпад) —
     на дотикових екранах :hover не спрацьовує надійно, тому дублюємо
     той самий ефект через :active вище — саме він і буде видимим на телефоні */
  @media (hover: hover) and (pointer: fine) {
    .ashby-job-board-reset-filters-label:hover {
      background-color: #2a2a2a !important;
    }

    .ashby-job-board-reset-filters-label:hover svg,
    .ashby-job-board-reset-filters-label:hover path {
      fill: #e3f140 !important;
      stroke: #e3f140 !important;
    }

    [class*="filtersWindow"] .ashby-job-board-filter:hover {
      border-color: #e3f140 !important;
    }
  }

  /* Реакція на дотик для самих полів фільтрів (Department, Location тощо) */
  [class*="filtersWindow"] .ashby-job-board-filter:active {
    border-color: #e3f140 !important;
  }

  [class*="filtersOpen"] {
    background-color: #1e1e1e !important;
    background: #1e1e1e !important;
    border: 1px solid #333333 !important;
    border-radius: 6px !important;
    color: #ffffff !important;
  }

  /* Коли панель фільтрів відкрита, ця кнопка-тригер отримує атрибут
     disabled. За замовчуванням Ashby, судячи з усього, ховає її в
     цьому стані "непомітним" способом (колір = фон / нульовий opacity),
     а наш примусовий колір/фон вище зламав цей трюк, показавши
     кнопку-привида поверх відкритої панелі. Ховаємо її явно. */
  [class*="filtersOpen"]:disabled {
    display: none !important;
  }

  [class*="visuallyHidden"] {
    color: #cccccc !important;
  }
}

/* ПРИХОВАТИ БЛОК AUTOFILL FROM RESUME */
.ashby-application-form-autofill-pane,
.ashby-application-form-autofill-input-root,
[class*="autofill-pane"] {
  display: none !important;
}
