/* Language switcher — shared by the authenticated navbar and guest pages. */

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

.lang-switcher__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #e1e5f0;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #0D205F;
    cursor: pointer;
    line-height: 1.2;
}

.lang-switcher__toggle:hover {
    background: #f5f7fb;
}

.lang-switcher__caret {
    font-size: 10px;
    opacity: .6;
}

.lang-switcher__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    min-width: 180px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid #e1e5f0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(13, 32, 95, .12);
    z-index: 1050;
    display: none;
    max-height: 70vh;
    overflow-y: auto;
}

.lang-switcher.is-open .lang-switcher__menu {
    display: block;
}

.lang-switcher__item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    color: #27304a;
    text-decoration: none;
    font-size: 13px;
}

.lang-switcher__item:hover {
    background: #f0f3fb;
    color: #27304a;
}

.lang-switcher__item.is-active {
    background: #eaf0ff;
    color: #0D205F;
    font-weight: 600;
}

.lang-switcher__name {
    font-size: 12px;
    opacity: .6;
}

/* Navbar placement: sits inline with the other header controls. */
.lang-switcher--navbar {
    margin-inline-end: 12px;
}

/* Guest pages (login/register/…): no shared layout, so it floats
   top-right over the auth shell instead of sitting in a header. */
.lang-switcher--guest {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1060;
}

[dir="rtl"] .lang-switcher--guest {
    right: auto;
    left: 16px;
}

[dir="rtl"] .lang-switcher__menu {
    right: auto;
    left: 0;
}

@media (max-width: 575.98px) {
    .lang-switcher--guest {
        top: 10px;
        right: 10px;
    }

    [dir="rtl"] .lang-switcher--guest {
        left: 10px;
    }

    .lang-switcher__toggle span.lang-switcher__current {
        display: none;
    }
}
