/* The language dropdown (task_256, L10N0): what every surface's language menu shares (lib/languages.py's live
   languages, each in its own name, lang and direction; js/lang_select.js for the keyboard). A surface draws its
   own button and panel in its own look; this sheet only makes a long list of languages work everywhere:
   - the open list scrolls inside itself (13 languages fit a phone), never the page sideways;
   - logical properties only (right to left needs no rule);
   - the imp_company.lang_select macro's own look (.lsel), with the design's tokens where a page has them
     and plain ones where it has not (the sign-in pages, the point of sale). */
details[data-lang-select]>summary{list-style:none;cursor:pointer}
details[data-lang-select]>summary::-webkit-details-marker{display:none}
details[data-lang-select] :is(.lsel-list,.sh-ddm,.lang-m,.langdd-menu,.ov-menu,.pos-lang,ul,form[role="group"],div[role="group"]){
  max-height:min(70vh,26rem);overflow-y:auto;overscroll-behavior:contain}
details[data-lang-select] :is(a,button)[lang]{unicode-bidi:isolate}
details[data-lang-select] :is(a,button):focus-visible{outline:2px solid var(--brand,currentColor);outline-offset:-2px}

/* The macro's own look */
.lsel{position:relative;display:inline-block;font:inherit}
.lsel>summary{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 12px;border-radius:10px;
  border:1px solid var(--line,rgba(0,0,0,.18));background:var(--surface,transparent);color:inherit;font-weight:500;user-select:none}
.lsel>summary:hover{background:var(--sub,rgba(0,0,0,.04))}
.lsel>summary:focus-visible{outline:2px solid var(--brand,currentColor);outline-offset:2px}
.lsel[open]>summary{border-color:var(--brand,currentColor)}
.lsel-ic{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.lsel-chev{width:14px;height:14px;flex:none;opacity:.7;fill:none;stroke:currentColor;stroke-width:2}
.lsel[open]>summary .lsel-chev{transform:rotate(180deg)}
.lsel-cur{white-space:nowrap}
.lsel-list{position:absolute;top:calc(100% + 6px);inset-inline-end:0;z-index:60;min-width:200px;max-width:calc(100vw - 24px);
  margin:0;padding:6px;list-style:none;display:flex;flex-direction:column;gap:2px;background:var(--surface,#fff);color:var(--text,#1f2433);
  border:1px solid var(--line,rgba(0,0,0,.12));border-radius:12px;box-shadow:var(--ds-shadow-pop,0 8px 24px rgba(16,24,40,.14))}
.lsel-start .lsel-list{inset-inline-end:auto;inset-inline-start:0}
.lsel-list li{margin:0}
.lsel-i{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:44px;padding:8px 12px;border:0;border-radius:8px;
  background:transparent;color:inherit;font:inherit;font-weight:500;text-align:start;text-decoration:none;cursor:pointer}
.lsel-i:hover{background:var(--sub,rgba(0,0,0,.05))}
.lsel-i[aria-current="true"]{background:var(--brand-soft,rgba(0,0,0,.06));color:var(--brand-ink,inherit);font-weight:600}
.lsel-en{font-size:.8em;opacity:.7;font-weight:400}
@media (prefers-color-scheme:dark){
  .lsel-list:not(.ds-root *):not([data-theme] *){background:var(--surface,#1c1d21);color:var(--text,#ecebe8)}
}
:root[data-theme="dark"] .lsel-list{background:var(--surface,#1c1d21);color:var(--text,#ecebe8)}
@media (forced-colors:active){.lsel>summary,.lsel-list{border-color:CanvasText}.lsel-i[aria-current="true"]{outline:2px solid Highlight}}
