/* Local, offline flag picker. The native select remains available without JS. */
.language-picker { position: relative; width: 180px; min-width: 164px; max-inline-size: calc(100vw - 28px); z-index: 5; }
.language-trigger[hidden], .language-options[hidden] { display: none; }
.language-picker[data-enhanced="true"] .language-native { display: none; }
.language-trigger { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #69748e; border-radius: 9px; background: linear-gradient(125deg, #141b2b, #0a1120); box-shadow: inset 0 1px 0 #c2d4f314, 0 4px 18px #0003; color: #edf3ff; font-size: 14px; text-align: start; }
.language-trigger:hover, .language-trigger[aria-expanded="true"] { border-color: #9eddf1; }
#language-current-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.language-flag-image { display: block; flex: 0 0 27px; width: 27px; height: 17px; object-fit: cover; border: 1px solid #b5c7e25c; border-radius: 3px; box-shadow: 0 1px 5px #0005; transform: none; }
.language-chevron { width: 18px; height: 18px; margin-inline-start: auto; stroke: #d0d9ec; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.language-trigger[aria-expanded="true"] .language-chevron { transform: rotate(180deg); }
.language-options { position: absolute; inset-block-start: calc(100% + 7px); inset-inline-end: 0; width: max(100%, 180px); max-inline-size: calc(100vw - 28px); max-height: min(65svh, 420px); padding: 5px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #647995 #0e1728; scroll-padding-block: 5px; border: 1px solid #72819e; border-radius: 10px; background: #0e1728; box-shadow: 0 14px 34px #0008; }
.language-options [role="option"] { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 9px; border: 0; border-radius: 6px; background: transparent; color: #dce8fb; font-size: 14px; text-align: start; overflow-wrap: anywhere; scroll-margin-block: 5px; }
.language-options [role="option"]:hover, .language-options [role="option"][aria-selected="true"] { background: #203349; }
.language-options [role="option"]:focus-visible { outline: 2px solid #83e6ff; outline-offset: -2px; background: #233b55; }
.language-option-check { margin-inline-start: auto; color: #a3e5fa; visibility: hidden; }
[data-language-value][aria-selected="true"] .language-option-check { visibility: visible; }
@media (max-width: 520px) {
  .language-picker { width: 134px; min-width: 124px; }
  .language-trigger { min-height: 40px; gap: 7px; padding: 8px; font-size: 12px; }
  .language-flag-image { flex-basis: 24px; width: 24px; height: 15px; }
  .language-chevron { width: 15px; height: 15px; }
}
@media (pointer: coarse) {
  .language-trigger, .language-options [role="option"] { min-height: 44px; }
}
