/* Language dropdown in header */
.tgmenu__lang-switcher {
    margin-right: 20px;
    position: relative;
    z-index: 1000;
}

.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: var(--tg-theme-primary) none repeat scroll 0 0;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    min-width: 110px;
}

.lang-current .lang-flag {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.lang-arrow {
    margin-left: 4px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #fff;
    display: inline-block;
    transform-origin: center;
    transition: transform 0.15s ease;
}

.lang-dropdown.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 140px;
    background: #111;
    border-radius: 10px;
    padding: 6px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    display: none;
}

.lang-dropdown.open .lang-list {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 6px 12px;
    gap: 8px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    text-decoration: none; /* чтобы ссылку не подчёркивало */
}

.lang-option img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.06);
}


/* Мобильный переключатель использует общий обработчик выпадающего списка. */
.lang-dropdown--mobile {
    width: calc(100% - 60px);
    margin: 12px 30px 0;
    z-index: 10;
}

.lang-dropdown--mobile .lang-current {
    width: 100%;
    min-height: 44px;
}

.lang-dropdown--mobile .lang-current {
    justify-content: center;
}

.lang-dropdown--mobile .lang-list {
    width: 100%;
    min-width: 0;
    max-height: 260px;
    overflow-y: auto;
    z-index: 1;
    background: #fff;
    border: 1px solid rgba(6, 35, 91, 0.15);
    box-shadow: 0 8px 24px rgba(6, 35, 91, 0.15);
}

.lang-dropdown--mobile .lang-option {
    color: var(--tg-heading-color);
}

.lang-dropdown--mobile .lang-option:hover,
.lang-dropdown--mobile .lang-option[aria-current="true"] {
    color: var(--tg-theme-primary);
    background: rgba(87, 81, 225, 0.08);
}

