/* ── LANGUAGE SWITCH ───────────────────────────────────────── */
/* Compact pill: globe + "EN", with the language names rolling underneath.
   The real <select> covers the pill invisibly, so a click opens the list. */
.lang-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    height: 40px;
    padding: 0 12px 0 10px;
    border: 1px solid #e6def7;
    border-radius: 999px;
    background: #fff;
    color: #5b17d6;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
}

.lang-switch:hover {
    border-color: rgba(91,23,214,0.3);
}

.lang-switch svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.lang-switch select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    border: none;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.lang-switch:focus-within {
    border-color: rgba(91,23,214,0.35);
    box-shadow: 0 0 0 4px rgba(91,23,214,0.08);
}

.lang-text {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    min-width: 40px;
}

.lang-short {
    color: #342d4f;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

/* Rolling native names: English → हिन्दी → অসমীয়া → বাংলা */
.lang-roll {
    display: block;
    height: 12px;
    margin-top: 2px;
    overflow: hidden;
}

.lang-roll-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: lang-roll 10s ease-in-out infinite;
}

.lang-roll-track span {
    display: block;
    height: 12px;
    line-height: 12px;
    font-size: 9px;
    font-weight: 500;
    color: #8a7bb0;
    white-space: nowrap;
}

/* 4 names + the first repeated: hold each, then slide up one line */
@keyframes lang-roll {
    0%, 20%   { transform: translateY(0); }
    25%, 45%  { transform: translateY(-12px); }
    50%, 70%  { transform: translateY(-24px); }
    75%, 95%  { transform: translateY(-36px); }
    100%      { transform: translateY(-48px); }
}

@media (prefers-reduced-motion: reduce) {
    .lang-roll-track { animation: none; }
}

/* Pages with no top bar */
.lang-switch-floating {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5000;
}

/* Changing language reloads the page, so it is only offered before a test starts */
body:has(#screenIntro[hidden]) .lang-switch-floating {
    display: none;
}

.bill-topbar .lang-switch {
    margin-left: auto;
}

/* Small screens: a little tighter */
@media (max-width: 768px) {
    .lang-switch {
        height: 36px;
        padding: 0 9px 0 8px;
        gap: 4px;
    }
}

/* Profile's top bar sits below the sidebar on small screens */
@media (max-width: 768px) {
    .topbar-right .lang-switch {
        position: fixed;
        top: 14px;
        right: 14px;
        z-index: 5000;
    }
}

/* Narrow phones: make room in the navbar */
@media (max-width: 480px) {
    .navbar .right-section {
        gap: 8px;
    }

    .navbar .lang-switch svg {
        display: none;
    }
}

@media (max-width: 340px) {
    .navbar {
        padding-left: 3%;
        padding-right: 3%;
    }
}

/* ── GOOGLE TRANSLATE: hide its own bar and widget ─────────── */
#google_translate_element,
iframe.skiptranslate,
.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

font font,
.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}
