/* Shared native select component. All sites load this once; page CSS owns layout only. */
select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  border: 1px solid var(--edge);
  border-radius: var(--control-radius);
  padding: 10px 14px;
  font: inherit;
  font-size: var(--text);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  background-color: var(--white);
}

/* A dropdown reserves an icon lane. Multi-selects and sized listboxes stay native. */
select:not([multiple]):is(:not([size]), [size="0"], [size="1"]) {
  -webkit-appearance: none;
  appearance: none;
  padding-inline-end: 44px;
  background-image: url("./select-chevron.svg");
  background-position: right 14px center;
  background-size: 16px 16px;
  background-repeat: no-repeat;
}

select:not([multiple]):is(:not([size]), [size="0"], [size="1"]):dir(rtl) { background-position: left 14px center; }
select:hover:not(:disabled) { border-color: var(--deep); }
select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
select:disabled { opacity: .6; cursor: not-allowed; }

/* Native arrows and system colors remain visible in high-contrast environments. */
@media (forced-colors: active) {
  select:not([multiple]):is(:not([size]), [size="0"], [size="1"]) {
    -webkit-appearance: auto;
    appearance: auto;
    background-image: none;
    padding-inline-end: 14px;
  }
  select { color: FieldText; background-color: Field; border-color: ButtonText; }
  select:focus-visible { outline-color: Highlight; }
}
