/* One dropdown look for every <select> in the app and the setup wizard (owner, 8 Nov 2026: "better and modern animated dropdowns").
   Loaded LAST by suite/index.html and welcome/index.html. No script: the browser's own <select>, styled.
   1. :where(select) is the default box (border, radius, colours). It has no weight, so a page's own rule (height, width, padding,
      radius matched to its inputs) always wins over it.
   2. html:root select (weight 0,1,2, above any page's ".x select") is what every select shares: no native arrow, our chevron, room for it.
   3. Chrome 135+ (appearance:base-select) draws the open list from this file too: a card that fades and slides in, the chosen row
      ticked, the chevron turning. Safari and Firefox keep the browser's own list under our closed control. */
:root{--sel-chev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23878e89' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
:where(select){border:1px solid var(--line);border-radius:10px;background-color:var(--card);color:var(--ink);font:inherit;padding:6px 10px}
:where(select):focus-visible{border-color:var(--b1)}
:where(select):disabled{opacity:.55;cursor:not-allowed}
html:root select{appearance:none;cursor:pointer;padding-inline-end:32px;background-image:var(--sel-chev);background-repeat:no-repeat;background-size:12px;background-position:right 11px center}
html[dir=rtl]:root select{background-position:left 11px center}
html:root select:disabled{cursor:not-allowed}

@supports (appearance:base-select){
  /* The chosen text has no ellipsis hook without <selectedcontent>, so a long one is clipped (contain:paint) and runs under the chevron box,
     which has the select's own background and reaches the end edge (negative margin = the end padding). */
  html:root select{appearance:base-select;display:inline-grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;white-space:nowrap;contain:paint;
    background-image:none;padding-inline-end:10px}
  html:root select::picker-icon{content:"";align-self:stretch;width:12px;padding-inline:8px 10px;margin-inline:-8px -10px;background:var(--sel-chev) center/12px no-repeat;background-color:inherit;transition:rotate .2s ease}
  html:root select:open::picker-icon{rotate:180deg}
  ::picker(select){appearance:base-select;box-sizing:border-box;margin-block:6px;padding:5px;max-height:min(320px,60vh);overflow-y:auto;
    border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--ink);
    box-shadow:0 16px 36px -12px rgb(0 0 0 / .28),0 2px 6px rgb(0 0 0 / .06);
    opacity:0;translate:0 -6px;scale:.98;transform-origin:top center;
    transition:opacity .16s ease,translate .16s ease,scale .16s ease,display .16s allow-discrete,overlay .16s allow-discrete}
  ::picker(select):popover-open{opacity:1;translate:0;scale:1}
  @starting-style{::picker(select):popover-open{opacity:0;translate:0 -6px;scale:.98}}
  html:root option{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;font-size:inherit;color:var(--ink);background:transparent;cursor:pointer}
  html:root option:hover,html:root option:focus-visible{background:var(--tealsoft);outline:0}
  html:root option:checked{color:var(--b1);font-weight:600}
  html:root option:disabled{opacity:.45;cursor:not-allowed}
  html:root option::checkmark{order:1;margin-inline-start:auto;content:"\2713";color:var(--b1);font-weight:700}
}
@media (prefers-reduced-motion:reduce){::picker(select),html:root select::picker-icon{transition:none}}
