.language-switcher {
    position: relative;
    z-index: 1100;
    flex: 0 0 auto;
    width: auto;
    color: #334155;
    font: inherit;
}

.language-switcher summary {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(100, 116, 139, 0.24);
    border-radius: 999px;
    color: inherit;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 7px 20px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
    cursor: pointer;
    list-style: none;
    font: inherit;
    font-weight: 600;
}

.language-switcher summary:hover,
.language-switcher[open] summary {
    border-color: rgba(194, 65, 12, 0.38);
    color: #9a3412;
    background: #fff;
}

.language-switcher summary::-webkit-details-marker {
    display: none;
}

.language-switcher summary::after {
    width: 6px;
    height: 6px;
    margin: -3px 3px 0 2px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    content: "";
    transform: rotate(45deg);
}

.language-switcher[open] summary::after {
    margin-top: 3px;
    transform: rotate(225deg);
}

.language-switcher summary:focus-visible {
    outline: 3px solid rgba(255, 107, 53, 0.42);
    outline-offset: 3px;
}

.language-switcher__flag {
    flex: 0 0 1.5em;
    width: 1.5em;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1;
}

.language-switcher__trigger-label,
.language-switcher__name {
    white-space: nowrap;
}

.language-switcher__menu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    min-width: 220px;
    margin-top: 6px;
    padding: 8px;
    border: 1px solid rgba(100, 116, 139, 0.22);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
}

.language-switcher__menu a,
.language-switcher__menu > span {
    display: flex;
    width: auto;
    height: auto;
    min-height: 46px;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    white-space: nowrap;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
}

.language-switcher__menu a:hover,
.language-switcher__menu a:focus-visible {
    color: #c2410c;
    background: #fff7ed;
    outline: none;
}

.language-switcher__menu a:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(194, 65, 12, 0.35);
}

.language-switcher__menu [aria-current="language"] {
    color: #c2410c;
    background: #fff7ed;
}

.language-switcher__menu [aria-disabled="true"] {
    color: #64748b;
    cursor: not-allowed;
}

.language-switcher-slot {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    order: 2;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
}

.footer-bottom > .footer-top,
.site-footer-bottom > .site-footer-top {
    order: 3;
    margin-left: 12px;
}

.language-switcher-slot .language-switcher__menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
}

.language-footer-standalone {
    position: fixed;
    right: 24px;
    bottom: 20px;
    left: 24px;
}

.language-footer-standalone .language-switcher-slot {
    width: min(560px, 100%);
    margin-right: auto;
    margin-left: auto;
}

.nav-language-item:empty {
    display: none;
}

@media (max-width: 900px) {
    .mobile-menu,
    .site-mobile-menu {
        box-sizing: border-box;
        overflow-y: auto;
    }

    .mobile-menu {
        align-items: flex-start;
        padding: 96px 24px 36px;
    }

    .site-mobile-menu {
        place-items: start center;
        padding: 96px 24px 36px;
    }

    .mobile-menu > nav,
    .site-mobile-menu > nav {
        width: min(320px, 100%);
        margin: auto;
    }

    .mobile-menu .language-switcher,
    .site-mobile-menu .language-switcher,
    .nav-menu .language-switcher {
        width: 100%;
        margin-top: 4px;
        padding-top: 18px;
        border-top: 1px solid rgba(100, 116, 139, 0.22);
    }

    .mobile-menu .language-switcher summary,
    .site-mobile-menu .language-switcher summary,
    .nav-menu .language-switcher summary {
        justify-content: center;
        width: 100%;
        min-height: 48px;
        padding: 10px 14px;
        border: 0;
        border-radius: 0;
        color: #64748b;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        font-size: 0.92rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .mobile-menu .language-switcher__menu,
    .site-mobile-menu .language-switcher__menu,
    .nav-menu .language-switcher__menu {
        position: static;
        grid-template-columns: 1fr;
        width: 100%;
        min-width: 0;
        margin-top: 8px;
        padding: 8px;
    }

    .mobile-menu .language-switcher__menu a,
    .mobile-menu .language-switcher__menu > span,
    .site-mobile-menu .language-switcher__menu a,
    .site-mobile-menu .language-switcher__menu > span,
    .nav-menu .language-switcher__menu a,
    .nav-menu .language-switcher__menu > span {
        min-height: 50px;
        justify-content: flex-start;
        padding: 0 18px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .nav-menu.active {
        max-height: calc(100dvh - 70px);
        overflow-y: auto;
        padding-bottom: 32px;
    }

    .nav-menu .nav-language-item {
        display: block;
        width: min(320px, calc(100% - 32px));
        margin: 4px auto 0;
    }

    .language-footer-standalone {
        position: static;
        margin: 0 24px 20px;
    }
}
