/* K1 — Black job board */
:root {
  --colorAppBackground: #161616;
  --colorPrimary900: #FFFFFF;
  --colorPrimary600: #FFFFFF;
  --k1-surface: #2E2E2E;
  --k1-hover: #565656;
  --k1-text: #FFFFFF;
  --k1-muted: #FFFFFF;
  --k1-border: #727272;
  --k1-link: #FFFFFF;
  --k1-job-border: rgba(255, 255, 255, 0.5); /* White at 50% */
  --k1-job-title-hover: #FFFFFF;
  color-scheme: dark;
}

/* Page background */
html,
body {
  background-color: var(--colorAppBackground) !important;
  color: var(--k1-text) !important;
}

/* Job listings and page panels */
.ashby-job-posting-brief,
.ashby-job-posting-header,
.ashby-job-posting-left-pane,
.ashby-job-posting-right-pane,
.ashby-job-posting-description-container,
.ashby-application-form-container,
.ashby-survey-form-container {
  background-color: var(--colorAppBackground) !important;
  color: var(--k1-text) !important;
  border-color: var(--k1-border) !important;
}

/* Headings and job titles */
.ashby-job-board-heading,
.ashby-department-heading,
.ashby-department-heading-level,
.ashby-job-posting-heading,
.ashby-job-posting-brief-title,
.ashby-job-posting-brief-department-heading,
.ashby-job-posting-brief-department-heading-level,
.ashby-application-form-question-title,
.ashby-application-form-section-header-title {
  color: var(--k1-text) !important;
}

/* Supporting text */
.ashby-job-board-heading-count,
.ashby-job-board-filters-label,
.ashby-job-posting-brief-details,
.ashby-application-form-question-description,
.ashby-application-form-section-header-description,
.ashby-application-form-texting-consent-description {
  color: var(--k1-muted) !important;
}

/* Job description */
.ashby-job-posting-description,
.ashby-job-posting-description :is(
  p, span, li, strong, em, h1, h2, h3, h4, h5, h6
) {
  color: var(--k1-text) !important;
}

/* Links and navigation */
.ashby-job-posting-description a,
.ashby-job-posting-description a *,
.ashby-job-board-back-to-all-jobs-button,
.ashby-job-board-reset-filters-label {
  color: var(--k1-link) !important;
}
.ashby-job-posting-description a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Filters and application fields */
.ashby-job-board-filter,
.ashby-job-board-filter :is(select, button, input),
.ashby-application-form-input-text,
.ashby-application-form-input-textarea,
.ashby-application-form-input-autocomplete,
.ashby-application-form-input-dropdown,
.ashby-application-form-input-dropdown-select,
.ashby-application-form-input-date {
  background-color: var(--k1-surface) !important;
  color: var(--k1-text) !important;
  border-color: var(--k1-border) !important;
}
input::placeholder,
textarea::placeholder {
  color: var(--k1-muted) !important;
  opacity: 1;
}

/* Dropdown results and upload areas */
.ashby-application-form-input-autocomplete-popup,
.ashby-application-form-input-autocomplete-popup-result,
.ashby-application-form-input-file-dropzone,
.ashby-application-form-autofill-input-base-layer {
  background-color: var(--k1-surface) !important;
  color: var(--k1-text) !important;
  border-color: var(--k1-border) !important;
}

/* Upload and autocomplete supporting text */
.ashby-application-form-input-file-dropzone-instructions,
.ashby-application-form-autofill-input-description,
.ashby-application-form-input-autocomplete-popup-empty,
.ashby-application-form-input-autocomplete-popup-loading {
  color: var(--k1-muted) !important;
}
.ashby-application-form-autofill-input-title,
.ashby-application-form-input-file-item-name,
.ashby-application-form-input-checkbox-group-option-label,
.ashby-application-form-input-radio-group-option-label {
  color: var(--k1-text) !important;
}

/* Autocomplete hover and selected results */
.ashby-application-form-input-autocomplete-popup-result:hover,
.ashby-application-form-input-autocomplete-popup-result[aria-selected="true"] {
  background-color: var(--k1-hover) !important;
}

/* Overview and Application tabs */
.ashby-job-posting-right-pane-overview-tab,
.ashby-job-posting-right-pane-application-tab {
  color: var(--k1-text) !important;
}
.ashby-job-posting-right-pane-tab-slider {
  background-color: var(--colorPrimary900) !important;
}

/* Primary application button */
.ashby-application-form-submit-button {
  background-color: var(--colorPrimary900) !important;
  color: #161616 !important;
  border-color: var(--colorPrimary900) !important;
}
.ashby-application-form-submit-button:hover {
  background-color: var(--colorPrimary600) !important;
  border-color: var(--colorPrimary600) !important;
}
.ashby-application-form-submit-button[aria-disabled="true"] {
  opacity: 0.6;
}

/* Native checkbox and radio accents */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--colorPrimary900);
}

/* Keep Ashby’s built-in keyboard focus styling. */

/* Dotted job boxes, inspired by the Cowboy Space board */
.ashby-job-posting-brief,
.ashby-job-posting-brief:hover {
  box-sizing: border-box;
  padding: 24px 16px !important;
  margin-bottom: 10px !important;
  border: 1px dotted var(--k1-job-border) !important;
  border-radius: 10px !important;
  background: var(--colorAppBackground) !important;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
  opacity: 1 !important;
  text-decoration: none !important;
  transition: none !important;
}

/* Only the title changes when hovering anywhere inside the job box. */
.ashby-job-posting-brief-title {
  color: var(--k1-text) !important;
  text-decoration: none !important;
}

.ashby-job-posting-brief:hover .ashby-job-posting-brief-title {
  color: var(--k1-job-title-hover) !important;
  text-decoration: none !important;
}

.ashby-job-posting-brief:hover .ashby-job-posting-brief-details {
  color: var(--k1-muted) !important;
}

/* Remove the outer filter frame while preserving dropdown borders. */
div[class*="_filtersContainer_"] {
  border: none !important;
  box-shadow: none !important;
}


/* Job detail sidebar: location, employment type and department. */
.ashby-job-posting-left-pane h2,
.ashby-job-posting-left-pane h3 {
  color: var(--k1-text) !important;
}
.ashby-job-posting-left-pane p,
.ashby-job-posting-left-pane li,
.ashby-job-posting-left-pane span {
  color: var(--k1-muted) !important;
}

/* Back navigation: color the actual arrow path as well as the link. */
.ashby-job-board-back-to-all-jobs-button,
.ashby-job-board-back-to-all-jobs-button:hover {
  color: var(--k1-link) !important;
  background: transparent !important;
}
.ashby-job-board-back-to-all-jobs-button svg,
.ashby-job-board-back-to-all-jobs-button svg path {
  fill: currentColor !important;
  color: var(--k1-link) !important;
}

/* Tabs and their surrounding navigation on both job pages. */
.ashby-job-posting-right-pane nav[role="tablist"],
.ashby-job-posting-right-pane a[role="tab"] {
  background-color: var(--colorAppBackground) !important;
  color: var(--k1-muted) !important;
  border-color: var(--k1-border) !important;
}
.ashby-job-posting-right-pane a[aria-selected="true"],
.ashby-job-posting-right-pane a[aria-selected="true"] span {
  color: var(--k1-link) !important;
}

/* Rich-text details, lists and tables remain legible on black. */
.ashby-job-posting-description :is(p, span, li, strong, em, b, i, h1, h2, h3, h4, h5, h6, blockquote, td, th) {
  background-color: transparent !important;
  color: var(--k1-text) !important;
}
.ashby-job-posting-description a,
.ashby-job-posting-description a * {
  color: var(--k1-link) !important;
}

/* Overview Apply button and form submit button. */
.ashby-job-posting-description-container > a[href$="/application"] button,
.ashby-application-form-submit-button {
  background-color: #D2E6F7 !important;
  color: #161616 !important;
  border-color: #D2E6F7 !important;
}
.ashby-job-posting-description-container > a[href$="/application"] button:hover,
.ashby-application-form-submit-button:hover {
  background-color: #97C7EE !important;
  color: #161616 !important;
  border-color: #97C7EE !important;
}
.ashby-application-form-submit-button span {
  color: #161616 !important;
}

/* Resume upload controls. */
.ashby-application-form-autofill-input-base-layer button,
.ashby-application-form-input-file-dropzone-upload {
  background-color: var(--k1-surface) !important;
  color: var(--k1-text) !important;
  border-color: var(--k1-border) !important;
}
.ashby-application-form-input-file-dropzone-upload span {
  color: var(--k1-text) !important;
}

/* Dropdown options and the separate filter arrow icons. */
.ashby-job-board-filter option {
  background-color: var(--k1-surface) !important;
  color: var(--k1-text) !important;
}
div[class*="_filterIconContainer_"] svg,
div[class*="_filterIconContainer_"] svg path,
.ashby-application-form-input-dropdown-icon svg,
.ashby-application-form-input-dropdown-icon svg path {
  color: var(--k1-muted) !important;
  fill: currentColor !important;
}

/* FILTER FIX: Ashby's white background image covers background-color.
   The shorthand removes that gradient as well as setting the dark fill. */
.ashby-job-board-filter,
.ashby-job-board-filter:hover,
.ashby-job-board-filter :is(select, button, input),
.ashby-job-board-filter option {
  background: #2E2E2E !important;
  background-image: none !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  border-color: #727272 !important;
  color-scheme: dark;
  opacity: 1 !important;
}

/* Remove both white layers around the resume autofill controls. */
.ashby-application-form-autofill-pane {
  background: #161616 !important;
  border: none !important;
  box-shadow: none !important;
  color: #FFFFFF !important;
}
.ashby-application-form-autofill-input-root,
.ashby-application-form-autofill-input-base-layer,
.ashby-application-form-autofill-input-drag-layer,
.ashby-application-form-autofill-input-pending-layer {
  background: #2E2E2E !important;
  border-color: #727272 !important;
  box-shadow: none !important;
  color: #FFFFFF !important;
}

/* Consistent dark form fields and upload surfaces. */
.ashby-application-form-input-text,
.ashby-application-form-input-textarea,
.ashby-application-form-input-autocomplete,
.ashby-application-form-input-dropdown,
.ashby-application-form-input-dropdown-select,
.ashby-application-form-input-date,
.ashby-application-form-input-file-dropzone,
.ashby-application-form-input-file,
.ashby-application-form-input-autocomplete-popup {
  background: #2E2E2E !important;
  color: #FFFFFF !important;
  border-color: #727272 !important;
}

/* White icons and labels on secondary upload controls. */
.ashby-application-form-autofill-input-icon,
.ashby-application-form-autofill-input-icon path,
.ashby-application-form-input-file-dropzone-upload svg,
.ashby-application-form-input-file-dropzone-upload svg path,
.ashby-job-board-reset-filters-label svg,
.ashby-job-board-reset-filters-label svg path {
  color: #FFFFFF !important;
  fill: currentColor !important;
}

/* Neutral tabs and back arrow; reserve icy blue for the main CTA. */
.ashby-job-posting-right-pane-tab-slider {
  background: #FFFFFF !important;
}
.ashby-job-posting-right-pane a[role="tab"],
.ashby-job-posting-right-pane a[role="tab"] span,
.ashby-job-board-back-to-all-jobs-button,
.ashby-job-board-back-to-all-jobs-button svg,
.ashby-job-board-back-to-all-jobs-button svg path {
  color: #FFFFFF !important;
}

/* Primary CTAs use icy blue with dark text. */
.ashby-job-posting-description-container > a[href$="/application"] button,
.ashby-application-form-submit-button {
  background: #D2E6F7 !important;
  color: #161616 !important;
  border-color: #D2E6F7 !important;
}
.ashby-job-posting-description-container > a[href$="/application"] button:hover,
.ashby-application-form-submit-button:hover {
  background: #97C7EE !important;
  color: #161616 !important;
  border-color: #97C7EE !important;
}
.ashby-application-form-submit-button svg,
.ashby-application-form-submit-button svg path {
  color: #161616 !important;
  fill: currentColor !important;
}

/* Icy blue metadata beneath each white job title, including on hover. */
.ashby-job-posting-brief-details,
.ashby-job-posting-brief-details p,
.ashby-job-posting-brief-details span,
.ashby-job-posting-brief:hover .ashby-job-posting-brief-details,
.ashby-job-posting-brief:hover .ashby-job-posting-brief-details p,
.ashby-job-posting-brief:hover .ashby-job-posting-brief-details span {
  color: #D2E6F7 !important;
}

/* Job detail sidebar values: location, employment, workplace and department. */
.ashby-job-posting-left-pane p,
.ashby-job-posting-left-pane p span,
.ashby-job-posting-left-pane li {
  color: #D2E6F7 !important;
}

/* Keep the labels above those values white. */
.ashby-job-posting-left-pane h2,
.ashby-job-posting-left-pane h2 span,
.ashby-job-posting-left-pane h3,
.ashby-job-posting-left-pane h3 span {
  color: #FFFFFF !important;
}
