.x2LanguageSelector {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.languageButton {
    color: #fff;
}

.langIcon.languageFlag {
    width: 28px;
    height: 28px;
    display: block;
    flex: 0 0 28px;
    border-radius: 50%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .28);
}

.flag-en { background-image: url('/x2bets216/assets/flags/en.svg'); }
.flag-fr { background-image: url('/x2bets216/assets/flags/fr.svg'); }
.flag-ar { background-image: url('/x2bets216/assets/flags/tn.svg'); }

.languageButton strong {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.languageButton strong small {
    color: #e1b92f;
    font-size: 11px;
    letter-spacing: .06em;
}

.languageChevron {
    color: #e1b92f;
    font-size: 16px;
    text-align: center;
    transition: transform .2s ease;
}

.languageButton[aria-expanded="true"] .languageChevron {
    transform: rotate(180deg);
}

.x2LanguageMenu {
    position: absolute;
    right: 16px;
    bottom: calc(100% - 7px);
    left: 16px;
    z-index: 30;
    padding: 6px;
    overflow: hidden;
    border: 1px solid #284860;
    border-radius: 9px;
    background: #0c2031;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, .35);
}

.x2LanguageMenu[hidden] { display: none; }

.x2LanguageMenu button {
    width: 100%;
    min-height: 46px;
    padding: 7px 9px;
    display: grid;
    grid-template-columns: 34px 1fr 22px;
    align-items: center;
    gap: 8px;
    appearance: none;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: transparent;
    color: #fff;
    text-align: start;
    cursor: pointer;
}

.x2LanguageMenu button:last-child { border-bottom: 0; }
.x2LanguageMenu button:hover,
.x2LanguageMenu button[aria-selected="true"] { background: #143754; }

.x2LanguageMenu button > span:nth-child(2) {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.x2LanguageMenu button strong { font-size: 13px; }
.x2LanguageMenu button small { color: #92a4b2; font-size: 10px; }
.x2LanguageMenu button b { color: #e1b92f; font-size: 16px; text-align: center; }

.x2DrawerLogout {
    min-height: 40px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-decoration: none;
}

.x2DrawerLogout svg {
    flex: 0 0 20px;
}

html[dir="rtl"] .headerMobile,
html[dir="rtl"] .headerMobileButtonContainer,
html[dir="rtl"] .headerLoggedInButnsMobileContainer,
html[dir="rtl"] .navBarMobile a,
html[dir="rtl"] .drawerFooterMenu a,
html[dir="rtl"] .accountMobileIdentity,
html[dir="rtl"] .accountMobileAccountMenu a {
    direction: rtl;
}

html[dir="rtl"] .x2LanguageMenu { direction: rtl; }
