/* Flowa — página de qualificação (agendar.html / en/book-a-call.html)
   Layout inspirado no fluxo de conversa com cabeçalho de etapas.
   O protótipo usa as mesmas classes do Typebot (.typebot-*) pra servir de referência visual. */

:root {
  --fundo: #0B0D0E;
  --fundo-fundo: #08090A;
  --superficie: #121618;
  --superficie-2: #181E21;
  --borda: #222A2E;
  --borda-forte: #313C41;
  --tinta: #EDF3F3;
  --tinta-suave: #97A5AA;
  --tinta-fraca: #7A878D;
  --acento: #47B6A7;
  --acento-tinta: #04201B;
  --marca-azul: #215783;
  --marca-claro: #71C0D5;
  --f-display: "Schibsted Grotesk", system-ui, sans-serif;
  --f-texto: "Instrument Sans", system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body {
  min-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--fundo);
  background-image: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(33, 87, 131, 0.28), transparent 70%);
  background-repeat: no-repeat;
  background-size: 100% 420px;
  background-attachment: fixed;
  color: var(--tinta);
  font-family: var(--f-texto);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* ---------- cabeçalho: marca, etapas, contador ---------- */
.q-topo[hidden] { display: none; }
.q-topo {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px clamp(16px, 4vw, 32px);
  background: rgba(8, 9, 10, 0.85);
  border-bottom: 1px solid var(--borda);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.q-marca { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.q-marca img { width: 30px; height: 30px; }
.q-marca span { color: var(--marca-claro); font-weight: 500; letter-spacing: 0.22em; font-size: 1rem; }
.q-passos {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(460px, 100%);
  margin: 0 auto;
}
.q-passos::before, .q-passos .q-linha {
  content: "";
  position: absolute;
  left: 4px; right: 4px; top: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--borda-forte);
}
.q-passos .q-linha {
  right: auto;
  width: 0;
  background: var(--acento);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.q-passos i {
  position: relative;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--fundo-fundo);
  border: 2px solid var(--borda-forte);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.q-passos i.feito { background: var(--acento); border-color: var(--acento); }
.q-passos i.agora { border-color: var(--acento); box-shadow: 0 0 0 4px rgba(71, 182, 167, 0.18); }
.q-contador { font-family: var(--f-mono); font-size: 0.8125rem; color: var(--tinta-fraca); white-space: nowrap; }
.q-contador b { font-family: var(--f-display); font-size: 1.5rem; color: var(--tinta); font-weight: 700; margin-right: 4px; font-variant-numeric: tabular-nums; }

.q-aviso {
  align-self: center;
  margin: 14px 16px 0;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px dashed var(--borda-forte);
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tinta-fraca);
}

/* ---------- área da conversa ---------- */
.q-chat {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 24px) 48px;
}
.q-chat typebot-standard { display: block; width: 100%; height: calc(100vh - 150px); height: calc(100dvh - 150px); }
/* com o bot real, ele ocupa a tela toda (o cabeçalho vem do tema do Typebot) */
.com-typebot .q-chat { max-width: none; padding: 0; }
.com-typebot .q-chat typebot-standard { height: calc(100vh - 52px); height: calc(100dvh - 52px); }

/* ---------- protótipo: mesmas classes e medidas do tema do Typebot ---------- */
.typebot-chat-view { display: flex; flex-direction: column; gap: 14px; }
.q-linha-host { display: flex; align-items: flex-end; gap: 12px; animation: q-entra 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
.q-avatar {
  flex: 0 0 40px;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--superficie-2);
  border: 1px solid var(--borda-forte);
}
.q-avatar img { width: 26px; height: 26px; }
.q-avatar.vazio { visibility: hidden; }
.typebot-host-bubble {
  max-width: min(560px, 86%);
  padding: 14px 18px;
  border-radius: 18px 18px 18px 6px;
  background: var(--superficie);
  border: 1px solid var(--borda);
  color: var(--tinta);
  font-size: 1rem;
}
.typebot-host-bubble b { color: var(--acento); font-weight: 600; }
.typebot-host-bubble.digitando { display: inline-flex; gap: 5px; padding: 18px; }
.typebot-host-bubble.digitando span { width: 7px; height: 7px; border-radius: 50%; background: var(--tinta-fraca); animation: q-pula 1s infinite ease-in-out; }
.typebot-host-bubble.digitando span:nth-child(2) { animation-delay: 0.15s; }
.typebot-host-bubble.digitando span:nth-child(3) { animation-delay: 0.3s; }

.typebot-guest-bubble {
  align-self: flex-end;
  max-width: 80%;
  padding: 12px 18px;
  border-radius: 18px 18px 6px 18px;
  background: var(--acento);
  color: var(--acento-tinta);
  font-weight: 500;
  animation: q-entra 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.q-entrada { align-self: flex-end; width: min(460px, 100%); animation: q-entra 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
.q-rotulo {
  display: block;
  margin: 4px 0 8px 4px;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tinta-fraca);
}
.typebot-input-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 20px;
  border-radius: 999px;
  background: var(--superficie);
  border: 1px solid var(--borda-forte);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.typebot-input-form:focus-within { border-color: var(--acento); box-shadow: 0 0 0 4px rgba(71, 182, 167, 0.14); }
.typebot-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--tinta);
  font: inherit;
  font-size: 1rem;
  padding: 10px 0;
}
.typebot-input::placeholder { color: var(--tinta-fraca); }
.q-enviar, .typebot-button {
  border: 0;
  cursor: pointer;
  font: inherit;
  transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}
.q-enviar {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--acento);
  color: var(--acento-tinta);
}
.q-enviar:disabled { background: var(--superficie-2); color: var(--tinta-fraca); cursor: default; }
.q-enviar svg { width: 18px; height: 18px; }
.q-erro { margin: 8px 0 0 20px; font-size: 0.8125rem; color: #F2A99E; }

.q-opcoes { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.typebot-button {
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--superficie);
  border: 1px solid var(--borda-forte);
  color: var(--tinta);
  font-weight: 500;
  font-size: 0.9375rem;
}
.typebot-button:hover { border-color: var(--acento); }
.typebot-button.selecionado { background: rgba(71, 182, 167, 0.16); border-color: var(--acento); color: var(--tinta); }
.typebot-button.principal { background: var(--acento); border-color: var(--acento); color: var(--acento-tinta); font-weight: 600; }
.typebot-button.principal:disabled { opacity: 0.45; cursor: default; }
.q-confirmar { display: flex; justify-content: flex-end; margin-top: 10px; }

.q-agenda {
  align-self: stretch;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--borda-forte);
  background: #fff;
  animation: q-entra 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.q-agenda iframe { display: block; width: 100%; height: 640px; border: 0; }
.q-agenda-vazia {
  align-self: stretch;
  padding: 28px;
  border-radius: 18px;
  border: 1px dashed var(--borda-forte);
  background: var(--superficie);
  text-align: center;
  color: var(--tinta-suave);
  font-size: 0.9375rem;
}
.q-agenda-vazia b { display: block; color: var(--tinta); font-family: var(--f-display); font-size: 1.125rem; margin-bottom: 6px; }

/* ---------- rodapé de consentimento ---------- */
.q-rodape {
  padding: 16px;
  border-top: 1px solid var(--borda);
  text-align: center;
  font-size: 0.75rem;
  color: var(--tinta-fraca);
}

@keyframes q-entra { from { opacity: 0; transform: translateY(10px); } }
@keyframes q-pula { 0%, 80%, 100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .q-linha-host, .typebot-guest-bubble, .q-entrada, .q-agenda { animation: none; }
  .typebot-host-bubble.digitando span { animation: none; }
}

@media (max-width: 640px) {
  .q-topo { grid-template-columns: auto 1fr auto; gap: 12px; padding: 12px 16px; }
  .q-marca span { display: none; }
  .q-contador b { font-size: 1.25rem; }
  .typebot-host-bubble { max-width: 100%; }
  .q-avatar { flex-basis: 32px; width: 32px; height: 32px; }
  .q-avatar img { width: 20px; height: 20px; }
  .q-entrada { width: 100%; }
}
