/* Checkout + thank-you pages. Builds on styles.css (tokens, buttons, stack card, timer bar). */

.co-header { border-bottom: 1px solid var(--line); background: #fff; }
.co-header-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1rem; }
.co-brand { color: var(--plum-900); font: 800 .9rem/1 var(--serif); letter-spacing: .12em; text-decoration: none; }
.co-secure { display: inline-flex; white-space: nowrap; align-items: center; gap: .45rem; color: var(--muted); font-size: .9rem; font-weight: 600; }
.co-secure svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.co-main { padding-block: clamp(2rem, 4vw, 3rem) clamp(3.5rem, 6vw, 5rem); }
.co-head { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); text-align: center; }
.co-head .kicker { margin-bottom: .5rem; }

.co-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(1.5rem, 3.5vw, 2.75rem); align-items: start; }

/* Form */
.co-form { display: grid; gap: 1.25rem; }
.co-card { min-width: 0; margin: 0; padding: clamp(1.25rem, 3vw, 1.75rem); border: 1px solid var(--line); border-radius: 1.25rem; background: #fff; box-shadow: var(--shadow); }
.co-card legend { float: left; width: 100%; display: flex; align-items: center; gap: .7rem; margin-bottom: 1.1rem; padding: 0; color: var(--plum-900); font: 600 1.35rem/1.2 var(--serif); }
.co-card legend + * { clear: both; }
.co-step { width: 1.9rem; height: 1.9rem; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--plum-900); color: var(--gold-soft); font: 700 .95rem/1 var(--sans); }

.field + .field { margin-top: 1rem; }
.field label { display: block; margin-bottom: .4rem; color: var(--plum-900); font-size: .95rem; font-weight: 700; }
.field input { width: 100%; min-height: 3.2rem; padding: .75rem .95rem; border: 1px solid #d9c9cf; border-radius: .7rem; background: #fff; color: var(--ink); font: 400 1.05rem/1.3 var(--sans); transition: border-color .15s ease, box-shadow .15s ease; }
.field input::placeholder { color: #a8979f; }
.field input:focus { outline: none; border-color: var(--berry); box-shadow: 0 0 0 3px rgba(199, 40, 86, .15); }
.field input[aria-invalid="true"] { border-color: #d0243c; box-shadow: 0 0 0 3px rgba(208, 36, 60, .12); }
.field .hint { margin-top: .4rem; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.field .field-error { margin-top: .35rem; color: #b3182f; font-size: .88rem; font-weight: 600; }

/* Order bump: the classic dashed box right before payment */
.bump { display: block; padding: 1.1rem 1.25rem 1.2rem; border: 2px dashed var(--berry); border-radius: 1.1rem; background: #fff6df; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.bump:hover { background: #fff1cf; }
.bump.is-on { border-style: solid; background: #fdeecb; }
.bump-flag { display: inline-block; margin-bottom: .75rem; padding: .3rem .65rem; border-radius: .45rem; background: var(--berry); color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.bump-check { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; }
.bump input { width: 1.45rem; height: 1.45rem; margin: .1rem 0 0; accent-color: var(--berry); cursor: pointer; }
.bump input:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.bump-title { color: var(--plum-900); font-size: 1.08rem; font-weight: 800; line-height: 1.35; }
.bump-body { display: block; margin-top: .6rem; padding-left: 2.2rem; color: var(--text); font-size: .98rem; line-height: 1.55; }

/* Stripe Payment Element */
.payment-element { min-height: 3rem; }
.pe-loading, .pe-error { color: var(--muted); font-size: .95rem; }
.pe-error { color: #b3182f; font-weight: 600; }

.form-error { padding: .85rem 1rem; border: 1px solid rgba(208, 36, 60, .35); border-radius: .8rem; background: #fdecee; color: #9d1429; font-weight: 600; line-height: 1.45; }

.co-pay { max-width: none; }
.co-pay:disabled { cursor: not-allowed; opacity: .6; transform: none; box-shadow: none; }
.co-form .mini-guarantee { margin-top: 0; }
.co-legal { color: var(--muted); font-size: .85rem; line-height: 1.5; text-align: center; }
.co-legal a { color: var(--plum-800); }

/* Summary */
.co-summary { position: sticky; top: 4.25rem; }
.co-summary-title { margin-bottom: 1rem; color: var(--plum-900); font: 600 1.45rem/1.2 var(--serif); }
.co-visual { margin-bottom: 1rem; overflow: hidden; border-radius: .9rem; background: var(--cream); }
.co-visual img { width: 100%; }
.co-summary .stack-row { grid-template-columns: 3rem minmax(0, 1fr) auto; gap: .75rem; padding: .45rem .8rem .45rem .45rem; }
.co-summary .stack-row img { width: 3rem; height: 3rem; }
.co-summary .stack-row span { font-size: .95rem; }
.co-summary .stack-row strong { font-size: 1rem; }
.co-lines { display: grid; gap: .45rem; margin-top: 1rem; padding: .9rem 1rem 0; border-top: 1px solid var(--line); }
.co-lines p { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; color: var(--text); font-weight: 600; }
.co-lines strong { color: var(--plum-900); }
.co-summary .stack-price { margin-top: .9rem; }
.co-summary .price-now { font-size: clamp(2.2rem, 3.6vw, 2.8rem); }
.offer-expired .co-summary .stack-total { color: var(--berry); }

/* Consent to immediate supply (needed to rely on the 30-day guarantee instead of the 14-day withdrawal right) */
.consent { padding: .9rem 1rem; border: 1px solid var(--line); border-radius: .9rem; background: #fff; }
.consent label { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; cursor: pointer; }
.consent input { width: 1.2rem; height: 1.2rem; margin: .15rem 0 0; accent-color: var(--berry); cursor: pointer; }
.consent span { color: var(--text); font-size: .88rem; line-height: 1.5; }
.consent a { color: var(--plum-800); }
.consent .field-error { margin: .5rem 0 0 1.9rem; color: #b3182f; font-size: .88rem; font-weight: 600; }

/* Thank-you page */
.ty-main { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.ty-card { max-width: 46rem; margin-inline: auto; padding: clamp(1.5rem, 4.5vw, 3rem); border: 1px solid rgba(216, 174, 112, .55); border-radius: 1.25rem; background: #fff; box-shadow: var(--shadow); text-align: center; }
.ty-icon { width: 4.25rem; height: 4.25rem; margin: 0 auto 1.25rem; display: grid; place-items: center; border-radius: 50%; background: #e7f4ea; color: #227a3c; }
.ty-icon svg { width: 2.1rem; height: 2.1rem; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ty-icon.is-wait { background: #fff4dc; color: #99630c; }
.ty-icon.is-error { background: #fdecee; color: #b3182f; }
.ty-card .h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.ty-card .lead { margin-top: .9rem; }
.ty-call { margin-top: 1.75rem; padding: 1.25rem 1.4rem; border-radius: 1rem; background: var(--plum-900); color: #fff; text-align: left; }
.ty-call h2 { display: flex; align-items: center; gap: .6rem; color: var(--gold-soft); font: 600 1.3rem/1.25 var(--serif); }
.ty-call h2 svg { width: 1.4rem; height: 1.4rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ty-call p { margin-top: .6rem; color: var(--on-dark); line-height: 1.6; }
.ty-call strong { color: #fff; white-space: nowrap; }
.ty-steps { margin-top: 1.75rem; text-align: left; counter-reset: ty; }
.ty-steps li { position: relative; padding: 0 0 0 2.9rem; color: var(--text); line-height: 1.55; counter-increment: ty; }
.ty-steps li + li { margin-top: 1.1rem; }
.ty-steps li::before { content: counter(ty); position: absolute; left: 0; top: -.1rem; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 50%; background: var(--blush); color: var(--berry); font-weight: 800; }
.ty-steps b { display: block; color: var(--plum-900); }
.ty-order { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); text-align: left; }
.ty-order h2 { margin-bottom: .75rem; color: var(--plum-900); font: 600 1.2rem/1.2 var(--serif); }
.ty-order ul { display: grid; gap: .4rem; }
.ty-order li { display: flex; justify-content: space-between; gap: 1rem; color: var(--text); }
.ty-order li.ty-total { margin-top: .35rem; padding-top: .6rem; border-top: 1px solid var(--line); color: var(--plum-900); font-weight: 800; }
.ty-card .btn { margin-top: 1.75rem; }

@media (max-width: 960px) {
  .co-layout { grid-template-columns: 1fr; max-width: 40rem; margin-inline: auto; }
  .co-summary { position: static; order: -1; }
  .co-visual { display: none; }
  /* Phones: a short summary above the form (value, today's price), not the full list */
  .co-summary .stack { display: none; }
  .co-summary .stack-total { margin-top: 0; padding-inline: 0; }
  .co-lines { padding-inline: 0; }
  .co-summary .stack-price { padding-inline: 0; }
}

@media (max-width: 720px) {
  .co-header-inner { padding-block: .8rem; }
  .co-brand { font-size: .78rem; letter-spacing: .08em; }
  .co-secure { font-size: .82rem; }
  .co-card { padding: 1.1rem 1rem; }
  .co-summary .stack-card { padding: 1rem 1.1rem; }
  .co-summary-title { margin-bottom: .6rem; font-size: 1.2rem; }
  .bump { padding: 1rem; }
  .bump-body { padding-left: 0; }
  .co-summary .stack-row b { font-size: .68rem; }
  .ty-call strong { white-space: normal; }
}
