/* The native picker stays available until the custom control is ready. */
html body [data-tw-lang-native],html body .tw-lang-toggle[hidden],html body .tw-lang-list[hidden]{display:none!important}
html body button.tw-lang-toggle {
  box-sizing:border-box;position:relative;display:inline-flex;align-items:center;justify-content:center;
  vertical-align:middle;gap:6px;width:auto;min-width:0;max-width:100%;height:32px;min-height:32px;
  padding:0 9px;margin:0;flex:0 0 auto;appearance:none;
  border:1px solid #475b69;border-radius:7px;background:#172835;color:#e6eef1;box-shadow:inset 0 1px 0 #ffffff08;
  font:550 .75rem/1.1 system-ui,-apple-system,sans-serif;letter-spacing:normal;text-transform:none;
  white-space:nowrap;text-decoration:none;cursor:pointer;
}
html body button.tw-lang-toggle svg {display:block;position:static;width:14px;height:14px;flex:none;color:#a9d3ce}
html body button.tw-lang-toggle .tw-lang-caption {display:block;position:static;font:inherit;color:inherit;line-height:inherit;letter-spacing:normal}
html body button.tw-lang-toggle i {display:block;position:static;width:5px;height:5px;margin:-2px 1px 0 2px;
  box-sizing:content-box;border:solid #acc2c7;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);background:none}
html body button.tw-lang-toggle[aria-expanded=true] {border-color:#91c6b6;background:#203a43}
html body button.tw-lang-toggle[aria-expanded=true] i {transform:rotate(225deg);margin-top:3px}
html body button.tw-lang-toggle:focus-visible {outline:2px solid #b5edda;outline-offset:2px}
html body button.tw-lang-toggle:disabled {opacity:.6;cursor:default}
html body button.tw-lang-header {grid-column:3;grid-row:1;order:3;justify-self:end;align-self:center}
html body .tw-lang-list {
  --tw-locale-mint:#a6e3ce;position:fixed;inset:auto;z-index:2147483000;box-sizing:border-box;
  width:min(174px,calc(100vw - 14px));min-width:0;height:auto;max-height:calc(100dvh - 14px);
  margin:0;padding:4px;overflow:auto;overscroll-behavior:contain;scroll-behavior:auto;
  border:1px solid #48636b;border-radius:10px;background:#10222e;color:#ebf2f2;
  box-shadow:0 8px 24px #040d16a6,0 1px 3px #040d164d;color-scheme:dark;
  font:500 .8125rem/1.25 system-ui,-apple-system,sans-serif;letter-spacing:normal;text-align:start;
}
html body .tw-lang-option {
  display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:34px;
  box-sizing:border-box;padding:5px 10px;margin:0;border-radius:6px;color:inherit;
  font:inherit;text-transform:none;cursor:pointer;
}
html body .tw-lang-option[aria-selected=true] {background:#203c40;color:var(--tw-locale-mint);font-weight:650}
html body .tw-lang-option[aria-selected=true]::after {content:'';width:5px;height:9px;flex:none;margin-inline-end:2px;margin-top:-3px;
  border:solid currentColor;border-width:0 1.6px 1.6px 0;transform:rotate(45deg)}
html body .tw-lang-list[data-keyboard] .tw-lang-option[data-active] {outline:1px solid #a7cfca;outline-offset:-2px}
html body .tw-lang-option[aria-disabled=true] {opacity:.55;cursor:default}
@media(hover:hover){
  html body button.tw-lang-toggle:hover {border-color:#799a9e;background:#203641}
  html body .tw-lang-option:not([aria-disabled=true]):hover {background:#28424b}
}
@media(pointer:coarse){
  html body button.tw-lang-toggle {min-height:40px}
  html body .tw-lang-option {min-height:42px}
}
@media(forced-colors:active){
  html body .tw-lang-option[aria-selected=true] {color:HighlightText;background:Highlight;forced-color-adjust:none}
}
/* Older tool themes size every button in a modal. Only the language control opts out. */
@layer tw-language-controls {
  [data-tw-lang-native],.tw-lang-toggle[hidden],.tw-lang-list[hidden] {display:none!important}
  :root {--tw-language-control-height:32px}
  @media(pointer:coarse) {:root {--tw-language-control-height:40px}}
  /* Keep the action pair aligned, including the outer bar of embedded item viewers. */
  dialog .tw-lang-toggle + :is(#close,button[id$="-close"],button[class*="close" i],button[data-htv-close],button[data-close]),
  dialog.site-reference .site-reference-actions > button:not([hidden]) {
    box-sizing:border-box!important;align-self:center!important;
    height:var(--tw-language-control-height)!important;min-height:var(--tw-language-control-height)!important;
    padding-block:0!important;margin-block:0!important;line-height:1.15!important;
  }
  button.tw-lang-toggle:not([hidden]) {
    display:inline-flex!important;align-self:center!important;gap:6px!important;
    width:auto!important;min-width:0!important;min-height:var(--tw-language-control-height)!important;height:var(--tw-language-control-height)!important;
    padding:0 9px!important;font-size:.75rem!important;line-height:1.1!important;
  }
  button.tw-lang-toggle .tw-lang-caption {font-size:inherit!important;line-height:inherit!important}
  .tw-lang-list,.tw-lang-option {font-size:.8125rem!important}
}
body > header.homepage-shared-header .header-inner:has(#hq-finder-toggle) > button.tw-lang-header {grid-column:4}
@media(max-width:375px) {
  body > header.homepage-shared-header .header-inner > button.tw-lang-header {gap:4px!important;padding-inline:7px!important}
  body > header.homepage-shared-header .header-inner > button.tw-lang-header svg {display:none}
}
