/* Language switcher: globe + code, small dropdown */
.lang-switch {
    position: relative;
    margin-left: auto;
    margin-right: 10px;
    z-index: 1040;
}

.lang-switch__current {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    backdrop-filter: blur(4px);
}

.lang-switch__current::-webkit-details-marker { display: none; }

.lang-switch[open] .lang-switch__current,
.lang-switch__current:hover {
    background: rgba(0, 0, 0, 0.4);
}

.lang-switch__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 160px;
    padding: 6px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.lang-switch__option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #2b302d;
    font-size: .9rem;
    text-align: left;
    cursor: pointer;
}

.lang-switch__option:hover { background: #f1f5f2; }

.lang-switch__option.is-active {
    background: #2c7744;
    color: #fff;
    font-weight: 600;
}

.lang-switch__code {
    display: inline-block;
    min-width: 24px;
    font-size: .75rem;
    font-weight: 700;
    opacity: .7;
}

/* Login / register pages: top-right corner */
.lang-switch--floating {
    position: fixed;
    top: 14px;
    right: 14px;
    margin: 0;
}

/* Narrow phones: smaller button so it never touches the centred MyTennis logo */
@media (max-width: 400px) {
    .top-bar__actions .lang-switch__current {
        padding: 6px 8px;
        gap: 4px;
        font-size: .78rem;
    }

    .top-bar__actions .lang-switch__current .fa-globe {
        display: none;
    }

    .top-bar__actions .lang-switch {
        margin-right: 6px;
    }
}
