/* Language Switcher */

.lang {
    position: relative;
    z-index: 1112;
    display: flex;
    align-items: center;
    margin-left: 12px;
    flex-shrink: 0;
}

.lang_fixed {
    position: relative;
}

.lang__link_select {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

.lang__link_select:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lang__img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
}

.lang__img_select {
    width: 26px;
    height: 26px;
}

.lang__list {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 4px 0;
    min-width: 48px;
    z-index: 1113;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
}

/* Невидимый мост между флагом и dropdown, чтобы hover не терялся */
.lang__list::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.lang:hover .lang__list,
.lang.lang--open .lang__list {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.lang__link_sub {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    white-space: nowrap;
    font-size: 13px;
    color: #333;
}

.lang__link_sub:hover {
    background: #f0f0f0;
}

/* Mobile */
@media screen and (max-width: 992px) {
    .lang {
        margin-left: 8px;
        margin-right: 8px;
    }
    .lang__img {
        width: 22px;
        height: 22px;
    }
    .lang__img_select {
        width: 24px;
        height: 24px;
    }
}
