/* ============================================================
   GPB v4 · Features Extra
   1. Language switcher (PT/EN/中文)
   2. Mascote ao lado do WhatsApp
   3. Botão voltar
   4. VLibras (leitura em Libras)
   ============================================================ */

/* ---------- 1. LANGUAGE SWITCHER ---------- */
.lang-switcher {
  display: inline-flex; align-items: center;
  gap: 4px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-left: 14px;
}
.lang-switcher button {
  background: transparent; border: 0; padding: 2px 6px;
  color: rgba(255,255,255,.65); cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  border-radius: 3px;
  transition: color .18s, background .18s;
}
.lang-switcher button:hover { color: #fff; background: rgba(255,255,255,.12); }
.lang-switcher button.active { color: #fff; font-weight: 500; }
.lang-switcher .sep { color: rgba(255,255,255,.3); }

@media (max-width: 720px) {
  .lang-switcher { margin-left: 8px; font-size: 9px; }
  .lang-switcher button { padding: 2px 4px; }
}

/* Google Translate widget adjustments (esconde barra padrão feia) */
/* Classes legadas + novas (VIpgJd-*) — cobre todas as versões do widget */
.goog-te-banner-frame.skiptranslate,
iframe.skiptranslate,
iframe.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-l4eHX-hSRGPd,
.VIpgJd-ZVi9od-xl07Ob-lTBxed,
.VIpgJd-ZVi9od-vH1Gmf-ibnC6b,
.skiptranslate > iframe,
.skiptranslate:not(#google_translate_element) { display: none !important; visibility: hidden !important; height: 0 !important; }
html, html.translated-ltr, html.translated-rtl,
body, body.translated-ltr, body.translated-rtl { top: 0 !important; margin-top: 0 !important; position: static !important; }
.goog-tooltip, .goog-tooltip:hover, .goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background: transparent !important; box-shadow: none !important; }
#google_translate_element { display: none !important; } /* invisível — apenas mecânica */

/* ---------- 2. MASCOTE (Pagezinho) ACIMA DO WHATSAPP ---------- */
.wpp-float-wrap {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
}
.wpp-float-wrap .wpp-float {
  position: relative !important;
  bottom: auto !important; right: auto !important;
}
.wpp-mascote {
  width: 100px;
  aspect-ratio: 500 / 871;
  pointer-events: none;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.25));
  animation: mascoteBounce 3s ease-in-out infinite;
  transform-origin: bottom center;
  margin-bottom: 2px;
  position: relative;
  z-index: 1;
}
.wpp-mascote img {
  width: 100%; height: 100%; object-fit: contain;
  display: block;
}
@keyframes mascoteBounce {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-6px) rotate(2deg); }
}
@media (max-width: 900px) {
  /* Esconde o Pagezinho no mobile — pedido do cliente pra não poluir */
  .wpp-mascote { display: none !important; }

  /* Botão do WhatsApp vira bolinha com só o ícone */
  .wpp-float-wrap .wpp-float {
    width: 52px !important; height: 52px !important;
    padding: 0 !important; border-radius: 50% !important;
    display: grid !important; place-items: center !important;
    gap: 0 !important;
  }
  .wpp-float-wrap .wpp-float span { display: none !important; }
  .wpp-float-wrap .wpp-float svg { width: 28px !important; height: 28px !important; margin: 0 !important; }
}

/* ---------- 3. BOTÃO VOLTAR ---------- */
.back-btn {
  position: fixed;
  bottom: 24px; left: 24px;
  z-index: 90;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  display: flex; align-items: center; justify-content: center;
  color: #0a0a0a;
  cursor: pointer;
  transition: transform .2s var(--ease-smooth, ease), background .2s, color .2s;
  text-decoration: none;
  padding: 0;
}
.back-btn:hover {
  background: #0a0a0a; color: #fff;
  transform: translateX(-3px) scale(1.05);
}
.back-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.back-btn .lbl {
  position: absolute; left: 60px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(0,0,0,.6);
  background: #fff;
  padding: 6px 10px; border-radius: var(--r-pill, 999px);
  white-space: nowrap;
  opacity: 0; transition: opacity .2s;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.back-btn:hover .lbl { opacity: 1; }
@media (max-width: 500px) { .back-btn { width: 44px; height: 44px; bottom: 84px; } .back-btn .lbl { display: none; } }

/* Esconde botão voltar quando estiver na home */
body.is-home .back-btn { display: none; }

/* ---------- 4. VLIBRAS AJUSTES ---------- */
/* Move o botão do VLibras pra cima do WhatsApp e ajusta z-index */
[vw] { position: fixed; z-index: 100; }
[vw-access-button] { right: 24px !important; bottom: 108px !important; }
@media (max-width: 900px) { [vw-access-button] { right: 12px !important; bottom: 86px !important; } }
