/* O balão de suporte das páginas sem carteira do Vurto (home, docs, AnA, as estáticas do Swap e as do Alive sem perfil) e o painel que
   suporte.js monta no clique. Cópia idêntica em vurto-home public/, vurto-docs src/assets/, vurto-a public-api/, vurto-dead-alive public/
   e vurto-swap public/. As cores são as do tema v2 do
   vurto-tema, escritas aqui porque cada página nomeia as variáveis do seu jeito; o balão é o do Alive (public/alive.css, .suporte-balao). */
:root {
  --vs-surface: #ffffff; --vs-text: #0b1730; --vs-soft: #4a5a78; --vs-line: #dde3ee; --vs-link: #1a4fc4;
  --vs-accent: #ff9a2f; --vs-accent-on: #1d1104; --vs-ok: #5f9e0f; --vs-erro: #d92d20;
  --vs-sombra: 0 1px 2px rgba(11, 23, 48, .12), 0 20px 50px rgba(11, 23, 48, .18);
}
:root.dark, :root[data-theme="dark"] {
  --vs-surface: #0f1829; --vs-text: #e8eef8; --vs-soft: #a3b3cf; --vs-line: #1d2a44; --vs-link: #93bbff;
  --vs-ok: #a3e635; --vs-erro: #f87171;
  --vs-sombra: 0 0 0 1px rgba(255, 255, 255, .05), 0 20px 50px rgba(0, 0, 0, .45);
}

/* `button.` na frente: a folha da página (o `button` e o `button:hover` do Alive) não pinta por cima do balão nem dos botões do painel. */
button.vurto-suporte-balao {
  position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 60; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; min-height: 0; background: var(--vs-accent); color: var(--vs-accent-on); cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(255, 154, 47, .28); transition: transform .16s ease;
}
/* O rodapé do V4 (`.rodape-in`, o mesmo do modelo em todo site) ganha espaço para o balão não cobrir os links dele. */
body:has(.vurto-suporte-balao) .rodape-in { padding-bottom: 84px; }
button.vurto-suporte-balao:hover { background: var(--vs-accent); transform: scale(1.05); }
button.vurto-suporte-balao:focus-visible { outline: 3px solid var(--vs-link); outline-offset: 3px; }
.vurto-suporte-balao svg { width: 22px; height: 22px; display: block; }

.vurto-suporte-painel {
  position: fixed; inset-inline-end: 20px; bottom: 80px; z-index: 61; width: min(360px, calc(100vw - 32px));
  max-height: calc(100vh - 110px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 16px;
  background: var(--vs-surface); color: var(--vs-text); border: 1px solid var(--vs-line); border-radius: 16px; box-shadow: var(--vs-sombra);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 14.5px; line-height: 1.5; text-align: start;
}
.vurto-suporte-painel[hidden], .vurto-suporte-painel [hidden] { display: none !important; }
.vurto-suporte-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vurto-suporte-topo strong { font-family: 'Lexend', 'Inter', system-ui, sans-serif; font-size: 16px; font-weight: 600; }
button.vurto-suporte-fechar {
  display: inline-grid; place-items: center; min-height: 0; box-shadow: none;
  width: 32px; height: 32px; padding: 0; border: 1px solid var(--vs-line); border-radius: 10px; background: transparent; color: var(--vs-soft);
  font-size: 20px; line-height: 1; cursor: pointer;
}
button.vurto-suporte-fechar:hover { background: transparent; color: var(--vs-text); }
.vurto-suporte-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.vurto-suporte-campo {
  width: 100%; box-sizing: border-box; min-height: 96px; resize: vertical; padding: 10px 12px; border: 1px solid var(--vs-line); border-radius: 10px;
  background: var(--vs-surface); color: var(--vs-text); font: inherit; transition: box-shadow .25s ease, border-color .25s ease;
}
.vurto-suporte-campo:focus { outline: 0; }
/* A aura (skill aura-de-formulario): vermelho até estar certo, verde-limão quando está. */
.vurto-suporte-campo[data-aura="vazio"], .vurto-suporte-campo[data-aura="invalido"] { border-color: var(--vs-erro); box-shadow: 0 0 0 2px var(--vs-erro), 0 0 14px var(--vs-erro); }
.vurto-suporte-campo[data-aura="ok"] { border-color: var(--vs-ok); box-shadow: 0 0 0 2px var(--vs-ok), 0 0 14px var(--vs-ok); }
.vurto-suporte-motivo, .vurto-suporte-erro { margin: 0; font-size: 13px; color: var(--vs-soft); }
.vurto-suporte-erro:empty { display: none; }
.vurto-suporte-erro { color: var(--vs-erro); }
button.vurto-suporte-enviar {
  display: inline-flex; align-items: center; box-shadow: none;
  align-self: flex-start; min-height: 40px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--vs-accent); color: var(--vs-accent-on);
  font: inherit; font-weight: 600; cursor: pointer;
}
button.vurto-suporte-enviar:hover { background: var(--vs-accent); }
button.vurto-suporte-enviar:disabled { opacity: .55; cursor: not-allowed; }
.vurto-suporte-recebido strong { display: block; font-size: 15px; }
.vurto-suporte-recebido p { margin: 4px 0 0; }
.vurto-suporte-recebido code { font-family: ui-monospace, 'JetBrains Mono', Menlo, Consolas, monospace; font-size: 12.5px; word-break: break-all; }
.vurto-suporte-nota { margin: 0; padding-top: 12px; border-top: 1px solid var(--vs-line); color: var(--vs-soft); font-size: 13.5px; }
.vurto-suporte-chat {
  align-self: flex-start; display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid var(--vs-line);
  border-radius: 10px; color: var(--vs-link); font-weight: 600; text-decoration: none;
}
.vurto-suporte-chat:hover { border-color: var(--vs-link); text-decoration: none; }
@media (max-width: 520px) {
  button.vurto-suporte-balao { inset-inline-end: 16px; bottom: 16px; }
  .vurto-suporte-painel { inset-inline-end: 16px; bottom: 74px; }
}
@media (prefers-reduced-motion: reduce) { button.vurto-suporte-balao, .vurto-suporte-campo { transition: none; } }

/* Abaixo de 520 px o balão sai do caminho enquanto a pessoa rola para baixo (suporte-rola.js marca `data-balao-some` no <html>) e volta ao
   rolar para cima, ao parar e no fim da página. Com o painel aberto ele fica. `.suporte-balao` é o balão da página de doar do Alive. */
@media (max-width: 520px) {
  button.vurto-suporte-balao, .suporte-balao { transition: transform .22s ease, opacity .22s ease, visibility .22s; }
  html[data-balao-some] button.vurto-suporte-balao:not([aria-expanded="true"]), html[data-balao-some] .suporte-balao {
    transform: translateY(calc(100% + 32px)); opacity: 0; visibility: hidden; pointer-events: none;
  }
}
@media (max-width: 520px) and (prefers-reduced-motion: reduce) {
  button.vurto-suporte-balao, .suporte-balao { transition: none; }
  html[data-balao-some] button.vurto-suporte-balao:not([aria-expanded="true"]), html[data-balao-some] .suporte-balao { transform: none; }
}
