/* --------------------------------------------------------
   Vida Com Cristo Quiz — tema fiel ao original do Inlead
   themeColor #fbbf24 | bg #fff7ed | title #422006 | text #451a03
-------------------------------------------------------- */

:root {
  --theme: #fbbf24;
  --theme-dark: #d97706;
  --bg: #fff7ed;
  --surface: #fff;
  --title: #422006;
  --text: #451a03;
  --muted: #78716c;
  --danger-bg: #fef2f2;
  --danger-border: #ef4444;
  --danger-text: #991b1b;
  --success-bg: #f0fdf4;
  --success-border: #22c55e;
  --success-text: #166534;
  --info-bg: #fffbeb;
  --info-border: #f59e0b;
  --info-text: #92400e;
  --shadow: 0 1px 2px rgba(66,32,6,.06), 0 8px 24px rgba(66,32,6,.08);
  --shadow-lg: 0 4px 8px rgba(66,32,6,.08), 0 16px 40px rgba(66,32,6,.12);
  --radius: 1rem;
  --radius-lg: 1.25rem;
  --max: 640px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#app {
  width: 100%;
  max-width: var(--max);
  padding: 16px 16px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* topbar */
.topbar {
  position: relative;
  margin: -16px -16px 0;
  padding: 14px 16px 12px;
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  gap: 12px;
}

/* Topbar flame — luz crescente conforme avança no quiz */
.topbar-flame {
  position: absolute;
  top: 14px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: calc(0.25 + var(--step-progress, 0) * 0.75);
  filter: drop-shadow(0 0 calc(2px + var(--step-progress, 0) * 14px) rgba(251, 191, 36, calc(0.4 + var(--step-progress, 0) * 0.6)));
  transition: opacity .5s ease, filter .5s ease;
  color: #f59e0b;
}
.topbar-flame .flame-glow { color: #fbbf24; }
.topbar-flame .flame-core {
  transform-origin: 50% 75%;
  animation: vcc-flame-flicker 2.4s ease-in-out infinite;
}
@keyframes vcc-flame-flicker {
  0%, 100% { transform: scaleY(1); }
  45% { transform: scaleY(.93) translateY(.5px); }
  72% { transform: scaleY(1.04); }
}
.topbar .logo { grid-column: 2; justify-self: center; }
.topbar .logo img { display: block; height: 44px; width: auto; }
.back {
  background: transparent;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: var(--title);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s;
}
.back:hover { background: rgba(66,32,6,.06); }
.back[hidden] { visibility: hidden; display: grid; }

.topbar-progress {
  grid-column: 1 / -1;
  height: 4px;
  background: rgba(251,191,36,.18);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
#progress-bar {
  height: 100%;
  width: 0;
  background: var(--theme);
  border-radius: 999px;
  transition: width .35s ease;
}

/* step container */
.step {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fade .25s ease;
}
@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* layers */
.layer-text { color: var(--text); }
.layer-text h1, .layer-text h2, .layer-text h3 {
  color: var(--title);
  margin: 0;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.layer-text h1 { font-size: clamp(1.75rem, 6vw, 2.15rem); line-height: 1.2; }
.layer-text h2 { font-size: clamp(1.5rem, 5.2vw, 1.85rem); line-height: 1.25; }
.layer-text h3 { font-size: 1.2rem; font-weight: 700; }
.layer-text p { margin: .55em 0; }
.layer-text ul { padding-left: 1.25em; margin: .55em 0; }
.layer-text ul li { margin: .5em 0; line-height: 1.55; }
.layer-text strong { color: var(--title); }
.layer-text .ql-align-center { text-align: center; }
.layer-text .ql-size-large { font-size: 1.5em; line-height: 1.25; }

.layer-image {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(0,0,0,.04);
}
.layer-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.layer-clear { display: block; }

/* alert */
.layer-alert {
  border-radius: var(--radius);
  padding: 14px 16px;
  border-left: 4px solid var(--info-border);
  background: var(--info-bg);
  color: var(--info-text);
}
.layer-alert.danger  { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger-text); }
.layer-alert.success { border-color: var(--success-border); background: var(--success-bg); color: var(--success-text); }
.layer-alert p { margin: .3em 0; }
.layer-alert strong { color: inherit; }

/* options (choices) */
.layer-options {
  display: grid;
  gap: 12px;
}
.layer-options.cols-2 { grid-template-columns: 1fr 1fr; }
.option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 16px 18px;
  min-height: 64px;
  text-align: left;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.option:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); border-color: var(--theme); }
.option:active { transform: translateY(0); }
.option.selected { border-color: var(--theme); background: #fffbeb; }
.option .emoji {
  font-size: 1.7rem;
  line-height: 1;
  flex: 0 0 auto;
}
.option .label { flex: 1; }
.option .label p { margin: 0; }
.option .check {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid #e7e5e4;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: background .15s, border-color .15s;
}
.option.selected .check {
  background: var(--theme);
  border-color: var(--theme);
  color: var(--title);
}

/* field (input) */
.layer-field { display: flex; flex-direction: column; gap: 8px; }
.layer-field label { font-weight: 600; color: var(--title); }
.layer-field input {
  width: 100%;
  height: 60px;
  padding: 0 18px;
  background: var(--surface);
  border: 2px solid #fed7aa;
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
  box-shadow: var(--shadow);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.layer-field input:focus {
  border-color: var(--theme);
  box-shadow: 0 0 0 4px rgba(251,191,36,.25);
}

/* button */
.layer-button { display: flex; justify-content: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 62px;
  padding: 14px 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--theme);
  color: var(--title);
  font: inherit;
  font-weight: 800;
  font-size: 1.18rem;
  line-height: 1.2;
  letter-spacing: .01em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 0 0 var(--theme-dark), var(--shadow);
  transition: transform .08s ease, box-shadow .12s ease, background .15s;
  text-decoration: none;
}
.btn:hover { background: #fcd34d; }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 0 var(--theme-dark), var(--shadow); }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: var(--shadow); transform: none; }
.btn.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 0 0 var(--theme-dark), 0 0 0 0 rgba(251,191,36,.55); }
  50%      { box-shadow: 0 4px 0 0 var(--theme-dark), 0 0 0 14px rgba(251,191,36,0); }
}

/* loading */
.layer-loading {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.layer-loading .title {
  font-weight: 700;
  color: var(--title);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.layer-loading .desc { color: var(--muted); font-size: .92rem; margin-bottom: 12px; }
.layer-loading .desc p { margin: 0; }
.layer-loading .bar {
  height: 10px;
  background: rgba(251,191,36,.18);
  border-radius: 999px;
  overflow: hidden;
}
.layer-loading .fill {
  height: 100%;
  width: 0;
  background: var(--theme);
  border-radius: 999px;
  transition: width .2s linear;
}
.layer-loading .pct { font-variant-numeric: tabular-nums; color: var(--theme-dark); }

/* arguments (grid of cards) */
.layer-arguments {
  display: grid;
  gap: 12px;
}
.layer-arguments.cols-2 { grid-template-columns: 1fr 1fr; }
.argument {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.argument .emoji { font-size: 2rem; line-height: 1; }
.argument .arg-text { font-size: .95rem; }
.argument .arg-text p { margin: 0; }

/* metric (progress dot row) */
.layer-metric {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
}
.layer-metric .m-title { font-weight: 700; color: var(--title); }
.layer-metric .m-pct {
  color: var(--success-text);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.layer-metric .m-pct .dot {
  width: 10px; height: 10px;
  background: #22c55e;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(34,197,94,.18);
}
.layer-metric .m-bar {
  grid-column: 1 / -1;
  height: 6px;
  background: rgba(34,197,94,.18);
  border-radius: 999px;
  overflow: hidden;
}
.layer-metric .m-bar .m-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 999px;
  transition: width .8s ease;
}

/* error message under field */
.field-error {
  color: var(--danger-text);
  font-size: .9rem;
  margin: 4px 2px 0;
  min-height: 1.2em;
}

/* utility */
[hidden] { display: none !important; }

@media (max-width: 380px) {
  .layer-options.cols-2 { grid-template-columns: 1fr; }
  .layer-arguments.cols-2 { grid-template-columns: 1fr; }
}

/* site footer — política / disclaimer / contato */
.site-footer {
  width: 100%;
  background: #fff7ed;
  border-top: 1px solid rgba(120, 53, 15, .12);
  padding: 28px 16px 36px;
  margin-top: 32px;
  color: #57534e;
  font-size: .82rem;
  line-height: 1.55;
  text-align: center;
}
.site-footer .footer-inner {
  max-width: 640px;
  margin: 0 auto;
}
.site-footer .footer-brand {
  margin: 0 0 12px;
  color: #422006;
}
.site-footer .footer-disclaimer {
  margin: 0 0 14px;
  font-size: .78rem;
  color: #78716c;
}
.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 8px;
  margin: 0 0 12px;
}
.site-footer .footer-links a {
  color: #92400e;
  text-decoration: underline;
}
.site-footer .footer-links span {
  color: #d6d3d1;
}
.site-footer .footer-refund {
  margin: 0;
  font-size: .76rem;
  color: #78716c;
}

/* ============================================================ */
/* Live activity toast (social-proof.js)                        */
/* ============================================================ */
.vcc-toast-root {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
.vcc-toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 320px;
  max-width: 100%;
  padding: 10px 12px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(66, 32, 6, 0.18), 0 2px 6px rgba(66, 32, 6, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}
.vcc-toast.vcc-toast-show {
  opacity: 1;
  transform: translateY(0);
}
.vcc-toast.vcc-toast-hide {
  opacity: 0;
  transform: translateY(8px);
}
.vcc-toast-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #422006;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
}
.vcc-toast-body { min-width: 0; }
.vcc-toast-name {
  font-weight: 700;
  color: #422006;
  font-size: .92rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vcc-toast-event {
  font-size: .82rem;
  color: #78716c;
  line-height: 1.3;
  margin-top: 1px;
}
.vcc-toast-close {
  background: transparent;
  border: 0;
  font-size: 18px;
  color: #a8a29e;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
.vcc-toast-close:hover { color: #422006; }

/* ============================================================ */
/* Countdown 15min no step 21 (step21-enhance.js)               */
/* ============================================================ */
.vcc-countdown-wrap {
  margin: 16px 0;
}
.vcc-countdown {
  background: #fef2f2;
  border: 2px solid #ef4444;
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: vcc-countdown-pulse 2.6s ease-in-out infinite;
}
.vcc-countdown-label {
  font-size: .92rem;
  font-weight: 700;
  color: #991b1b;
  letter-spacing: .01em;
}
.vcc-countdown-time {
  font: 700 2rem/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  color: #991b1b;
}
@keyframes vcc-countdown-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35); }
  50%      { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

/* ============================================================ */
/* Bônus checkmark sequencial (step21-enhance.js)               */
/* ============================================================ */
.vcc-bonus-list,
.layer-text ul.vcc-bonus-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vcc-bonus-list li,
.layer-text ul.vcc-bonus-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f0fdf4;
  border: 2px solid #86efac;
  border-radius: 12px;
  padding: 12px 14px;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity .45s ease, transform .45s ease;
  position: relative;
  font-weight: 600;
  color: #166534;
  margin: 0;
}
.vcc-bonus-list li.vcc-bonus-show,
.layer-text ul.vcc-bonus-list li.vcc-bonus-show {
  opacity: 1;
  transform: translateX(0);
}
.vcc-bonus-list li::before,
.layer-text ul.vcc-bonus-list li::before {
  content: "✓";
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
}

/* ============================================================ */
/* CTA principal único + link discreto no step 21                */
/* ============================================================ */
.vcc-cta-secondary {
  text-align: center;
  margin: 12px 0 0;
  font-size: .92rem;
}
.vcc-cta-secondary a {
  color: #92400e;
  text-decoration: underline;
}

.layer-alert.vcc-flash {
  animation: vcc-flash 1.6s ease-out;
}
@keyframes vcc-flash {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); transform: scale(1); }
  30%  { box-shadow: 0 0 0 12px rgba(34, 197, 94, .25); transform: scale(1.02); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); transform: scale(1); }
}
