/* ==========================================================================
   Secure order form — mirrors the reference checkout:
   section headings, split card fields, dashed-red order bump, summary, CTA.
   ========================================================================== */

.co-card {
  background: var(--c-white);
  border: 1px solid var(--c-hairline);
  border-radius: 8px;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.08);
  padding: 24px;
  margin: 10px 0 30px;
}

/* ------------------------------------------------------------ price head */

.co-pricehead {
  text-align: center;
  border-bottom: 1px solid var(--c-hairline);
  padding-bottom: 18px;
  margin-bottom: 22px;
}
.co-pricehead__label {
  font-family: var(--font-headline);
  font-weight: 500;
  font-size: 1.375rem;
  margin: 0 0 6px;
}
.co-pricehead__amount {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.2;
  color: var(--c-black);
}
.co-pricehead__compare {
  color: var(--c-muted);
  font-weight: 500;
  font-size: 1.5rem;
  margin-right: 10px;
  text-decoration: line-through;
  font-style: italic;
}

/* --------------------------------------------------------------- layout */

.co-section { margin-bottom: 22px; }

.co-section__title {
  font-family: var(--font-headline);
  font-weight: 500;
  font-size: 1.25rem;
  margin: 0 0 12px;
  color: var(--c-black);
  display: flex;
  align-items: center;
  gap: 8px;
}
.co-section__title .co-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--c-black);
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  flex: none;
}

.co-row { display: flex; gap: 12px; }
.co-row > * { flex: 1 1 0; min-width: 0; }

.co-field { margin-bottom: 12px; }
.co-field__label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 5px;
}

.co-input,
.co-select,
.co-cardfield:empty {
  display: block;
  width: 100%;
  padding: 12px;
  border: var(--input-border);
  border-radius: var(--radius);
  background: var(--c-white);
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--c-black);
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.co-input::placeholder { color: #9a9aa5; }

.co-input:focus,
.co-select:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(184, 0, 14, 0.12);
}

.co-input.is-invalid { border-color: var(--c-accent); }

.co-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2360606b' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* Whop card field mounts. Each field draws its own bordered box inside a
   frame, styled to match .co-input from public/js/checkout.js (page CSS can't
   reach into the frame). Until it arrives — and in preview mode — the empty
   mount wears the .co-input look above, at .co-input's height. */
.co-cardfield:empty { min-height: calc(1.05rem * 1.4 + 26px); }

.co-error {
  color: var(--c-accent);
  font-size: 0.95rem;
  margin-top: 5px;
  min-height: 1em;
}

.co-formerror {
  background: #fdf2f2;
  border: 1px solid rgba(184, 0, 14, 0.35);
  border-radius: var(--radius);
  color: var(--c-accent);
  font-size: 1.05rem;
  padding: 12px;
  margin-bottom: 16px;
}
.co-formerror[hidden] { display: none !important; }

/* -------------------------------------------------------------- separator */

.co-separator {
  border: 0;
  border-top: 1px solid var(--c-hairline);
  margin: 22px 0;
}

/* ------------------------------------------------------------- ORDER BUMP */

.co-bump {
  position: relative;
  border-radius: var(--radius);
  padding: 16px;
  margin: 22px 0;
  background: var(--c-cream);
  cursor: pointer;
  display: block;
}
/* 3px accent border at 50% opacity — matches the reference bump card */
.co-bump::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid var(--c-accent);
  border-radius: var(--radius);
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.co-bump:hover::before { opacity: 0.85; }
.co-bump.is-selected::before { opacity: 1; }

.co-bump {
  /* Width of the arrow + checkbox column, so the description below can line up
     under the title without a magic number that drifts when sizes change. */
  --bump-arrow-w: 22px;
  --bump-check-w: 28px;
  --bump-gap: 10px;
  --bump-indent: calc(var(--bump-arrow-w) + var(--bump-check-w) + var(--bump-gap) * 2);
}

.co-bump__head {
  display: flex;
  align-items: flex-start;
  gap: var(--bump-gap);
}

.co-bump__arrow {
  color: var(--c-red);
  font-size: 21px;
  line-height: 1.4;
  flex: none;
  width: var(--bump-arrow-w);
  text-align: center;
  animation: co-breath 1.6s ease-in-out 0.6s infinite;
}
@keyframes co-breath {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .co-bump__arrow { animation: none; }
}

/* Native checkbox, restyled */
.co-bump__checkbox {
  appearance: none;
  flex: none;
  width: var(--bump-check-w); height: var(--bump-check-w);
  margin: 3px 0 0;
  border: 2px solid var(--c-accent);
  border-radius: 3px;
  background: var(--c-white);
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease;
}
.co-bump__checkbox:checked { background: var(--c-accent); }
.co-bump__checkbox:checked::after {
  content: "";
  position: absolute;
  left: 50%; top: 46%;
  width: 7px; height: 13px;
  border: solid var(--c-white);
  border-width: 0 3px 3px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}
.co-bump__checkbox:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

.co-bump__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--c-red);
  flex: 1 1 auto;
}

.co-bump__price {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-black);
  flex: none;
  white-space: nowrap;
}

.co-bump__desc {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--c-black);
  margin: 10px 0 0;
  padding-left: var(--bump-indent);
}
.co-bump__desc strike, .co-bump__desc s { color: var(--c-muted); }

.co-bump__image {
  display: block;
  margin: 12px 0 0 var(--bump-indent);
  max-width: 160px;
  border-radius: var(--radius);
}

/* ---------------------------------------------------------------- summary */

.co-summary { margin: 22px 0; }
.co-summary__title {
  font-family: var(--font-headline);
  font-weight: 500;
  font-size: 1.25rem;
  margin: 0 0 10px;
}

.co-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 1.05rem;
  padding: 7px 0;
  color: var(--c-ink);
}
.co-summary__row--item { border-bottom: 1px dashed var(--c-hairline); }
.co-summary__row--total {
  border-top: 2px solid var(--c-black);
  margin-top: 6px;
  padding-top: 12px;
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--c-black);
}
.co-summary__row span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------------- submit */

.co-submit {
  width: 100%;
  border-radius: 6px;
  border: none;
  background: var(--c-btn);
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 100%;
  padding: 20px 24px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.co-submit:hover:not(:disabled) { background: var(--c-btn-hover); }
.co-submit:active:not(:disabled) { background: var(--c-btn-active); }
.co-submit:disabled { opacity: 0.65; cursor: not-allowed; }

.co-privacy {
  text-align: center;
  font-size: 0.95rem;
  color: var(--c-muted);
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.co-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--c-muted);
}

.co-branding { margin-top: 10px; }

/* --------------------------------------------------------------- overlay */

.co-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 60;
  text-align: center;
  padding: 24px;
}
.co-overlay[hidden] { display: none !important; }
.co-overlay__title {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0;
}
.co-overlay__note { font-size: 1.05rem; color: var(--c-accent); margin: 0; font-weight: 600; }

.co-spinner {
  width: 42px; height: 42px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--c-accent);
  border-radius: 50%;
  animation: co-spin 0.8s linear infinite;
}
@keyframes co-spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------- order confirmation */

/* Thank-you page. Narrower column, centred headings and the receipt box are
   matched to the reference funnel's order-confirmation step. */
.co-confirm-page { --measure: 590px; padding-top: 30px; }
.co-confirm-page .tsl-headline,
.co-confirm-page .tsl-subheadline,
.co-confirm-page .tsl-copy { text-align: center; }

.co-confirm {
  border: 1px solid #ecf0f5;
  border-radius: 8px;
  margin: 24px 0 0;
  color: #151d28;
  font-size: 16px;
  line-height: 1.4;
}
.co-confirm__head,
.co-confirm__items,
.co-confirm__foot { border-bottom: 1px solid #ecf0f5; }

.co-confirm__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 12px 24px;
  font-size: 17px;
  font-weight: 500;
}
.co-confirm__icon { flex: none; }

.co-confirm__items {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
}
.co-confirm__item { display: flex; flex-direction: column; }
.co-confirm__name { font-weight: 600; color: #2d2d2d; }
.co-confirm__meta { display: flex; gap: 20px; color: #364557; }

.co-confirm__foot { padding: 18px 24px; }
.co-confirm__line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 35px;
  color: #364557;
}
.co-confirm__line span:last-child { color: #151d28; font-weight: 500; }

.co-confirm__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 64px;
  padding: 0 24px;
  font-size: 17px;
  font-weight: 600;
  color: #2d2d2d;
}
.co-confirm__meta span:last-child,
.co-confirm__line span:last-child,
.co-confirm__total span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }

.co-confirm__divider {
  width: 25%;
  border: 0;
  border-top: 1px solid var(--c-black);
  margin: 36px auto 10px;
}

/* ---------------------------------------------------------------- mobile */

@media (max-width: 640px) {
  .co-card { padding: 18px 16px; }
  .co-row { flex-direction: column; gap: 0; }
  .co-bump__desc, .co-bump__image { padding-left: 0; margin-left: 0; }
  .co-pricehead__amount { font-size: 1.75rem; }
  .co-confirm-page { padding-top: 20px; }
  .co-confirm__head, .co-confirm__items, .co-confirm__foot, .co-confirm__total { padding-left: 16px; padding-right: 16px; }
  .co-confirm__head { font-size: 15px; }
}
