/* ============================================================
   COMPONENTS — buttons, cards, checklist, badges, FAQ, modal,
   toasts, sticky CTA. Reusable across sections.
   ============================================================ */

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--card-raised);
  --btn-fg: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: var(--step-0);
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  position: relative;
  overflow: hidden;
  /* Wrap long labels instead of forcing a single line — a long block CTA
     (e.g. the DM-receipt button) would otherwise blow out narrow columns. */
  white-space: normal;
  text-align: center;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t) var(--ease),
              filter var(--t-fast) var(--ease);
  will-change: transform;
}
.btn i { width: 1.15em; height: 1.15em; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: 60ms; }

.btn--sm { padding: 0.6rem 1.05rem; font-size: var(--step--1); }
.btn--lg { padding: 1.15rem 2.2rem; font-size: var(--step-1); border-radius: var(--r); }
.btn--block { width: 100%; }

.btn--gold {
  --btn-bg: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  --btn-fg: #2a1c08;
  box-shadow: var(--glow-gold), var(--shadow);
}
.btn--gold:hover { box-shadow: var(--glow-gold-strong), var(--shadow-lg); }

.btn--green {
  --btn-bg: linear-gradient(135deg, var(--green), var(--green-deep));
  --btn-fg: #06251a;
  box-shadow: var(--glow-green), var(--shadow);
}
.btn--green:hover { box-shadow: 0 0 64px rgba(70,201,138,0.55), var(--shadow-lg); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--gold); }

/* Shimmer sweep on shining CTAs */
.btn--shine::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -75%;
  width: 45%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
  animation: sweep 3.2s var(--ease) infinite;
}
@media (prefers-reduced-motion: reduce) { .btn--shine::after { display: none; } }

/* Checkout button progress states — only the non-[hidden] one shows.
   Using :not([hidden]) so the UA `[hidden]{display:none}` actually wins. */
.btn__label, .btn__progress, .btn__done { align-items: center; gap: 0.5rem; }
.btn__label:not([hidden]),
.btn__progress:not([hidden]),
.btn__done:not([hidden]) { display: inline-flex; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(6,37,26,0.35);
  border-top-color: #06251a;
  animation: spin 0.7s linear infinite;
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

/* ---------- Checklist ---------- */
/* The bullet marker is absolutely positioned (not a flex sibling) so that
   inline <strong> inside an item keeps flowing with the rest of the text
   instead of becoming its own flex column. */
.checklist { display: grid; gap: 0.7rem; }
.checklist li { position: relative; padding-left: 1.85rem; line-height: 1.5; }
.checklist li::before {
  position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px;
  border-radius: 6px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800;
}
.checklist--check li::before {
  content: "✓"; color: var(--green);
  background: rgba(70,201,138,0.12);
  border: 1px solid rgba(70,201,138,0.28);
}
.checklist--x li::before {
  content: "✕"; color: var(--red);
  background: rgba(226,97,90,0.1);
  border: 1px solid rgba(226,97,90,0.25);
}

/* ---------- FAQ (native <details>, zero JS dependency) ---------- */
.faq { display: grid; gap: 0.75rem; }
.faq__item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color var(--t) var(--ease);
}
.faq__item[open] { border-color: rgba(240,169,59,0.35); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.4rem;
  font-weight: 600;
  font-size: var(--step-0);
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__icon { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; transition: transform var(--t) var(--ease); }
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__a { padding: 0 1.4rem 1.3rem; color: var(--muted); }
.faq__item[open] .faq__a { animation: fade-up var(--t-slow) var(--ease); }

/* ---------- Modal (exit intent) ---------- */
.modal { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 1.25rem; }
.modal[hidden] { display: none; }
.modal__overlay { position: absolute; inset: 0; background: rgba(8,6,4,0.82); backdrop-filter: blur(6px); }
.modal__box {
  position: relative;
  width: 100%;
  max-width: min(440px, 100%);
  max-height: calc(100dvh - 2.5rem);
  overflow-y: auto;
  text-align: center;
  background: var(--card);
  border: 1px solid rgba(240,169,59,0.3);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 5vw, 2.6rem);
  box-shadow: var(--shadow-lg), var(--glow-gold);
  animation: pop-in var(--t-slow) var(--ease-spring);
}
.modal__close {
  position: absolute; top: 0.9rem; right: 0.9rem;
  width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center;
  color: var(--muted); border: 1px solid var(--border);
  transition: color var(--t-fast), background var(--t-fast);
}
.modal__close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.modal__close i { width: 16px; height: 16px; }
.modal__badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: var(--step--1); font-weight: 700;
  color: var(--red);
  background: rgba(226,97,90,0.1);
  border: 1px solid rgba(226,97,90,0.25);
  padding: 0.4rem 0.9rem; border-radius: var(--r-pill);
  margin-bottom: 1rem;
}
.modal__badge i { width: 14px; height: 14px; }
.modal__title { font-size: var(--step-2); margin-bottom: 0.6rem; }
.modal__box > p { color: var(--muted); margin-bottom: 1rem; }
.modal__timer {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  margin-bottom: 1.3rem;
}
.modal__decline {
  display: block; width: 100%;
  margin-top: 0.9rem;
  font-size: var(--step--1);
  color: var(--muted-2);
  text-decoration: underline;
}
.modal__decline:hover { color: var(--muted); }

/* ---------- Mobile sticky CTA ---------- */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  padding-bottom: calc(0.7rem + env(safe-area-inset-bottom));
  background: rgba(26,22,18,0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-strong);
  box-shadow: 0 -8px 24px rgba(0,0,0,0.35);
  transform: translateY(100%);
  transition: transform var(--t) var(--ease);
  color: #fdfbf7;
}
.sticky-cta.is-shown { transform: translateY(0); }
.sticky-cta__price { font-size: var(--step-0); display: flex; flex-direction: column; gap: 0.1rem; }
.sticky-cta__price s { margin-right: 0.4rem; color: rgba(253,251,247,0.55); }
.sticky-cta__price strong { color: var(--gold-bright); font-size: var(--step-1); }
.sticky-cta__price em { color: rgba(253,251,247,0.6); font-style: normal; }
.sticky-cta__timer {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.72rem; font-weight: 700; color: rgba(253,251,247,0.7);
  font-variant-numeric: tabular-nums;
}
.sticky-cta__timer i { width: 11px; height: 11px; color: var(--gold-bright); }
.sticky-cta__actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.sticky-cta__proof {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.28);
  color: var(--text);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.sticky-cta__proof:hover { border-color: var(--gold); background: rgba(255,255,255,0.06); }
.sticky-cta__proof i { width: 17px; height: 17px; }

@media (max-width: 760px) {
  .sticky-cta:not([hidden]) { display: flex; }
}
