/* ===============================
   Medal Careers - Dark Theme
   =============================== */

:root {
  color-scheme: dark;
}

html, body {
  background-color: #000 !important;
  color: #fff !important;
}

*:not(.ashby-application-form-field-entry button) {
  background-color: transparent !important;
  box-shadow: none !important;
  color: inherit;
}

main, section, article {
  background-color: #000 !important;
}

header {
  background-color: #000 !important;
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #2a2a2a;
}

body { padding-top: 80px !important; }

header img {
  filter: invert(1) brightness(1.3) contrast(1.1);
  max-height: 40px;
}

header svg {
  fill: #fff !important;
  stroke: #fff !important;
}

/* Radio selected circle + toggle button backgrounds */
.ashby-application-form-field-entry span,
.ashby-application-form-field-entry button {
  background-color: unset !important;
}
.ashby-job-board-filter {
  background-color: #1a1a1a !important;
  background-image: none !important;
  color: #fff !important;
  border: 1px solid #3a3a3a !important;
  border-radius: 8px !important;
}

/* Buttons: white background with black text on hover */
.ashby-application-form-submit-button:hover,
.ashby-application-form-submit-button:hover * {
  background-color: #fff !important;
  color: #000 !important;
  border-color: #fff !important;
}

/* Submit button */
.ashby-application-form-submit-button {
  background-color: transparent !important;
  color: #fff !important;
  border: 2px solid #fff !important;
}

/* Pin Member of Technical Staff to the top */
.ashby-job-posting-brief-list { display: flex !important; flex-direction: column !important; }
.ashby-job-posting-brief-list > a[href*="7dab49be"] { order: -1 !important; }

/* Pin General Application to the bottom */
.ashby-job-posting-brief-list > a[href*="ba43b09b"] { order: 999 !important; }

/* Date picker popup. The `*` rule at the top of this file strips
   background-color with !important, which makes the calendar see-through.
   Two constraints on the fix: it must outrank that rule (its :not()
   argument gives it specificity 0,1,1), and Ashby's CSS validator only
   accepts ashby-* class names - hence body/div and role/aria hooks. */
body div.ashby-application-form-input-date-popup {
  background-color: #111 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9) !important;
  border-radius: 8px !important;
  z-index: 100 !important;
}

.ashby-application-form-input-date-popup div[role="option"]:hover {
  background-color: #2a2a2a !important;
}

.ashby-application-form-input-date-popup div[aria-selected="true"] {
  background-color: #3043f5 !important;
  color: #fff !important;
}
