/* Home language switcher, matching the compact Sub2API control. */
.site-locale-switcher,
.site-locale-switcher * { box-sizing: border-box !important; }
.site-locale-switcher { position: relative; display: inline-flex; align-items: center; }
.site-locale-trigger {
    display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 6px 8px;
    color: rgba(255,255,255,.72); border: 0 !important; border-radius: 8px;
    background: transparent; font-size: 12px; font-weight: 600; cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.site-locale-trigger:hover,
.site-locale-switcher.is-open .site-locale-trigger { color: #fff; background: rgba(255,255,255,.08); }
.site-locale-trigger svg:first-child { opacity: .85; }
.site-locale-chevron { opacity: .55; transition: transform .18s ease; }
.site-locale-switcher.is-open .site-locale-chevron { transform: rotate(180deg); }
.site-locale-menu {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 220; display: grid; width: 132px; padding: 5px;
    border: 1px solid rgba(255,255,255,.13); border-radius: 10px; background: rgba(18,20,28,.96);
    box-shadow: 0 16px 36px rgba(0,0,0,.35); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    opacity: 0; visibility: hidden; transform: translateY(-5px) scale(.98); transform-origin: top right;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.site-locale-switcher.is-open .site-locale-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.site-locale-option {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; min-height: 34px; padding: 7px 9px;
    border: 0; border-radius: 7px; color: rgba(255,255,255,.72); background: transparent; font-size: 12px; text-align: left; cursor: pointer;
}
.site-locale-option > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-locale-option:hover, .site-locale-option.is-active { color: #fff; background: rgba(99,102,241,.24); }
.site-locale-check { visibility: hidden; color: #a5b4fc; font-size: 13px; }
.site-locale-option.is-active .site-locale-check { visibility: visible; }
/* Keep the desktop control compact while allowing it inside mobile menus and standalone headers. */
.nav-mobile-actions .site-locale-switcher { align-self: stretch; justify-content: flex-end; }
.nav-mobile-actions .site-locale-trigger { width: 100%; justify-content: center; }
.ms-login-nav .site-locale-switcher { position: absolute; top: 40px; right: 40px; }
.works-nav .site-locale-switcher { position: absolute; top: 14px; right: 24px; }
@media (max-width: 767px) { #navActions > .site-locale-switcher { display: none; } }
