.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
    padding: 3px;
    border: 1px solid rgba(212, 184, 232, 0.28);
    border-radius: 999px;
    background: rgba(107, 47, 160, 0.15);
    box-shadow: inset 0 0 12px rgba(212, 184, 232, 0.08);
}

.language-switcher__button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 30px;
    padding: 5px 8px;
    border: 0;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.68);
    background: transparent;
    font: 800 11px/1 "Poppins", sans-serif;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.language-switcher__button:hover {
    color: #fff;
    background: rgba(212, 184, 232, 0.12);
}

.language-switcher__button.is-active,
.language-switcher__button[aria-pressed="true"] {
    color: #fff;
    background: linear-gradient(135deg, #6b2fa0, #8f4cc3);
    box-shadow: 0 4px 12px rgba(107, 47, 160, 0.42);
}

.language-switcher__button:active {
    transform: scale(0.96);
}

.language-switcher__button:focus-visible {
    outline: 3px solid #e8740c;
    outline-offset: 3px;
}

header > .box-icons .language-switcher--desktop {
    margin-left: -8px;
}

.language-switcher--mobile,
.language-switcher--verifier {
    display: none;
}

.i18n-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/*
 * The sidebar is rendered in the HTML with `close-sidebar` so it starts
 * inaccessible before JavaScript initializes. The original close animation
 * starts from the fully open state, which caused a visible menu flash on every
 * page load/navigation. Keep the initial closed state static; opening remains
 * animated via `open-sidebar`.
 */
.sidebar.close-sidebar {
    animation: none;
}

@media screen and (max-width: 1200px) {
    header > .box-icons .language-switcher--desktop {
        margin-left: -6px;
    }

    .language-switcher__button {
        min-width: 31px;
        padding-inline: 7px;
    }
}

@media screen and (max-width: 1024px) {
    .sidebar .language-switcher--mobile {
        display: inline-flex;
        align-self: flex-start;
        margin: 22px 10px 18px;
        padding: 4px;
        background: rgba(107, 47, 160, 0.22);
    }

    .language-switcher--mobile .language-switcher__button {
        min-width: 48px;
        min-height: 40px;
        padding: 8px 12px;
        font-size: 13px;
    }
}

.site-header .language-switcher--verifier {
    display: inline-flex;
    margin-left: auto;
    border-color: rgba(107, 47, 160, 0.18);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 24px rgba(31, 58, 95, 0.08);
}

.site-header .language-switcher__button {
    color: rgba(31, 58, 95, 0.65);
    font-family: "Montserrat", sans-serif;
}

.site-header .language-switcher__button:hover {
    color: #1f3a5f;
    background: rgba(107, 47, 160, 0.08);
}

.site-header .language-switcher__button.is-active,
.site-header .language-switcher__button[aria-pressed="true"] {
    color: #fff;
}

@media screen and (max-width: 520px) {
    .site-header {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .site-header .brand {
        flex: 1 1 100%;
    }

    .site-header .language-switcher--verifier {
        margin-left: 0;
    }

    .site-header .back-link {
        margin-left: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .language-switcher__button {
        transition: none;
    }
}
