/* Language switcher: English left | Hindi right (equal halves) */
.locale-switcher {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.locale-switcher-track {
    position: relative;
    width: 5.75rem;
    padding: 3px;
    background: #fff;
    border: 1px solid rgba(255, 140, 0, 0.18);
    border-radius: 999px;
    box-sizing: border-box;
    overflow: hidden;
}

.locale-switcher-track--mobile {
    width: 100%;
}

.locale-switcher-thumb {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 6px) / 2);
    border-radius: 999px;
    background: linear-gradient(135deg, #FF8C00, #FFC107);
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.28);
    transition: transform 0.25s ease;
    pointer-events: none;
    z-index: 0;
}

/* Hindi active → slide thumb to the right half */
.locale-switcher.is-hi .locale-switcher-thumb {
    transform: translateX(100%);
}

.locale-switcher-options {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
}

.locale-switcher-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 0;
    padding: 0.4rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 999px;
    background: transparent !important;
    box-shadow: none !important;
    transition: color 0.2s ease;
}

.locale-switcher-track--mobile .locale-switcher-link {
    padding: 0.55rem 0.5rem;
    font-size: 0.75rem;
}

.locale-switcher-link:hover {
    color: #FF8C00;
}

.locale-switcher-link.is-active,
.locale-switcher-link.is-active:hover {
    color: #fff;
}

.locale-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 1.45rem;
    height: 1.2rem;
    padding: 0 0.2rem;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.06);
    color: #555;
}

.locale-switcher-link.is-active .locale-code {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.locale-name {
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Desktop navbar: EN / HI codes only — prevents header crush */
.locale-switcher-track:not(.locale-switcher-track--mobile) .locale-name,
.locale-switcher-desktop-name {
    display: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.offcanvas-body .locale-switcher {
    margin-bottom: 1rem;
    width: 100%;
}

.offcanvas-body .locale-switcher-track--mobile {
    width: 100%;
}

.offcanvas-body .locale-switcher-track--mobile .locale-name {
    display: inline;
}

@media (max-width: 575.98px) {
    .locale-switcher-track--mobile .locale-name {
        font-size: 0.7rem;
    }
}
