/* assistente.css — visual do assistente do site (27/10/2026).
   Usa os tokens que as páginas já declaram (--bg, --gold, --text...). Se a
   página não declarar, o fallback depois da vírgula mantém o widget legível —
   quatro páginas do site já ficaram sem `:root` uma vez. */

/* O canto inferior direito JÁ é disputado: `.chat-float` (3 círculos sociais,
   bottom 32px, 202x58) e `.back-to-top` (bottom 80px). Medido em 27/10 — o
   botão nasceu em cima dos círculos. Por isso o BOTÃO sobe para 148px, acima
   dos dois; o PAINEL, quando abre, pode descer e cobrir a fileira, porque aí a
   pessoa está em conversa e o botão já sumiu. */
.sba {
  position: fixed;
  right: 20px;
  bottom: 148px;
  z-index: 9000;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.sba.sba-aberto { bottom: 20px; }

/* ── botão flutuante ── */
.sba-botao {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  min-height: 52px;              /* alvo confortável, inclusive no toque */
  border: 1px solid rgba(184,163,105,0.45);
  border-radius: 999px;
  background: var(--bg, #050507);
  color: var(--gold, #b8a369);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 10px 34px rgba(0,0,0,0.5);
  transition: transform .3s var(--ease, cubic-bezier(0.16,1,0.3,1)), border-color .3s, background .3s;
}
.sba-botao:hover { transform: translateY(-2px); border-color: var(--gold, #b8a369); }
.sba-botao:focus-visible { outline: 2px solid var(--gold-light, #d4c490); outline-offset: 3px; }
.sba-aberto .sba-botao { display: none; }

/* ── painel ── */
.sba-painel {
  display: none;
  flex-direction: column;
  width: min(380px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 120px));
  border: 1px solid var(--border, rgba(255,255,255,0.10));
  border-radius: 10px;
  background: #0b0b0f;
  box-shadow: 0 24px 70px rgba(0,0,0,0.65);
  overflow: hidden;
}
.sba-aberto .sba-painel { display: flex; }

.sba-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
  background: linear-gradient(135deg, rgba(184,163,105,0.08), rgba(184,163,105,0.02));
}
.sba-tit strong {
  display: block;
  color: var(--text, #e8e8ec);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.sba-tit span {
  display: block;
  margin-top: 2px;
  color: var(--gold, #b8a369);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.sba-fechar {
  flex: none;
  width: 36px; height: 36px;
  border: 1px solid var(--border, rgba(255,255,255,0.10));
  border-radius: 6px;
  background: transparent;
  color: var(--text2, rgba(255,255,255,0.55));
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.sba-fechar:hover { color: var(--text, #e8e8ec); border-color: var(--gold, #b8a369); }
.sba-fechar:focus-visible { outline: 2px solid var(--gold-light, #d4c490); outline-offset: 2px; }

.sba-corpo {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── balões ── */
.sba-msg {
  color: var(--text2, rgba(255,255,255,0.62));
  font-size: 0.9rem;
  line-height: 1.65;
}
.sba-resp { color: var(--text, #e8e8ec); }
.sba-destaque {
  padding: 16px;
  border: 1px solid rgba(184,163,105,0.28);
  border-radius: 6px;
  background: rgba(184,163,105,0.05);
  color: var(--text, #e8e8ec);
  text-align: center;
}
.sba-num {
  display: inline-block;
  margin-top: 6px;
  color: var(--gold-light, #d4c490);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

/* ── opções ── */
.sba-ops { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.sba-op {
  display: block;
  width: 100%;
  padding: 13px 16px;
  min-height: 46px;
  border: 1px solid var(--border, rgba(255,255,255,0.10));
  border-radius: 6px;
  background: var(--bg-card, rgba(255,255,255,0.03));
  color: var(--text, #e8e8ec);
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .3s, background .3s, transform .3s var(--ease, ease);
}
.sba-op:hover {
  border-color: rgba(184,163,105,0.45);
  background: rgba(184,163,105,0.06);
  transform: translateX(3px);
}
.sba-op:focus-visible { outline: 2px solid var(--gold-light, #d4c490); outline-offset: 2px; }
.sba-cta {
  border-color: rgba(184,163,105,0.5);
  background: rgba(184,163,105,0.1);
  color: var(--gold-light, #d4c490);
  text-align: center;
  font-weight: 500;
}

/* ── campo de relato ── */
.sba-form { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.sba-ta {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border, rgba(255,255,255,0.10));
  border-radius: 6px;
  background: var(--bg-card, rgba(255,255,255,0.03));
  color: var(--text, #e8e8ec);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
}
.sba-ta:focus { outline: none; border-color: rgba(184,163,105,0.5); }

.sba-rodape {
  padding: 12px 18px;
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
  color: var(--text3, rgba(255,255,255,0.38));
  font-size: 0.7rem;
  line-height: 1.55;
}

/* ── telefone ── */
@media (max-width: 640px) {
  /* no telefone a fileira social também fica embaixo: o botão sobe igual */
  .sba { right: 14px; bottom: 116px; left: 14px; }
  .sba.sba-aberto { bottom: 14px; }
  .sba-botao { width: 100%; justify-content: center; }
  .sba-painel { width: 100%; max-height: calc(100vh - 96px); }
}

/* quem pediu menos movimento não leva nenhum */
@media (prefers-reduced-motion: reduce) {
  .sba-botao, .sba-op { transition: none; }
  .sba-botao:hover, .sba-op:hover { transform: none; }
}
