/* Fontes carregadas via <link> no <head> de chatbot.html (1 requisição
   paralela) em vez de @import em cadeia. Mesmas famílias/pesos. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #c61c1c;
  --red-dark: #a00d24;
  --red-glow: rgba(200, 16, 46, 0.45);

  --bg: #07080c;
  --bg-soft: #0e1018;
  --panel: #12141d;
  --panel-2: #171a25;
  --line: rgba(255, 255, 255, 0.08);

  --text: #e9eaf0;
  --text-mid: #aab0c0;
  --text-dim: #6b7180;

  --font-body: 'Rubik', sans-serif;
  --font-main: 'Anton', sans-serif;

  --radius: 16px;
}

html { font-size: 18px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.spotlight {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 78% 18%, rgba(200, 16, 46, 0.20), transparent 60%),
    radial-gradient(700px 500px at 85% 80%, rgba(120, 20, 40, 0.18), transparent 60%);
  animation: spotPulse 8s ease-in-out infinite alternate;
}
.grid-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(1000px 700px at 70% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(1000px 700px at 70% 40%, #000 30%, transparent 80%);
}
@keyframes spotPulse {
  from { opacity: 0.75; }
  to   { opacity: 1; }
}

.cb {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  height: 100vh;
  height: 100dvh;
  padding: 0;
  width: 100%;
}

.chat {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: none;
  border-right: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 30px 0 80px rgba(0,0,0,0.45);
  min-height: 0;
  height: 100vh;
  height: 100dvh;
}

.chat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.chat__back {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--text-mid);
  transition: background .2s, color .2s;
}
.chat__back:hover { background: rgba(255,255,255,0.06); color: var(--text); }

.chat__avatar { position: relative; width: 44px; height: 44px; flex: 0 0 auto; }
.chat__avatar img {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  padding: 6px;
  border: 1px solid var(--line);
}
.chat__status-dot {
  position: absolute; right: 0; bottom: 0;
  width: 12px; height: 12px;
  background: #2ecc71;
  border: 2px solid var(--panel);
  border-radius: 50%;
}
.chat__who { display: flex; flex-direction: column; line-height: 1.2; margin-right: auto; }
.chat__name { font-size: 1rem; font-weight: 600; letter-spacing: .2px; }
.chat__status { font-size: .72rem; color: #2ecc71; }
.chat__head-actions { display: flex; gap: 4px; }

.chat__icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: none; background: transparent;
  color: var(--text-mid);
  border-radius: 50%;
  font-size: 1rem;
  transition: background .2s, color .2s;
}
.chat__icon-btn:hover { background: rgba(255,255,255,0.06); color: var(--text); }

/* Barra de busca (aberta pela lupa no topo) */
.chat__search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--line);
  animation: pop .2s ease;
}
.chat__search[hidden] { display: none; }
.chat__search > svg { color: var(--text-dim); flex: 0 0 auto; }
.chat__search input {
  flex: 1 1 auto;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: .9rem;
  outline: none;
  font-family: inherit;
}
.chat__search input::placeholder { color: var(--text-dim); }
.chat__search-close {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: none; background: transparent;
  color: var(--text-mid);
  border-radius: 50%;
  transition: background .2s, color .2s;
}
.chat__search-close:hover { background: rgba(255,255,255,0.06); color: var(--text); }

.chat__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.chat__body::-webkit-scrollbar { width: 8px; }
.chat__body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 8px; }

.chat__day {
  align-self: center;
  font-size: .7rem;
  color: var(--text-dim);
  background: rgba(255,255,255,0.05);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.msg { display: flex; max-width: 82%; animation: pop .25s ease; }
.msg--bot { align-self: flex-start; }
.msg--me  { align-self: flex-end; }

.bubble {
  position: relative;
  padding: 10px 14px 18px;
  border-radius: 14px;
  font-size: .92rem;
  line-height: 1.45;
  color: var(--text);
  word-wrap: break-word;
}
.msg--bot .bubble {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-top-left-radius: 4px;
}
.msg--me .bubble {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-top-right-radius: 4px;
  box-shadow: 0 6px 18px rgba(200,16,46,0.30);
}
.bubble strong { color: #fff; font-weight: 600; }
.bubble__time {
  position: absolute;
  right: 12px; bottom: 5px;
  font-size: .62rem;
  color: rgba(255,255,255,0.55);
}
.msg--bot .bubble__time { color: var(--text-dim); }

.typing { display: flex; gap: 4px; align-items: center; padding: 14px; }
.typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-dim);
  animation: blink 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }

/* Balão de "digitando" (mostrado antes de cada resposta do bot) */
.bubble--typing { padding: 12px 14px; min-width: 44px; }
.bubble--typing .typing { padding: 0; }

.chat__quick {
  display: flex;
  gap: 8px;
  padding: 8px 16px 4px;
  flex-wrap: wrap;
}
.chip {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text-mid);
  font-size: .78rem;
  padding: 7px 14px;
  border-radius: 20px;
  transition: all .2s;
  white-space: nowrap;
}
.chip:hover {
  border-color: var(--red);
  color: #fff;
  background: rgba(200,16,46,0.15);
}

.chat__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border-top: 1px solid var(--line);
}
.chat__input {
  flex: 1 1 auto;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  font-size: .92rem;
  padding: 12px 16px;
  border-radius: 22px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.chat__input::placeholder { color: var(--text-dim); }
.chat__input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.18);
}
.chat__send {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  font-size: 1rem;
  display: grid; place-items: center;
  transition: transform .15s, box-shadow .2s;
  box-shadow: 0 6px 18px rgba(200,16,46,0.35);
}
.chat__send:hover { transform: scale(1.06); }
.chat__send:active { transform: scale(0.94); }

.bot3d {
  position: relative;
  min-height: 0;
  overflow: hidden;
}
.bot3d__text {
  position: absolute;
  top: 2.5%;
  left: 4%;
  z-index: 2;
  max-width: 440px;
  pointer-events: none;
}
.bot3d__title {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  letter-spacing: 1px;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
}
.grad {
  background: linear-gradient(135deg, #ff5b6e, var(--red) 45%, var(--red-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bot3d__desc {
  margin-top: 14px;
  color: var(--text-mid);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 380px;
}
.bot3d__scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bot3d__scene spline-viewer,
.bot3d__scene #bot3d-canvas {
  position: relative;
  z-index: 1;

  width: 100%;
  height: 100%;
  margin: auto;
  display: block;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes blink {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* ===== FAQ (categorias, perguntas, feedback) ===== */
.faq-opts {
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 90%;
  margin: 2px 0 4px;
  animation: pop .25s ease;
}
.faq-opts--inline { flex-direction: row; flex-wrap: wrap; }

.faq-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: .86rem;
  line-height: 1.3;
  padding: 11px 14px;
  border-radius: 12px;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}
.faq-opt:hover { border-color: var(--red); background: rgba(200,16,46,0.12); transform: translateX(2px); }
.faq-opt:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.faq-opt__ic { flex: 0 0 auto; width: 20px; height: 20px; color: var(--text-mid); display: inline-flex; }
.faq-opt__ic svg { width: 20px; height: 20px; }
.faq-opt:hover .faq-opt__ic { color: var(--red); }

/* Ação (abrir página) — mais leve, tracejado */
.faq-opt--link { background: transparent; border-style: dashed; color: var(--text-mid); }
.faq-opt--link:hover { color: #fff; }

/* Sim / Não lado a lado */
.faq-opts--inline .faq-opt { width: auto; }
.faq-opt--sim { border-color: rgba(46,204,113,.5); }
.faq-opt--sim:hover { border-color: #2ecc71; background: rgba(46,204,113,.15); transform: none; }
.faq-opt--nao:hover { border-color: var(--text-mid); background: rgba(255,255,255,.06); transform: none; }

/* Botão de WhatsApp dentro da conversa */
.faq-opt--wa {
  background: linear-gradient(135deg, #25d366, #128c4b);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  justify-content: center;
}
.faq-opt--wa:hover { filter: brightness(1.06); transform: none; }

/* Barra de suporte fixa (sempre visível, acima da busca) */
.chat__support { padding: 8px 14px 0; }
.chat__wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #25d366, #128c4b);
  color: #fff;
  font-weight: 600;
  font-size: .86rem;
  box-shadow: 0 6px 16px rgba(18,140,75,.30);
  transition: filter .2s ease, transform .15s ease;
}
.chat__wa:hover { filter: brightness(1.06); }
.chat__wa:active { transform: scale(.98); }
.chat__wa svg { flex: 0 0 auto; }

@media (max-width: 980px) {
  body { overflow: auto; }
  .cb {
    grid-template-columns: 1fr;
    grid-template-rows: 300px 1fr;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 16px;
    gap: 16px;
  }

  .bot3d { order: -1; }
  .bot3d__text { position: static; padding: 4px 6px 0; max-width: none; }
  .bot3d__title { font-size: clamp(2rem, 9vw, 3rem); white-space: normal; }
  .bot3d__desc { display: none; }
  .bot3d__scene { min-height: 200px; }
  .chat { min-height: 70vh; }
}
@media (max-width: 520px) {
  .cb { padding: 0; gap: 0; }
  .chat { border-radius: 0; border-left: none; border-right: none; }
}
