/* Ephiro - PT/EN language switch (first navbar) + Google Translate chrome.
   Shared by every header (Includes/lang-head.php). */

:root {
    --ephiro-lang-gold: #fabb60;
    --ephiro-lang-teal: #002424;
    --ephiro-lang-muted: #5e6766;
}

/* ---- Toggle ---------------------------------------------------------- */

.lang-switch-item {
    display: flex;
    align-items: center;
}

.ephiro-lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 2px;
    border: 0;
    background: transparent;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ephiro-lang-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ephiro-lang-muted);
    transition: color 0.2s ease;
}

.ephiro-lang-toggle[data-active="pt"] [data-lang-label="pt"],
.ephiro-lang-toggle[data-active="en"] [data-lang-label="en"] {
    color: var(--ephiro-lang-teal);
}

.ephiro-lang-track {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: var(--ephiro-lang-gold);
    box-shadow: inset 0 0 0 1px rgba(0, 36, 36, 0.08);
    transition: background-color 0.25s ease;
}

.ephiro-lang-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 36, 36, 0.35);
    transition: transform 0.25s ease;
}

.ephiro-lang-toggle[data-active="en"] .ephiro-lang-track {
    background: var(--ephiro-lang-teal);
}

.ephiro-lang-toggle[data-active="en"] .ephiro-lang-knob {
    transform: translateX(20px);
}

.ephiro-lang-toggle:hover .ephiro-lang-label {
    color: var(--ephiro-lang-teal);
}

.ephiro-lang-toggle:focus-visible {
    outline: 3px solid rgba(212, 154, 66, 0.55);
    outline-offset: 2px;
    border-radius: 7px;
}

@media (max-width: 991.98px) {
    .lang-switch-item {
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .ephiro-lang-label {
        font-size: 13px;
    }
}

/* ---- Google Translate chrome ----------------------------------------
   The widget is driven only by our toggle + the `googtrans` cookie, so
   Google's own UI (gadget, banner, tooltip, floating frames) must never be
   visible. Google injects its banner/tooltip as direct <body> children with
   inline styles, therefore every rule here is `!important` — an author
   `!important` declaration wins over an inline one — and lang-toggle.js
   re-applies the very same styles after every translation. */

#google_translate_element {
    position: absolute !important;
    top: auto !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.goog-te-banner-frame,
iframe.goog-te-banner-frame,
/* Google's current widget builds the bar/toolbar iframes with Material
   class names instead of `goog-te-*` — the bar pointed at the page itself
   (src="#") is `.VIpgJd-ZVi9od-ORHb-OEVmcd`. */
iframe.skiptranslate,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-xl07Ob-OEVmcd,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-te-menu-frame,
.goog-te-spinner-pos,
body > .skiptranslate:not(#google_translate_element) {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Google shifts the whole page down by the height of its own banner. */
body {
    top: 0 !important;
    margin-top: 0 !important;
}

html {
    margin-top: 0 !important;
}

/* Google flashes this class over translated blocks — only kill the tint. */
.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}

/* Google wraps the translated page in <font> tags — keep inline layout sane. */
font {
    font: inherit;
}
