/* Thrivecart-style checkout palette */
:root {
  --bg: #ECECEC;
  --form-bg: #ffffff;
  --sidebar-bg: #dbe5ee;
  --ink: #102E47;
  --text: #1a1a1a;
  --muted: #6b7280;
  --line: #DDE2E9;
  --green: #37BF94;
  --green-dark: #2ED5A0;
  --red: #F43507;
  --link: #5CA0E4;
}

* { box-sizing: border-box; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  font-size: 14px;
}

/* ================= CHECKOUT PAGE ================= */

.checkout-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 0;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

/* LEFT — form column */
.checkout-form-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-card {
  background: var(--form-bg);
  padding: 32px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(16, 46, 71, 0.06);
}

.form-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 20px;
}

.whop-embed-area {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 4px;
  background: #fafbfc;
  padding: 32px 16px;
  margin-bottom: 24px;
}

.embed-placeholder {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}
.embed-placeholder p { margin: 4px 0; }

/* Customer / Payment tabs */
.checkout-tabs {
  display: flex;
  justify-content: center;
  gap: 36px;
  border-bottom: 1px solid var(--line);
  margin: 8px 0 28px;
}
.tab {
  background: transparent;
  border: none;
  padding: 12px 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  position: relative;
  margin-bottom: -1px;
}
.tab.tab-active {
  color: var(--green);
  font-weight: 700;
}
.tab.tab-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--green);
}

/* Order bump — CSS dashed border (renders evenly across all sides) */
.order-bump {
  border: 3px dashed var(--green);
  border-radius: 6px;
  padding: 24px 28px;
  margin-bottom: 24px;
  transition: background-color 0.2s ease;
}
.order-bump.selected {
  background-color: rgba(55, 191, 148, 0.05);
}

.bump-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 16px;
}

.bump-title {
  font-size: 20px;
  font-weight: 700;
  color: #000;
  line-height: 1.3;
  margin: 0;
  flex: 1;
}

/* Toggle wrap (arrow + switch) */
.bump-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Blinking red arrow (SVG) */
.bump-arrow {
  display: inline-block;
  flex-shrink: 0;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Toggle switch */
.bump-toggle {
  position: relative;
  width: 56px;
  height: 32px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-block;
  flex-shrink: 0;
}

.bump-toggle-track {
  position: absolute;
  top: 6px; left: 0;
  width: 56px;
  height: 20px;
  background: #d6dadf;
  border-radius: 100px;
  transition: background 0.2s ease;
}

.bump-toggle-thumb {
  position: absolute;
  top: 0; left: 0;
  width: 32px;
  height: 32px;
  background: #aeb3b9;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.18);
  transition: transform 0.2s ease, background 0.2s ease;
}

.bump-toggle[aria-checked="true"] .bump-toggle-track {
  background: #a7e0c9;
}
.bump-toggle[aria-checked="true"] .bump-toggle-thumb {
  transform: translateX(24px);
  background: var(--green);
}

.bump-cta {
  font-size: 15px;
  color: #000;
  margin: 0 0 6px;
}
.bump-cta strong { color: #000; font-weight: 700; }

.bump-disclaimer {
  font-size: 15px;
  color: #000;
  margin: 0 0 18px;
}

.bump-list {
  margin: 0;
  padding-left: 20px;
}
.bump-list li {
  font-size: 14px;
  line-height: 1.55;
  color: #000;
  margin-bottom: 12px;
}
.bump-list li strong { color: #000; }
.bump-list li:last-child { margin-bottom: 0; }

/* Continue button */
.continue-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.continue-btn {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, transform 0.15s ease;
}
.continue-btn:hover { background: var(--green-dark); transform: translateY(-1px); }

/* Trust badges — inside form card, smaller (image is 580x163 source) */
.trust-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 0 8px;
  align-items: center;
}

.trust-badge-img {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
}

.legal-microcopy {
  font-size: 11px;
  color: var(--muted);
  text-align: left;
  line-height: 1.5;
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.legal-microcopy a { color: var(--link); text-decoration: underline; }

/* RIGHT — summary column */
.checkout-summary-col {
  background: var(--sidebar-bg);
  padding: 32px 28px;
  border-radius: 4px;
  position: sticky;
  top: 24px;
}

.summary-headline {
  font-size: 28px;
  font-weight: 700;
  color: #000;
  line-height: 1.2;
  margin: 0 0 22px;
  letter-spacing: -0.3px;
}

.discount-text {
  font-size: 17px;
  font-weight: 600;
  color: #000;
  line-height: 1.4;
  margin: 0 0 22px;
}
.discount-text strong { font-weight: 700; }

/* Totals card (white card inside sidebar) */
.totals-card {
  background: #fff;
  padding: 24px 22px;
  border-radius: 4px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(16, 46, 71, 0.04);
}

.totals-title {
  font-size: 15px;
  font-weight: 700;
  color: #000;
  margin: 0 0 14px;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

[hidden] { display: none !important; }

.totals-label {
  flex: 1;
  font-weight: 400;
}

.totals-value {
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

.totals-final {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  margin-bottom: 8px;
}
.totals-final .totals-label {
  font-size: 16px;
  font-weight: 700;
  color: #000;
}
.totals-final .totals-value {
  font-size: 16px;
  color: #000;
}
.totals-final s {
  color: var(--muted);
  font-weight: 400;
  margin-right: 6px;
}
.totals-final strong { font-weight: 800; }

.totals-currency {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  text-align: right;
}

/* Coupon toggle */
.coupon-toggle {
  width: 100%;
  background: transparent;
  border: none;
  padding: 16px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  color: #000;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.coupon-toggle:hover { color: var(--ink); }
.coupon-toggle .chevron {
  font-size: 18px;
  transition: transform 0.2s ease;
  display: inline-block;
}
.coupon-toggle[aria-expanded="false"] .chevron { transform: rotate(180deg); }
.coupon-toggle[aria-expanded="true"] .chevron { transform: rotate(0deg); }

/* Footer */
.page-footer {
  text-align: center;
  padding: 32px 16px 24px;
  margin-top: 32px;
}
.page-footer a {
  color: var(--link);
  text-decoration: none;
  font-size: 13px;
}
.page-footer a:hover { text-decoration: underline; }
.page-footer .divider {
  margin: 0 8px;
  color: var(--muted);
}
.copyright {
  font-size: 11px;
  color: var(--muted);
  margin: 12px 0 0;
}

/* Responsive */
@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
  .checkout-summary-col {
    position: static;
    order: -1;
  }
  .form-card { padding: 24px 20px; }
  .trust-badge-img { width: 240px; }
}
@media (max-width: 480px) {
  .summary-headline { font-size: 26px; }
  .discount-text { font-size: 18px; }
  .totals-final .totals-label, .totals-final .totals-value { font-size: 19px; }
  .checkout-page { padding: 16px 12px 0; }
}

/* ================= UPSELL PAGES ================= */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px;
}

.upsell-wrap { text-align: center; margin: 32px auto; max-width: 720px; }

.upsell-btn {
  background: var(--green);
  color: #fff;
  padding: 18px 28px;
  font-size: 22px;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: transform .15s ease, filter .2s ease, background .2s ease;
  box-shadow: 0 6px 16px rgba(55, 191, 148, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.1;
  font-family: inherit;
}
.upsell-btn:hover { transform: translateY(-2px); background: var(--green-dark); }
.upsell-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-text { display: flex; flex-direction: column; align-items: center; }
.btn-label { line-height: 1.1; }
.btn-sub { margin-top: 6px; font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.9); }

.no-thanks {
  display: inline-block;
  margin-top: 20px;
  color: var(--muted);
  text-decoration: underline;
  font-size: 14px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}
.no-thanks:hover { color: var(--ink); }

.headline {
  font-family: 'DM Sans', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  text-align: center;
  margin: 0 0 8px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(16, 46, 71, 0.06);
}

.subhead { text-align: center; color: var(--muted); font-size: 18px; margin-bottom: 32px; }

.upsell-status {
  margin-top: 12px;
  min-height: 20px;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 6px;
  display: inline-block;
}
.upsell-status.error { color: #991b1b; background: #fee2e2; border: 1px solid #fca5a5; }
.upsell-status.success { color: #065f46; background: #d1fae5; border: 1px solid #6ee7b7; }

.spinner {
  margin-left: 10px;
  border: 3px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: inline-block;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
