/* Shared Azuvyn single-choice controls. Native select semantics, validation,
   keyboard navigation and mobile pickers stay intact. Theme values come from
   brand-tokens.json through the existing Midnight Marble / public-light aliases.
   Component field rules and theme shorthands have high specificity; the shared
   visual properties below deliberately take precedence over those legacy rules. */
html[data-site-version="midnight-marble"] body select:not([multiple]):where(:not([size]), [size="1"]) {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 50px !important;
  padding: .8rem 2.75rem .8rem 1rem !important;
  border: 1px solid var(--mm-line-strong);
  /* The existing theme uses !important for every field's radius. */
  border-radius: 12px !important;
  font: 500 1rem / 1.4 var(--font-body) !important;
  color: var(--mm-mineral);
  background-color: var(--mm-midnight-soft) !important;
  background-image:
    linear-gradient(45deg, transparent 42%, currentColor 42%, currentColor 58%, transparent 58%),
    linear-gradient(135deg, transparent 42%, currentColor 42%, currentColor 58%, transparent 58%) !important;
  background-position: calc(100% - 22px) 50%, calc(100% - 17px) 50% !important;
  background-size: 6px 6px !important;
  background-repeat: no-repeat !important;
  box-shadow: none;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

html[data-site-version="midnight-marble"] body select:not([multiple]):where(:not([size]), [size="1"]):enabled:hover {
  border-color: var(--mm-signal) !important;
  background-color: var(--mm-midnight) !important;
}

html[data-site-version="midnight-marble"] body select:not([multiple]):where(:not([size]), [size="1"]):focus {
  border-color: var(--mm-signal) !important;
  outline: 2px solid var(--mm-signal);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--mm-signal) 12%, transparent);
}

html[data-site-version="midnight-marble"] body select:not([multiple]):where(:not([size]), [size="1"]):disabled {
  cursor: not-allowed;
  opacity: .6;
}

html[data-site-version="midnight-marble"] select option {
  color: var(--mm-mineral);
  background-color: var(--mm-midnight) !important;
}

@media (prefers-reduced-motion: reduce) {
  html[data-site-version="midnight-marble"] body select:not([multiple]) { transition: none; }
}

/* Let the OS supply the arrow and contrast in high-contrast mode. */
@media (forced-colors: active) {
  html[data-site-version="midnight-marble"] body select:not([multiple]):where(:not([size]), [size="1"]) {
    -webkit-appearance: auto;
    appearance: auto;
    background-image: none !important;
    border-color: ButtonText !important;
  }
  html[data-site-version="midnight-marble"] body select:not([multiple]):where(:not([size]), [size="1"]):focus {
    outline-color: Highlight;
  }
}
