/* Language controls only. Shared header layout belongs in styles.css. */
body:has(.language-picker[open]) { overflow: hidden; }
.language-switcher { flex-shrink: 0; }
.language-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid transparent; border-radius: 10px; background: white; color: #52617a; font: 500 14px/1.3 'Rubik', sans-serif; cursor: pointer; white-space: nowrap; }
.language-trigger:hover, .language-trigger[aria-expanded="true"] { color: var(--deep-blue); background: #f0f4ff; }
.language-trigger svg { width: 20px; height: 20px; flex-shrink: 0; }
.language-trigger .language-full { display: none; }
.language-trigger--mobile { display: none; }
.language-trigger:focus-visible, .language-picker :is(a,button,input):focus-visible { outline: 3px solid #3e66f9; outline-offset: 3px; }
.language-picker { position: fixed; inset: 0; margin: auto; width: min(780px, calc(100vw - 32px)); height: fit-content; max-height: calc(100dvh - 32px); padding: 30px; color: #1a346c; background: #fff; border: 1px solid #e1e7f2; border-radius: 18px; box-shadow: 0 16px 60px #18376f26; font: 400 14px/1.4 'Rubik', sans-serif; text-align: start; }
.language-picker:not([open]) { display: none; }
.language-picker[open] { display: flex; flex-direction: column; }
.language-picker::backdrop { background: #10244666; backdrop-filter: blur(3px); }
.language-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 16px; }
.language-heading h2 { color: #1a346c; font: 600 22px/1.25 'Rubik', sans-serif; margin: 0; }
.language-close { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border: 0; border-radius: 50%; color: #5a6e8a; background: #f1f5fa; cursor: pointer; }
.language-close svg { width: 18px; height: 18px; }
.language-search { position: relative; display: block; margin-bottom: 16px; }
.language-search[hidden] { display: none; }
.language-search > svg { position: absolute; width: 18px; height: 18px; inset-inline-start: 14px; top: 14px; color: #7787a0; pointer-events: none; }
.language-search input { display: block; width: 100%; height: 46px; padding: 10px 12px; padding-inline-start: 42px; border: 1px solid #dce4f1; border-radius: 10px; background: #fafbfe; color: #1a346c; font: inherit; }
.language-search input::placeholder { color: #71819a; }
.language-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px 12px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 7px; margin: -4px -7px; }
/* The scroll box clips its children's focus ring (3px outline, 3px offset): 7px of padding keeps the whole ring inside it, so it is neither cut off nor the cause of a scrollbar; the negative margin keeps the list where it was. */
.language-option { display: flex; width: 100%; min-height: 55px; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; color: #253b61; }
.language-option:hover { background: #f1f5fd; }
.language-option[aria-current="true"] { background: #edf2ff; border-color: #ccdafd; color: #345ee6; }
.language-option-name { display: block; font-size: 15px; font-weight: 500; }
.language-option small { display: block; color: #71819a; font-size: 11px; margin-top: 2px; }
.language-check { width: 17px; height: 17px; flex-shrink: 0; }
.language-empty { padding: 26px 8px; text-align: center; color: #677890; }
.language-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.language-fallback { padding: 16px 20px; text-align: center; }
.language-fallback a { color: var(--deep-blue); }
.language-picker--small { width: min(520px, calc(100vw - 32px)); padding: 24px; }
.language-picker--small .language-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1000px) {
  .language-switcher { display: none; }
  .language-trigger--mobile { display: flex; justify-content: flex-start; width: 100%; min-height: 56px; gap: 10px; margin-top: 8px; padding: 16px 0 8px; border: 0; border-top: 1px solid #dfe6f1; border-radius: 0; font-size: 16px; }
  .language-trigger--mobile .language-full { display: inline; }
  .language-trigger--mobile .language-short { display: none; }
}
@media (max-width: 600px) {
  .language-picker { padding: 24px 20px; }
  .language-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .language-picker--small .language-list { grid-template-columns: 1fr; }
  .language-option { padding: 9px 8px; }
}
@media (max-width: 360px) { .language-picker { padding: 18px 14px; } }
