/**
 * Form controls — shared, loaded by every page after type.css.
 *
 * Only the select chevron so far. The rest of the control box (borders, radius,
 * background, the three button tiers) still follows each page's own inline
 * <style> and is part of the colour and spacing pass.
 */

:root {
  /* A data URI cannot read currentColor, so the stroke is a literal. It is
     --deep-ocean #1B5E7A, url-encoded, and has to be changed here if the
     control colour changes. */
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%231B5E7A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --select-chevron-size: 12px;
}

/* Chrome draws the native chevron hard against the right border, and how much
   notice it takes of padding varies by platform and browser, so it is replaced
   with one we can place. The chevron sits a --space-2xs inset from the border
   and the text stops a --space-m short of it, so neither crowds the other.
   Same fix as seth-portfolio-website/_explorations/hero-codex.

   Only padding-inline-end is set, so each page keeps its own padding on the
   other three sides. */
select {
  -webkit-appearance: none;
  appearance: none;
  padding-inline-end: var(--space-m);
  background-color: var(--white);
  background-image: var(--select-chevron);
  background-repeat: no-repeat;
  background-position: right var(--space-2xs) center;
  background-size: var(--select-chevron-size) auto;
}

/* appearance: none also drops the native focus ring on some platforms. */
select:focus-visible {
  outline: 2px solid var(--deep-ocean);
  outline-offset: 2px;
}
