.language-switcher {
    position: relative;
    display: inline-flex;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.language-switcher__trigger {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 142px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, .34);
    border-radius: 13px;
    background: rgba(255, 255, 255, .88);
    color: #1e293b;
    box-shadow: 0 5px 16px rgba(15, 23, 42, .06);
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.language-switcher__trigger:hover,
.language-switcher.is-open .language-switcher__trigger {
    border-color: rgba(8, 145, 178, .55);
    box-shadow: 0 8px 22px rgba(8, 145, 178, .14);
}

.language-switcher__trigger:focus-visible,
.language-switcher__option:focus-visible,
.drawer-language-option:focus-visible {
    outline: 3px solid rgba(34, 211, 238, .3);
    outline-offset: 2px;
}

.language-switcher__flag,
.drawer-language-option img {
    width: 26px;
    height: 18px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(15, 23, 42, .12);
    box-shadow: 0 2px 5px rgba(15, 23, 42, .14);
}

.language-switcher__current {
    flex: 1;
    text-align: left;
    font-size: .8rem;
    font-weight: 800;
    white-space: nowrap;
}

.language-switcher__chevron {
    color: #64748b;
    font-size: .7rem;
    transition: transform .18s ease;
}

.language-switcher.is-open .language-switcher__chevron { transform: rotate(180deg); }

.language-switcher__menu {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    z-index: 2300;
    width: 245px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: 17px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 20px 55px rgba(15, 23, 42, .18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px) scale(.98);
    transform-origin: top right;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.language-switcher.is-open .language-switcher__menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.language-switcher__option {
    width: 100%;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #334155;
    text-align: left;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}

.language-switcher__option:hover { background: #f0f9ff; color: #0369a1; }
.language-switcher__option.is-active { background: #ecfeff; color: #0e7490; }
.language-switcher__option strong { display: block; font-size: .84rem; line-height: 1.2; }
.language-switcher__option small { display: block; margin-top: 3px; color: #94a3b8; font-size: .68rem; font-weight: 600; }
.language-switcher__check { color: #06b6d4; font-size: .78rem; opacity: 0; }
.language-switcher__option.is-active .language-switcher__check { opacity: 1; }

.drawer-language {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
}

.drawer-language-label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    color: #cbd5e1;
    font-size: .75rem;
    font-weight: 800;
}

.drawer-language-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.drawer-language-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 43px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 11px;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font: 800 .75rem/1 system-ui, sans-serif;
    cursor: pointer;
}

.drawer-language-option.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
    box-shadow: 0 6px 18px rgba(6, 182, 212, .2);
}

.language-switcher--floating { position: fixed; top: 20px; right: 20px; z-index: 10000; }

@media (max-width: 900px) {
    .language-switcher--desktop { display: none; }
}

@media (max-width: 520px) {
    .language-switcher--floating { top: 10px; right: 10px; }
    .language-switcher--floating .language-switcher__trigger { min-width: 128px; height: 39px; padding: 0 9px; }
    .language-switcher--floating .language-switcher__menu { width: min(238px, calc(100vw - 20px)); }
}
