/* theme.css — the ONE shared stylesheet in this otherwise inline-styles-only
   project (see CLAUDE.md). It exists for exactly one job: forcing native
   form-control chrome — <select> option popups, date/number pickers,
   scrollbars — to render dark on every page. That cannot be done reliably
   from each page's inline styles because the option popup is OS/browser
   chrome: without `color-scheme: dark` the UA paints it white-on-white over
   our dark theme.

   Keep page-specific styling in each page's own <style> block; only truly
   global native-control theming belongs here. Loaded with a ?v= cache-bust
   query — bump it in every page when this file changes. */

:root { color-scheme: dark; }

select,
input,
textarea {
  color-scheme: dark;
}

/* Chromium honours background/color on <option> even inside the native
   popup; Firefox inherits from color-scheme above. #0b0d1c matches the
   command palette / chat panel surface colour used across the app. */
select option,
select optgroup {
  background-color: #0b0d1c;
  color: #e7ecff;
}

/* ── Native <select> CLOSED-state chrome reset (New Design integration) ──
   appearance:none clears the OS-drawn box and arrow. Colour/border/padding/
   radius below are plain (non-!important) BASELINE defaults — any page's
   own more specific rule (.pub-input, .audit-filters select, .notif-filters
   select, etc.) still wins on cascade specificity and keeps full control,
   same as before this file existed. Only genuinely unstyled selects (e.g.
   portal.html's profile-modal department/DOB pickers, which today render
   with zero custom styling at all) fall back to this baseline.
   The chevron is reasserted with !important on its background-image/repeat/
   position/size sub-properties only, because a page's `background: <color>`
   SHORTHAND (not background-color) resets background-image to none — the
   same "must always win regardless of page CSS" reasoning this project
   already uses for `[hidden] { display: none !important; }`. */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 9px 32px 9px 12px;
  color: #e7ecff;
  font: inherit;
  cursor: pointer;
}
select:disabled { opacity: 0.6; cursor: not-allowed; }
select:focus-visible { outline: 2px solid rgba(34, 211, 238, 0.55); outline-offset: 1px; }
select,
select:hover,
select:focus,
select:disabled {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a97c2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 11px 7px !important;
}
