/* Header is already position: relative — switcher is pulled out of flow
   because search form and login button are absolutely positioned. */
.header-top .lang-switcher {
    position: absolute;
    top: 50%;
    right: 384px;
    transform: translateY(-50%);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.lang-switcher-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: none;
    border: 0;
    font: inherit;
    line-height: 1;
    cursor: pointer;
}
.lang-switcher .lang-flag { font-size: 16px; line-height: 1; }
.lang-switcher .lang-label { font-size: 14px; font-weight: 600; }
.lang-arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform .15s ease;
}
.lang-switcher.open .lang-arrow { transform: rotate(180deg); }

/* Dropdown */
.lang-switcher-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    display: none;
    min-width: 100px;
    margin: 4px 0 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.lang-switcher.open .lang-switcher-menu { display: block; }
.lang-switcher-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: inherit;
    text-decoration: none;
}

/* Tablet: hide — the header collapses and there is no safe gap left */
@media (min-width: 768px) and (max-width: 1199px) {
    .header-top .lang-switcher { display: none; }
}

/* Mobile: reposition into the free space left of the icon row */
@media (max-width: 767px) {
    .header-top .lang-switcher {
        right: 110px;
    }
    .lang-switcher-toggle { padding: 4px 6px; }
    .lang-switcher .lang-label { font-size: 13px; }
}

.lang-switcher-toggle:hover {
color: black;
background-color: transparent !important;
}
