.header-lang {
    position: relative;
    overflow: visible;
}

.hdr-main__tools .header-lang {
    z-index: 2;
}

.header-lang__trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 36px;
    padding: 4px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.header-lang__trigger:hover,
.header-lang.is-open .header-lang__trigger {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.06);
}

.header-lang__trigger-img {
    display: block;
    border-radius: 50%;
    object-fit: cover;
    width: 28px;
    height: 28px;
}

.header-lang__panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 100px;
    max-height: min(320px, calc(100vh - 16px));
    padding: 8px;
    overflow-y: auto;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    z-index: 1000;
}

.header-lang--drop-up .header-lang__panel {
    top: auto;
    bottom: calc(100% + 8px);
}

.header-lang.is-open .header-lang__panel {
    display: block;
}

.header-lang__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-lang__list li {
    margin: 0;
}

.header-lang__list a,
.header-lang__item-current {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #c8c8d4;
    font-size: 14px;
    font-weight: 600;
    font-family: "Montserrat", sans-serif;
    transition: background 0.15s;
    text-decoration: none;
}

.header-lang__item-current {
    cursor: default;
}

.header-lang__item-icon-wrap {
    position: relative;
    display: inline-flex;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.header-lang__item-icon-wrap.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.2 4.8 8 9 3.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center center / 20px 20px no-repeat;
    z-index: 1;
}

.header-lang__item-icon-wrap.is-active::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #203b6b;
    opacity: 0.5;
}

.header-lang__list a:hover,
.header-lang__list a:focus {
    background: rgba(255, 255, 255, 0.08);
}

.header-lang__item-icon {
    display: block;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 50%;
}

.header-lang__item-text {
    min-width: 0;
}

/* Current-language-only mode: visual flag only, without a link or dropdown. */
.header-lang--static .header-lang__trigger--static {
    cursor: default;
}

.header-lang--static .header-lang__trigger--static:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: transparent;
}

