/* ── Language Switcher ───────────────────────────────────── */

.lang-switcher {
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 500;
}

/* Toggle button */
.lang-switcher__btn {
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    opacity: 0.45;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.lang-switcher__btn:hover,
.lang-switcher__btn[aria-expanded="true"] {
    opacity: 1;
}

.lang-switcher__flag {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Tooltip (left of button) */
.lang-switcher__btn::before {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(14, 15, 18, 0.92);
    color: #fff;
    font-size: 12px;
    font-family: inherit;
    font-weight: 400;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.lang-switcher__btn:hover::before {
    opacity: 1;
}

/* Dropdown menu */
.lang-switcher__menu {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    list-style: none;
    margin: 0;
    padding: 6px;
    min-width: 172px;
    background: rgba(18, 20, 26, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

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

/* Language items */
.lang-switcher__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-switcher__item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.lang-switcher__item.is-current {
    color: #fff;
}

.lang-switcher__item img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.lang-switcher__check {
    margin-left: auto;
    color: #c0743f;
    font-size: 15px;
    line-height: 1;
}

/* Mobile: move slightly further from edge */
@media (max-width: 480px) {
    .lang-switcher {
        bottom: 20px;
        right: 16px;
    }
}

@media (max-width: 390px) {
    .lang-switcher {
        bottom: 10px;
        right: 10px;
    }

    .lang-switcher__btn,
    .lang-switcher__flag {
        width: 38px;
        height: 38px;
    }
}
