.lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lang-switcher__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid var(--white);
    border-radius: 100px;
    color: var(--white);
    font-family: "Teko", sans-serif;
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

.lang-switcher__btn:hover {
    border-color: #61bd72;
    background-color: #61bd72;
    color: #ffffff;
}

.lang-switcher__caret {
    font-size: 12px;
    transition: transform 0.25s ease;
    margin-left: 2px;
}

.lang-switcher__btn[aria-expanded="true"] .lang-switcher__caret {
    transform: rotate(180deg);
}

.lang-switcher__flag {
    font-size: 16px;
    line-height: 1;
}

.lang-switcher__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1000;
    min-width: 120px;
    padding: 6px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lang-switcher__menu[hidden] {
    display: none;
}

.lang-switcher__item {
    border-radius: 8px;
    overflow: hidden;
}

.lang-switcher__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--header);
    font-family: "Teko", sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    text-decoration: none;
}

.lang-switcher__link:hover {
    background-color: rgba(0, 0, 0, 0.06);
    color: var(--header);
    text-decoration: none;
}

.lang-switcher__item--active {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: #079c49;
    font-family: "Teko", sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: default;
    border-radius: 8px;
    background-color: #e6f5ed;
}

/* Sticky header: header gets solid bg, text/border flip to green */
.sticky .lang-switcher__btn {
    border-color: #079c49;
    color: #079c49;
    background-color: transparent;
}

.sticky .lang-switcher__btn:hover {
    border-color: #079c49;
    background-color: #079c49;
    color: #ffffff;
}

/* Mobile: hide lang selector below 1199px (matches existing header-button rule) */
@media (max-width: 1199px) {
    .header-button .lang-switcher {
        display: none;
    }
}

/* Offcanvas sidebar has a white background — use dark green instead of white */
.offcanvas__info .lang-switcher__btn {
    border-color: #079c49;
    color: #079c49;
    background-color: transparent;
}

.offcanvas__info .lang-switcher__btn:hover {
    border-color: #079c49;
    background-color: #079c49;
    color: #ffffff;
}

/* In offcanvas sidebar, keep dropdown absolutely positioned so the button doesn't shift.
   Extra padding-bottom on the wrapper gives the dropdown room within the scroll container. */
.offcanvas__info .lang-switcher {
    padding-bottom: 130px;
    margin-bottom: -130px;
}

.offcanvas__info .lang-switcher__menu {
    top: 46px;
    left: 0;
    right: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
