/* ============================================================
   PolicyDoctor Premium Checkout — page-specific stylesheet
   Scoped under .pd-checkout to avoid affecting other pages.
   Source: approved policydoctor-premium-checkout.zip design.
   ============================================================ */

/* ── Design tokens ── */
.pd-checkout {
  --chk-bg: #04070d;
  --chk-panel: #0a1220;
  --chk-panel-strong: #0d1728;
  --chk-line: rgba(148, 180, 214, 0.14);
  --chk-line-green: rgba(104, 220, 153, 0.22);
  --chk-text: #f4f7fb;
  --chk-muted: #93a2b8;
  --chk-muted-2: #6f7f96;
  --chk-green: #58d88d;
  --chk-green-strong: #78e3a7;
  --chk-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --chk-radius-xl: 28px;
  --chk-radius-lg: 20px;
  --chk-radius-md: 14px;
  --chk-max: 1180px;

  width: 100%;
  min-height: 100vh;
  color: var(--chk-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 22% 0%, rgba(32, 86, 64, 0.22), transparent 32rem),
    radial-gradient(circle at 82% 12%, rgba(24, 58, 102, 0.26), transparent 34rem),
    linear-gradient(180deg, #050910 0%, #03060b 48%, #050910 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.pd-checkout *,
.pd-checkout *::before,
.pd-checkout *::after {
  box-sizing: border-box;
}

.pd-checkout a { color: inherit; text-decoration: none; }

/* ── Checkout shell ── */
.pd-checkout .chk-shell {
  width: min(var(--chk-max), calc(100% - 48px));
  margin: 0 auto;
  padding: 58px 0 78px;
}

/* ── Intro ── */
.pd-checkout .chk-intro {
  max-width: 790px;
}

.pd-checkout .chk-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid var(--chk-line-green);
  border-radius: 999px;
  color: #9fe9bd;
  background: rgba(27, 62, 45, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pd-checkout .chk-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--chk-green);
  box-shadow: 0 0 0 5px rgba(88, 216, 141, 0.1);
}

.pd-checkout .chk-headline {
  margin: 22px 0 14px;
  font-size: clamp(38px, 4vw, 54px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 800;
}

.pd-checkout .chk-subhead {
  margin: 0;
  max-width: 680px;
  color: #aeb9ca;
  font-size: 17px;
  line-height: 1.65;
}

/* ── Assurance pills ── */
.pd-checkout .chk-assurance-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.pd-checkout .chk-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(148, 180, 214, 0.14);
  border-radius: 999px;
  color: #b8c4d5;
  background: rgba(255, 255, 255, 0.025);
  font-size: 13px;
  font-weight: 650;
}

.pd-checkout .chk-pill svg { color: var(--chk-green-strong); }

/* ── Two-column grid ── */
.pd-checkout .chk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(470px, 0.98fr);
  gap: 28px;
  align-items: start;
  margin-top: 36px;
}

.pd-checkout .chk-stack {
  display: grid;
  gap: 18px;
}

/* ── Shared card base ── */
.pd-checkout .chk-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--chk-line);
  border-radius: var(--chk-radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    linear-gradient(180deg, var(--chk-panel-strong), var(--chk-panel));
  box-shadow: var(--chk-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.pd-checkout .chk-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 18% 0%, rgba(88, 216, 141, 0.08), transparent 22rem);
}

.pd-checkout .chk-card > * { position: relative; }

/* ── Order summary card ── */
.pd-checkout .chk-summary { padding: 30px; }

.pd-checkout .chk-section-label {
  margin: 0 0 12px;
  color: #7f8ea5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.pd-checkout .chk-summary-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.pd-checkout .chk-summary-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 760;
}

.pd-checkout .chk-included-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(104, 220, 153, 0.24);
  color: #a9eec4;
  background: rgba(25, 65, 45, 0.42);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.pd-checkout .chk-price-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(148, 180, 214, 0.12);
}

.pd-checkout .chk-price {
  font-size: 58px;
  line-height: 0.9;
  letter-spacing: -0.06em;
  font-weight: 820;
}

.pd-checkout .chk-price-note {
  padding-bottom: 7px;
  color: #9aa8bc;
  font-size: 15px;
  line-height: 1.45;
}

.pd-checkout .chk-strikethrough {
  text-decoration: line-through;
  color: #f87171;
}

.pd-checkout .chk-discounted-amount {
  margin-left: 12px;
  color: #ffffff;
}

.pd-checkout .chk-renewal {
  margin: 18px 0 0;
  color: #c2cddb;
  font-size: 15px;
  line-height: 1.65;
}

.pd-checkout .chk-renewal strong { color: #ffffff; }

.pd-checkout .chk-includes {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 13px;
}

.pd-checkout .chk-includes li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #d5dde8;
  font-size: 15px;
  font-weight: 590;
}

.pd-checkout .chk-check-icon {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--chk-green-strong);
  background: rgba(88, 216, 141, 0.11);
  border: 1px solid rgba(88, 216, 141, 0.2);
}

.pd-checkout .chk-next-box {
  margin-top: 26px;
  padding: 18px;
  border: 1px solid rgba(148, 180, 214, 0.12);
  border-radius: 18px;
  background: rgba(4, 9, 16, 0.38);
}

.pd-checkout .chk-next-box p {
  margin: 0;
  color: #aebbc9;
  font-size: 14px;
  line-height: 1.65;
}

/* ── Billing clarity card ── */
.pd-checkout .chk-billing { padding: 26px 30px; }

.pd-checkout .chk-card-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 18px;
  font-size: 18px;
  letter-spacing: -0.02em;
  font-weight: 760;
}

.pd-checkout .chk-heading-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--chk-green-strong);
  background: rgba(88, 216, 141, 0.1);
  border: 1px solid rgba(88, 216, 141, 0.18);
}

.pd-checkout .chk-billing-list {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(148, 180, 214, 0.11);
}

.pd-checkout .chk-billing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(148, 180, 214, 0.1);
  color: #b7c2d1;
  font-size: 14px;
  line-height: 1.5;
}

.pd-checkout .chk-billing-row strong {
  color: #ffffff;
  font-weight: 730;
  text-align: right;
  white-space: nowrap;
}

.pd-checkout .chk-billing-note {
  margin: 16px 0 0;
  color: #8fa0b6;
  font-size: 13px;
  line-height: 1.65;
}

/* ── Scope card ── */
.pd-checkout .chk-scope { padding: 26px 30px; }

.pd-checkout .chk-scope-grid {
  display: grid;
  gap: 14px;
}

.pd-checkout .chk-scope-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.pd-checkout .chk-scope-item p {
  margin: 4px 0 0;
  color: #aebbc9;
  font-size: 14px;
  line-height: 1.65;
}

.pd-checkout .chk-scope-item strong { color: #eef3f8; }

.pd-checkout .chk-legal-links {
  display: flex;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 180, 214, 0.11);
  color: #9fe9bd;
  font-size: 13px;
  font-weight: 700;
}

.pd-checkout .chk-legal-links a:hover {
  color: #c3f5d8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Consent checkboxes ── */
.pd-checkout .chk-consent-label {
  user-select: none;
  -webkit-user-select: none;
}

.pd-checkout .chk-consent-label input[type="checkbox"] {
  accent-color: #7eb89a;
}

.pd-checkout .chk-consent-label:hover span {
  color: #e5edf4;
}

/* ── Terms row error state ── */
.pd-checkout .chk-consent-row--error .chk-consent-label span,
.pd-checkout .chk-consent-row--error .chk-consent-label span a {
  color: #f87171;
}

.pd-checkout .chk-consent-row--error .chk-consent-label input[type="checkbox"] {
  accent-color: #f87171;
}

/* ── Terms row shake animation ── */
.pd-checkout .chk-consent-row--shake {
  animation: chk-shake 0.35s ease;
}

@keyframes chk-shake {
  0%, 100% { transform: translateX(0); }
  15%  { transform: translateX(-4px); }
  35%  { transform: translateX(4px); }
  55%  { transform: translateX(-3px); }
  75%  { transform: translateX(3px); }
  90%  { transform: translateX(-1px); }
}

@media (prefers-reduced-motion: reduce) {
  .pd-checkout .chk-consent-row--shake {
    animation: none;
  }
}

/* ── SMS reassurance warning box ── */
.pd-checkout .chk-sms-reassurance {
  margin: 8px 0 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(220, 80, 80, 0.32);
  border-radius: 10px;
  background: rgba(180, 40, 40, 0.08);
  color: #f4c2c2;
  font-size: 0.76rem;
  line-height: 1.6;
  box-shadow: 0 0 12px rgba(200, 60, 60, 0.08);
}

.pd-checkout .chk-sms-reassurance p {
  margin: 0 0 6px;
}

.pd-checkout .chk-sms-reassurance p:last-child {
  margin-bottom: 0;
}

.pd-checkout .chk-sms-reassurance strong {
  color: #f9d0d0;
}

.pd-checkout .chk-sms-reassurance em {
  font-style: normal;
  font-weight: 700;
  color: #fbc4c4;
}

/* ── Payment panel ── */
.pd-checkout .chk-payment {
  position: sticky;
  top: 102px;
  padding: 26px;
  border-color: rgba(104, 220, 153, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.014)),
    linear-gradient(180deg, #0e1a2d 0%, #09101d 100%);
}

.pd-checkout .chk-payment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.pd-checkout .chk-payment-title {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.025em;
  font-weight: 780;
}

/* Stripe container — the real embed lives here */
.pd-checkout .chk-stripe-wrap {
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 180, 214, 0.14);
  background: rgba(4, 10, 18, 0.50);
  overflow: hidden;
}

.pd-checkout .chk-secure-note {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  margin-top: 16px;
  color: #8b9cb1;
  font-size: 13px;
  line-height: 1.65;
}

.pd-checkout .chk-secure-note svg {
  margin-top: 2px;
  color: var(--chk-green-strong);
}

/* ── Responsive ── */
@media (max-width: 1080px) {
  .pd-checkout .chk-grid {
    grid-template-columns: 1fr;
  }
  .pd-checkout .chk-payment {
    position: relative;
    top: 0;
  }
}

@media (max-width: 720px) {
  .pd-checkout .chk-shell {
    width: min(100% - 30px, var(--chk-max));
    padding-top: 38px;
  }
  .pd-checkout .chk-summary,
  .pd-checkout .chk-billing,
  .pd-checkout .chk-scope,
  .pd-checkout .chk-payment { padding: 22px; }
  .pd-checkout .chk-price { font-size: 46px; }
  .pd-checkout .chk-headline { font-size: clamp(28px, 6vw, 38px); }
}
