/* ==========================================================================
   Prosperadamente - Fluxo cadastro -> agenda -> checkout (Hotmart)
   Paleta herdada de css/style.css
   ========================================================================== */

:root {
  --bg: #FBF7F0;
  --bg-alt: #F3EBDD;
  --bg-deep: #16281F;
  --ink: #1C2620;
  --ink-soft: #47554C;
  --ink-muted: #8A7E68;
  --primary: #234C3A;
  --primary-dark: #142F23;
  --primary-light: #33684E;
  --accent: #C1683A;
  --accent-dark: #A2532B;
  --gold: #B8934B;
  --white: #FFFFFF;
  --line: rgba(28, 38, 32, 0.12);
  --line-soft: rgba(28, 38, 32, 0.07);
  --ok: #3E7A4F;
  --err: #B4402B;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --shadow-soft: 0 20px 60px -25px rgba(20, 47, 35, 0.35);
  --shadow-tight: 0 8px 24px -12px rgba(20, 47, 35, 0.3);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Topo ---------- */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  background: var(--primary-dark);
  color: #F3EEE3;
}
.top-bar .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
}
.top-bar .brand img {
  width: 40px;
  height: 40px;
  background: var(--bg);
  border-radius: 50%;
  padding: 4px;
  box-shadow: 0 2px 8px -3px rgba(0, 0, 0, 0.35);
}
.top-bar .brand strong { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
.top-bar .brand span {
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.7;
}
.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.85;
}
.secure-badge svg { width: 16px; height: 16px; }

/* ---------- Progresso ---------- */
.progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1.4rem 1rem 0.4rem;
  max-width: 640px;
  margin-inline: auto;
}
.progress .step {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
}
.progress .step .dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  background: var(--line);
  color: var(--ink-soft);
}
.progress .step.active { color: var(--primary); }
.progress .step.active .dot { background: var(--primary); color: #fff; }
.progress .step.done { color: var(--primary-light); }
.progress .step.done .dot { background: var(--primary-light); color: #fff; }
.progress .sep { width: 26px; height: 2px; background: var(--line); border-radius: 2px; }

/* ---------- Layout ---------- */
.wrap {
  max-width: 560px;
  margin: 1.5rem auto 4rem;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
}
.wrap.wide { max-width: 940px; }
.card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.5rem, 5vw, 2.6rem);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-dark);
  margin-bottom: 0.8rem;
}
.eyebrow svg { width: 15px; height: 15px; }
.section-title { font-size: clamp(1.5rem, 4.5vw, 2rem); color: var(--ink); }
.section-sub { margin-top: 0.6rem; color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Formulario ---------- */
form { margin-top: 1.6rem; }
.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}
.field input {
  width: 100%;
  padding: 0.85rem 0.95rem;
  font: inherit;
  color: var(--ink);
  background: #FCFAF5;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, background 0.15s;
}
.field input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.field input::placeholder { color: #B3AC9C; }

.btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.4rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  box-shadow: var(--shadow-tight);
  transition: transform 0.12s, background 0.15s, opacity 0.15s;
}
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; }
.btn-ghost {
  background: transparent;
  color: var(--primary);
  box-shadow: none;
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { background: var(--bg-alt); }

.fine-note {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.fine-note svg { width: 15px; height: 15px; flex-shrink: 0; }

.msg {
  display: none;
  margin: 0.4rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  background: #FBE9E2;
  color: var(--err);
  border: 1px solid #F0C7B9;
}
.msg.show { display: block; }

/* ---------- Estados ---------- */
.state-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2rem 1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  text-align: center;
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(35, 76, 58, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Calendario ---------- */
.cal { margin-top: 1.4rem; }
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}
.cal-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}
.cal-title::first-letter { text-transform: uppercase; }
.cal-nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  background: var(--bg-alt);
  color: var(--primary);
}
.cal-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-muted);
  padding: 0.3rem 0;
  text-transform: uppercase;
}
.cal-day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
  background: transparent;
}
.cal-day.empty { background: transparent; cursor: default; }
.cal-day.avail {
  background: #EAF1EA;
  color: var(--primary);
  font-weight: 700;
}
.cal-day.avail:hover { background: #DBE8DB; }
.cal-day.selected { background: var(--primary); color: #fff; }
.cal-day:disabled { cursor: default; }
.cal-hint {
  margin-top: 0.8rem;
  font-size: 0.83rem;
  color: var(--ink-muted);
  text-align: center;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 0.5rem;
  margin: 1rem 0 1.4rem;
}
.time-btn {
  padding: 0.65rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  background: #EAF1EA;
  border: 1.5px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}
.time-btn:hover { background: #DBE8DB; }
.time-btn.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary-dark);
}

/* ---------- Checkout / resumo ---------- */
.slot-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1.2rem 0 0.4rem;
  padding: 0.85rem 1rem;
  background: #EAF1EA;
  border: 1px solid #CFE0CF;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}
.slot-box svg { width: 18px; height: 18px; flex-shrink: 0; }
.slot-box a {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-dark);
  text-decoration: underline;
}
.hold-timer {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  text-align: center;
}
.hold-timer strong { color: var(--accent-dark); }

.included {
  margin: 1.4rem 0;
  padding: 1.2rem 1.3rem;
  background: #FAF6EE;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}
.included h3 { font-size: 1rem; margin-bottom: 0.7rem; }
.included li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.32rem 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.included li svg { width: 17px; height: 17px; margin-top: 2px; flex-shrink: 0; }

.hotmart-slot { margin-top: 1.6rem; }
.hotmart-embed {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #FCFAF5;
  min-height: 520px;
}
.hotmart-embed iframe {
  width: 100%;
  height: 1180px;
  border: 0;
  display: block;
}
.hotmart-embed-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.hotmart-fallback {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  text-align: center;
}
.hotmart-fallback a { color: var(--accent-dark); font-weight: 600; text-decoration: underline; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
}
.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
}
.trust-row svg { width: 15px; height: 15px; }

/* ---------- Resultado / rodape ---------- */
.result { display: none; text-align: center; padding: 1rem 0; }
.result.show { display: block; }
.result .icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #E7F0E7;
  display: grid;
  place-items: center;
}
.result .icon-wrap svg { width: 32px; height: 32px; }
.result h2 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.result p { color: var(--ink-soft); font-size: 0.95rem; }

.page-foot {
  text-align: center;
  padding: 1.5rem 1rem 3rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.page-foot a { color: var(--accent-dark); font-weight: 600; }

@media (max-width: 620px) {
  .wrap.wide { max-width: 560px; }
}
