/* ============================================================
   checkout.html — page-specific styles
   Loads after styles.css (shared tokens, top-bar, site-header, footer).
   ============================================================ */

/* Base reset, :root variables, body defaults, top-bar, site-header,
   and footer now live in styles.css (shared across all pages). */

/* Note: checkout.html's top bar is plain text (no <a>), so no
   .top-bar a override is needed here — unlike index.css, which does
   have a link inside its top bar. */

/* ── MAIN LAYOUT ── */
.checkout-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 65px 24px 65px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

/* ── LEFT COLUMN — FORM ── */
.checkout-form-col {}

.section-block {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 28px 30px;
  margin-bottom: 20px;
}

.section-block__title {
  font-family: var(--font-d);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}
.section-block__sub {
  font-size: 13.5px;
  color: var(--stone);
  margin-bottom: 20px;
}

/* Step badge */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  margin-right: 10px;
  flex-shrink: 0;
  vertical-align: middle;
}
.block-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
/* Extra top spacing for the Step 2 (Payment) header, which sits inside
   the same form block as Step 1 rather than its own .section-block.
   Was previously an inline style="" attribute in checkout.html; moved
   here so style-src can drop 'unsafe-inline'. */
.block-header--spaced {
  margin-top: 18px;
  padding-top: 24px;
}
.block-header-text {}
.block-header-text .section-block__title { margin-bottom: 0; }
.block-header-text .section-block__sub { margin-bottom: 0; margin-top: 2px; }

/* Form fields */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.field input {
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 11px 13px;
  font-family: var(--font-b);
  font-size: 15px;
  color: var(--ink);
  background: var(--cream);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.field input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(92,123,106,.14);
  background: var(--white);
}
.field input.has-error { border-color: var(--danger); }
.field input::placeholder { color: #bbb; }
.field-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 5px;
  display: none;
}
.field-error.show { display: block; }

/* Stripe payment element container.
   margin-bottom was previously overridden to 12px by an inline style=""
   attribute in checkout.html (inline styles win over stylesheet rules
   regardless of selector specificity); folded that value in directly
   here so the inline attribute could be removed and style-src can drop
   'unsafe-inline'. */
#payment-element {
  margin-bottom: 12px;
}
#card-errors {
  font-size: 13px;
  color: var(--danger);
  margin-top: 8px;
  min-height: 18px;
}

/* ── CONSENT CHECKBOX ── */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
}
.consent-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--sage);
  cursor: pointer;
}
.consent-row label {
  font-size: 13.5px;
  color: var(--ink-mid);
  line-height: 1.5;
  cursor: pointer;
}
.consent-row + .field-error {
  margin-top: 6px;
}

/* ── SUBMIT BUTTON ── */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--sage);
  color: var(--white);
  font-family: var(--font-b);
  font-size: 17px;
  font-weight: 700;
  padding: 17px 40px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 10px;
  text-align: center;
}
.btn-submit:hover:not(:disabled) { background: var(--sage-dark); }
.btn-submit:disabled { background: #aaa; cursor: not-allowed; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.submit-sub {
  text-align: center;
  font-size: 13px;
  color: var(--stone);
  margin-top: 10px;
}

/* ── SECURE BADGES ── */
.secure-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--stone);
  margin-top: 16px;
}
.secure-row svg { flex-shrink: 0; }

/* ── RIGHT COLUMN — ORDER SUMMARY ── */
.order-summary {
  position: sticky;
  top: 24px;
}

.summary-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}

.summary-header {
  background: var(--sage);
  padding: 20px 24px;
}
.summary-header__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 4px;
}
.summary-header__name {
  font-family: var(--font-d);
  font-size: 20px;
  font-weight: 500;
  color: var(--white);
  line-height: 1.2;
}

.summary-body { padding: 22px 24px; }

.price-display {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 14px;
}
.price-display__amount {
  font-family: var(--font-d);
  font-size: 48px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
}
.price-display__period {
  font-size: 14px;
  color: var(--stone);
}
.price-anchor {
  display: inline-block;
  background: var(--sage-light);
  color: var(--sage);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.summary-divider {
  height: 1px;
  background: var(--rule);
  margin: 16px 0;
}

/* .includes-list / .check base now lives in styles.css (shared with
   index.html). This sidebar card needs a slightly smaller variant. */
.includes-list { margin-bottom: 20px; }
.order-summary .includes-list li { gap: 10px; font-size: 14.5px; line-height: 1.45; }
.order-summary .includes-list li .check { width: 18px; height: 18px; font-size: 10px; }

/* .bonus-strip base now lives in styles.css (shared with thank-you.html).
   This card only needs tighter outer spacing to fit the sidebar. */
.bonus-strip { padding: 14px 16px; margin-bottom: 16px; }

.guarantee-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.4;
}
.guarantee-strip__icon {
  font-size: 22px;
  flex-shrink: 0;
}

/* ── TRUST QUOTES below form ── */
.trust-mini {
  margin-top: 8px;
}
.trust-mini__label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 12px;
  text-align: center;
}
.trust-mini__quotes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.trust-mini__quote {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 14px 16px;
}
.trust-mini__stars {
  color: var(--yellow);
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 5px;
}
.trust-mini__text {
  font-size: 13.5px;
  color: var(--ink-mid);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 6px;
}
.trust-mini__name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

/* Footer styling now lives in styles.css */

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .checkout-wrap {
    grid-template-columns: 1fr;
    padding: 16px 16px 48px;
  }
  .order-summary { position: static; order: -1; }
  .field-row { grid-template-columns: 1fr; }
  .section-block { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}
