.lang-switcher {
    --lang-switcher-toggle-border: rgba(16, 34, 51, 0.12);
    --lang-switcher-toggle-bg: rgba(255, 255, 255, 0.82);
    --lang-switcher-toggle-color: inherit;
    --lang-switcher-toggle-hover-bg: rgba(255, 255, 255, 0.92);
    --lang-switcher-toggle-shadow: 0 10px 24px rgba(10, 33, 53, 0.08);
    --lang-switcher-toggle-backdrop: blur(14px);
    --lang-switcher-menu-border: rgba(16, 34, 51, 0.12);
    --lang-switcher-menu-bg: rgba(255, 255, 255, 0.96);
    --lang-switcher-menu-color: inherit;
    --lang-switcher-menu-shadow: 0 24px 64px rgba(10, 33, 53, 0.18);
    --lang-switcher-option-hover-bg: rgba(37, 99, 235, 0.08);
    --lang-switcher-option-active-bg: rgba(37, 99, 235, 0.12);
    --lang-switcher-option-active-color: #1d4ed8;
    --lang-switcher-option-strong-color: inherit;
    --lang-switcher-option-note-color: rgba(16, 34, 51, 0.62);
    --lang-switcher-divider-color: rgba(16, 34, 51, 0.08);
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 40;
}

.lang-switcher-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--lang-switcher-toggle-border);
    background: var(--lang-switcher-toggle-bg);
    color: var(--lang-switcher-toggle-color);
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--lang-switcher-toggle-shadow);
    backdrop-filter: var(--lang-switcher-toggle-backdrop);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.lang-switcher-toggle:hover {
    transform: translateY(-1px);
    background: var(--lang-switcher-toggle-hover-bg);
}

.lang-switcher-label {
    white-space: nowrap;
}

.lang-switcher-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 5000;
    min-width: 260px;
    padding: 10px;
    border-radius: 24px;
    border: 1px solid var(--lang-switcher-menu-border);
    background: var(--lang-switcher-menu-bg);
    color: var(--lang-switcher-menu-color);
    box-shadow: var(--lang-switcher-menu-shadow);
    backdrop-filter: blur(18px);
}

.lang-switcher-menu[hidden] {
    display: none;
}

.lang-switcher-option,
.lang-switcher-system {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 12px 14px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: inherit;
    text-align: left;
    font-weight: 700;
}

.lang-switcher-option:hover:not(:disabled),
.lang-switcher-system:hover {
    background: var(--lang-switcher-option-hover-bg);
}

.lang-switcher-option.is-active,
.lang-switcher-system.is-active {
    background: var(--lang-switcher-option-active-bg);
    color: var(--lang-switcher-option-active-color);
}

.lang-switcher-option:disabled {
    opacity: 0.52;
    cursor: not-allowed;
}

.lang-switcher-option strong,
.lang-switcher-system strong {
    color: var(--lang-switcher-option-strong-color);
}

.lang-switcher-option small,
.lang-switcher-system small,
.lang-switcher-note {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--lang-switcher-option-note-color);
}

.lang-switcher-divider {
    height: 1px;
    margin: 8px 0;
    background: var(--lang-switcher-divider-color);
}

.lang-switcher-note {
    padding: 4px 14px 0;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .lang-switcher-toggle {
        padding: 10px 12px;
    }

    .lang-switcher-menu {
        min-width: 230px;
    }
}

@media (max-width: 560px) {
    .lang-switcher-label {
        display: none;
    }
}
