/**
 * Language switcher styles.
 *
 * URL-based switcher (no Google Translate widget) — button is injected by
 * language-switcher.js into the desktop nav and, when available, the mobile
 * nav drawer.  On pages without a mobile-nav drawer the desktop button stays
 * visible on small screens too.
 */

.language-switcher-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    margin-left: 0.5rem;
    border: 1px solid currentColor;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none !important;
    color: inherit !important;
    opacity: 0.85;
    white-space: nowrap;
    transition: opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.language-switcher-link:hover,
.language-switcher-link:focus-visible {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

.language-switcher-link .lang-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.language-switcher-link .lang-label {
    line-height: 1;
}

/* Mobile variant inside the mobile-nav drawer — matches .mobile-nav-portal-link
   geometry (1rem inset on each side) so the two buttons line up. */
.language-switcher-mobile {
    display: flex !important;
    box-sizing: border-box;
    width: calc(100% - 2rem);
    margin: 0.5rem 1rem;
    justify-content: center;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
}

/*
 * Hide the desktop button on mobile ONLY when a mobile-nav button was actually
 * mounted.  On pages without a mobile-nav drawer the desktop button must stay
 * visible on small screens, otherwise mobile users get no switcher at all.
 */
@media (max-width: 768px) {
    body.lang-has-mobile-nav .language-switcher-desktop {
        display: none;
    }
}
