/* ==========================================================================
   quiz.css — tema base do funil de quiz
   As cores vêm de config/brand.json (injetadas como variáveis CSS).
   Você pode sobrescrever qualquer coisa aqui sem tocar no motor.
   ========================================================================== */

:root {
  --fq-primary: #5B5BD6;
  --fq-primary-hover: #4A4AC4;
  --fq-accent: #22C55E;
  --fq-bg: #FFFFFF;
  --fq-surface: #F6F6FB;
  --fq-border: #E6E6EF;
  --fq-text: #18181B;
  --fq-muted: #71717A;
  --fq-radius: 16px;
  --fq-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: var(--fq-font);
  color: var(--fq-text);
  background: var(--fq-bg);
  -webkit-font-smoothing: antialiased;
}

#quiz-root {
  width: 100%;
  max-width: var(--fq-maxwidth, 560px);
}

/* ---- Logo -------------------------------------------------------------- */
.fq-logo { text-align: center; margin-bottom: 18px; }
.fq-logo img { height: 30px; width: auto; }

/* ---- Progresso --------------------------------------------------------- */
.fq-progress-wrap { margin-bottom: 16px; min-height: 6px; }
.fq-progress {
  height: 6px;
  background: var(--fq-border);
  border-radius: 999px;
  overflow: hidden;
}
.fq-progress-fill {
  height: 100%;
  background: var(--fq-primary);
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* ---- Card -------------------------------------------------------------- */
.fq-card {
  background: var(--fq-surface);
  border: 1px solid var(--fq-border);
  border-radius: var(--fq-radius);
  padding: 32px 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  animation: fqIn 0.35s ease;
}
@keyframes fqIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fq-title { font-family: var(--fq-font-heading, var(--fq-font)); font-size: 1.6rem; line-height: 1.25; margin: 0 0 12px; }
.fq-question { font-family: var(--fq-font-heading, var(--fq-font)); font-size: 1.35rem; line-height: 1.3; margin: 6px 0 18px; }
.fq-sub { color: var(--fq-muted); font-size: 1.02rem; margin: 0 0 22px; line-height: 1.5; }
.fq-help { color: var(--fq-muted); font-size: 0.9rem; margin: -10px 0 18px; }
.fq-disclaimer { color: var(--fq-muted); font-size: 0.85rem; text-align: center; margin: 16px 0 0; }
.fq-muted { color: var(--fq-muted); }

.fq-spin {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fq-primary);
  background: color-mix(in srgb, var(--fq-primary) 12%, transparent);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.fq-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: var(--fq-accent);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* ---- Opções ------------------------------------------------------------ */
.fq-options { display: flex; flex-direction: column; gap: 10px; }
.fq-options--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fq-option {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-size: 1rem;
  padding: 16px 18px;
  border: 1.5px solid var(--fq-border);
  border-radius: 12px;
  background: var(--fq-bg);
  color: var(--fq-text);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s, background 0.15s;
}
.fq-option:hover { border-color: var(--fq-primary); transform: translateY(-1px); }
.fq-option.selected { border-color: var(--fq-primary); background: color-mix(in srgb, var(--fq-primary) 8%, var(--fq-bg)); }
.fq-emoji { font-size: 1.4rem; line-height: 1; flex-shrink: 0; }
.fq-option-label { flex: 1; }

/* Opções com imagem (ex.: layout em grade) */
.fq-option--image { flex-direction: column; align-items: stretch; text-align: center; padding: 12px; }
.fq-option--image .fq-option-label { flex: none; }
.fq-option-img { width: 100%; height: 110px; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }

/* ---- Botões ------------------------------------------------------------ */
.fq-btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 16px 20px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.fq-btn:active { transform: scale(0.99); }
.fq-btn-primary { background: var(--fq-primary); color: #fff; }
.fq-btn-primary:hover { background: var(--fq-primary-hover); }
.fq-btn-accent { background: var(--fq-accent); color: #fff; }
.fq-btn-accent:hover { filter: brightness(0.95); }
.fq-continue { margin-top: 18px; }

.fq-back {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: none;
  color: var(--fq-muted);
  font-size: 0.9rem;
  cursor: pointer;
}
.fq-back:hover { color: var(--fq-text); }

/* ---- Formulário (lead) ------------------------------------------------- */
.fq-form { display: flex; flex-direction: column; gap: 14px; }
.fq-field { display: flex; flex-direction: column; gap: 6px; }
.fq-label { font-size: 0.9rem; font-weight: 500; }
.fq-field input {
  font-size: 1rem;
  padding: 13px 14px;
  border: 1.5px solid var(--fq-border);
  border-radius: 10px;
  background: var(--fq-bg);
  color: var(--fq-text);
  font-family: inherit;
}
.fq-field input:focus { outline: none; border-color: var(--fq-primary); }
.fq-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--fq-muted);
  line-height: 1.4;
}
.fq-consent input { margin-top: 3px; }

/* ---- Sim/Não ----------------------------------------------------------- */
.fq-options--bool { flex-direction: row; gap: 12px; }
.fq-options--bool .fq-option { flex: 1; justify-content: center; text-align: center; }

/* ---- Input numérico ---------------------------------------------------- */
.fq-number {
  font-size: 1rem; padding: 13px 14px; width: 100%;
  border: 1.5px solid var(--fq-border); border-radius: 10px;
  background: var(--fq-bg); color: var(--fq-text); font-family: inherit;
}
.fq-number:focus { outline: none; border-color: var(--fq-primary); }

/* ---- Calculadora ------------------------------------------------------- */
.fq-calc-result {
  margin-top: 16px; padding: 16px 18px;
  background: color-mix(in srgb, var(--fq-primary) 8%, var(--fq-bg));
  border: 1px solid var(--fq-border); border-radius: 12px;
  font-size: 1.1rem; font-weight: 600; text-align: center; line-height: 1.4;
}

/* ---- Slider ------------------------------------------------------------ */
.fq-slider-wrap { margin: 8px 0 4px; }
.fq-slider { width: 100%; accent-color: var(--fq-primary); height: 6px; }
.fq-slider-value { text-align: center; font-size: 2rem; font-weight: 800; color: var(--fq-primary); margin-bottom: 10px; }
.fq-slider-labels { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--fq-muted); margin-top: 8px; }

/* ---- Divisor (diagnóstico × oferta) ------------------------------------ */
.fq-div { border: none; border-top: 1px solid var(--fq-border); margin: 22px 0; }

/* ---- Responsivo -------------------------------------------------------- */
@media (max-width: 480px) {
  .fq-card { padding: 24px 18px; }
  .fq-title { font-size: 1.4rem; }
  .fq-question { font-size: 1.2rem; }
}
