/* Ayiti Minute's single-choice menus keep native labels, form values and keyboard controls. */
@supports (appearance: base-select) and selector(select::picker(select)) {
  select:not([multiple]):not([size]),
  select:not([multiple]):not([size])::picker(select) {
    appearance: base-select;
    color-scheme: light;
  }

  select:not([multiple]):not([size]) {
    --select-accent: #bf4800;
    --select-orange: #ff6a09;
    align-items: center;
    gap: .65em;
    border-radius: 8px;
    padding-inline-end: .8em;
  }

  select:not([multiple]):not([size]):is(:focus-visible, :open) {
    outline: 2px solid var(--select-orange);
    outline-offset: 2px;
  }

  select:not([multiple]):not([size])::picker-icon {
    color: currentColor;
    rotate: 90deg;
    transition: rotate 160ms ease;
  }

  select:not([multiple]):not([size]):open::picker-icon { rotate: -90deg; }

  select:not([multiple]):not([size])::picker(select) {
    margin-block: 7px;
    max-block-size: min(22rem, 55dvh);
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #c9b9aa;
    border-radius: 11px;
    background: #fff8f0;
    color: #1c160f;
    box-shadow: 0 12px 25px #25170f3d;
    font: 650 15px/1.4 Inter, Arial, sans-serif;
    text-transform: none;
    letter-spacing: normal;
  }

  select:not([multiple]):not([size]) option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-block-size: 40px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: #fff8f0;
    color: #1c160f;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  select:not([multiple]):not([size]) optgroup { color: #5a4a3b; }
  select:not([multiple]):not([size]) option:not(:disabled):is(:hover, :focus-visible) { border-color: #30261e; }
  select:not([multiple]):not([size]) option:checked { background: #ffdbc3; color: #24150b; }
  select:not([multiple]):not([size]) option:disabled { color: #75665a; }
  select:not([multiple]):not([size]) option::checkmark {
    order: 1;
    margin-inline-start: auto;
    display: grid;
    place-items: center;
    flex: none;
    inline-size: 22px;
    block-size: 22px;
    border-radius: 50%;
    background: var(--select-accent);
    color: #fff;
    content: '✓';
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  select::picker-icon { transition: none !important; }
}
