.lang-picker-wrap {
    display: flex;
    align-items: center;
    margin-left: 8px;
}

.lang-picker-wrap--mobile {
    margin-right: 4px;
}

.lang-picker {
    position: relative;
}

.lang-picker__trigger {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 6px 5px;
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

.lang-picker__trigger:hover,
.lang-picker.is-open .lang-picker__trigger {
    opacity: 1;
}

.lang-picker__chevron {
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 4px solid rgba(255, 255, 255, 0.55);
    transition: transform 0.2s ease;
}

.lang-picker.is-open .lang-picker__chevron {
    transform: rotate(180deg);
}

.lang-picker__menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 1001;
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
    margin: 0;
    list-style: none;
    background: rgba(43, 43, 58, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.lang-picker.is-open .lang-picker__menu {
    display: flex;
}

.lang-picker__menu li {
    margin: 0;
    padding: 0;
}

.lang-picker__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 2px;
    opacity: 0.7;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.lang-picker__btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
}

.lang-picker__btn.is-active {
    display: none;
}

.lang-flag {
    display: block;
    width: 18px;
    height: 12px;
    background-size: cover;
    background-position: center;
    border-radius: 1px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.lang-picker--sm .lang-flag {
    width: 16px;
    height: 11px;
}

.lang-picker--sm .lang-picker__trigger {
    padding: 5px 4px;
}

.lang-picker--sm .lang-picker__btn {
    width: 26px;
    height: 20px;
}

.lang-flag--ru {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 6'%3E%3Crect fill='%23fff' width='9' height='2'/%3E%3Crect fill='%230039a6' y='2' width='9' height='2'/%3E%3Crect fill='%23d52b1e' y='4' width='9' height='2'/%3E%3C/svg%3E");
}

.lang-flag--en {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3CclipPath id='a'%3E%3Cpath d='M0 0v30h60V0z'/%3E%3C/clipPath%3E%3CclipPath id='b'%3E%3Cpath d='M30 15h30v15H0V0h30z'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23012169' d='M0 0v30h60V0z'/%3E%3Cpath stroke='%23fff' stroke-width='6' d='M0 0l60 30M60 0L0 30'/%3E%3Cpath stroke='%23C8102E' stroke-width='4' clip-path='url(%23b)' d='M0 0l60 30M60 0L0 30'/%3E%3Cpath stroke='%23fff' stroke-width='10' d='M30 0v30M0 15h60'/%3E%3Cpath stroke='%23C8102E' stroke-width='6' d='M30 0v30M0 15h60'/%3E%3C/g%3E%3C/svg%3E");
}

.lang-flag--zh {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 20'%3E%3Crect fill='%23de2910' width='30' height='20'/%3E%3Cpolygon fill='%23ffde00' points='5,3 6.2,6.5 9.8,6.5 6.8,8.5 7.9,12 5,10 2.1,12 3.2,8.5 0.2,6.5 3.8,6.5'/%3E%3Cpolygon fill='%23ffde00' points='12,2 12.6,3.8 14.5,3.8 13,4.9 13.6,6.7 12,5.6 10.4,6.7 11,4.9 9.5,3.8 11.4,3.8'/%3E%3Cpolygon fill='%23ffde00' points='14,6 14.6,7.8 16.5,7.8 15,8.9 15.6,10.7 14,9.6 12.4,10.7 13,8.9 11.5,7.8 13.4,7.8'/%3E%3Cpolygon fill='%23ffde00' points='14,10 14.6,11.8 16.5,11.8 15,12.9 15.6,14.7 14,13.6 12.4,14.7 13,12.9 11.5,11.8 13.4,11.8'/%3E%3Cpolygon fill='%23ffde00' points='12,14 12.6,15.8 14.5,15.8 13,16.9 13.6,18.7 12,17.6 10.4,18.7 11,16.9 9.5,15.8 11.4,15.8'/%3E%3C/svg%3E");
}
