/* Keep all language choices reachable without expanding the mobile header. */
@media (max-width: 1080px) {
    .site-header:has(.language-dropdown.is-open) {
        z-index: 100;
    }

    .site-header .language-dropdown {
        position: relative;
        width: auto;
        min-width: 48px;
        flex: 0 0 auto;
    }

    .site-header .language-dropdown-toggle {
        justify-content: center;
        min-width: 48px;
        width: 100%;
        padding-inline: 8px;
        gap: 4px;
    }

    .site-header .language-dropdown-toggle::after {
        content: '⌄';
        font-size: 1rem;
        line-height: 1;
        color: #40527d;
    }

    .site-header .language-dropdown-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        width: 220px;
        max-height: min(390px, calc(100dvh - 110px));
        margin-top: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 20px 50px rgba(14, 31, 78, .18);
    }

    .site-header .language-dropdown-menu a {
        min-height: 44px;
    }
}

@media (max-width: 600px) {
    .site-header .language-dropdown-menu {
        position: fixed;
        top: calc(90px + env(safe-area-inset-top));
        right: 12px;
        left: 12px;
        width: auto;
        max-height: calc(100dvh - 110px - env(safe-area-inset-top));
    }
}
