/* ============================================================
   RLTranslate — Language toggle + Google Translate UI suppression
   ============================================================ */

/* ── Suppress all Google Translate default chrome ───────────
   The free GT widget injects a toolbar iframe and shifts body top.
   We hide everything and keep body at top:0.                  */

.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate { display: none !important; }

body { top: 0 !important; }

/* Tooltip / popups */
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover,
.goog-te-menu-frame { display: none !important; }

/* Text highlight overlay Google Translate adds */
.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

/* Hide the widget container itself (we only use the API) */
#rl-gt-element,
.skiptranslate { display: none !important; }


/* ── Language toggle — topbar integration ───────────────────
   Placed in .rl-topbar__inner after the social nav.
   Matches the topbar's 34px height and dark palette.          */

.rl-lang-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, .18);
    height: 100%;
    flex-shrink: 0;
}

.rl-lang-btn {
    background: transparent;
    border: none;
    padding: 3px 7px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .42);
    cursor: pointer;
    border-radius: 2px;
    transition: color .15s, background .15s;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.rl-lang-btn:hover {
    color: rgba(255, 255, 255, .85);
}

.rl-lang-btn.is-active {
    color: #ffffff;
    background: rgba(255, 255, 255, .13);
}

.rl-lang-btn:disabled {
    pointer-events: none;
}

.rl-lang-sep {
    font-size: .55rem;
    color: rgba(255, 255, 255, .2);
    line-height: 1;
    user-select: none;
}

/* Focus ring */
.rl-lang-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, .5);
    outline-offset: 1px;
}


/* ── Mobile — keep the toggle visible but hide date ─────────
   On narrow screens the topbar hides the date; toggle stays.  */
@media (max-width: 480px) {
    .rl-lang-toggle {
        margin-left: 8px;
        padding-left: 8px;
    }
    .rl-lang-btn { padding: 3px 5px; }
}
