/* ===========================================================================
   custom.css — styles for the parts of the site we author ourselves:
   the checkout modal, the sticky bundle bar, the upsell and thank-you pages,
   and the FAQ open/closed state.

   WHY THIS FILE EXISTS
   app.css is the origin's *compiled* Tailwind. A compiled Tailwind build only
   contains the utility classes that the original markup actually used, so any
   new arbitrary-value class we invent (w-[min(600px,94vw)], rounded-[54px],
   bg-[color:var(--brand-primary)] …) resolves to nothing. Everything we add
   ourselves is therefore written as real CSS with its own class names.

   Colours come from the custom properties set in inc/head.php from
   brand/config.php, so restyling stays a config change.
   =========================================================================== */

:root {
  --ck-radius: 24px;
  --ck-border: #dfd7c9;
  --ck-muted: #6b7a73;
}

/* ----------------------------------------------------------------- buttons */

.ck-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 64px;
  padding: 16px 32px;
  border: 0;
  border-radius: 54px;
  background: var(--brand-primary, #4fc3b0);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.ck-btn:hover:not(:disabled) { filter: brightness(0.95); }
.ck-btn:disabled { opacity: 0.6; cursor: default; }
.ck-btn--auto { width: auto; }
.ck-btn--paypal { background: #ffc43a; color: #003087; min-height: 48px; font-size: 17px; }

.ck-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ck-muted);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.ck-link:hover { color: #334; }

/* ------------------------------------------------------------------- modal */

.ck-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 24px 16px;
}
.ck-modal[hidden] { display: none; }

.ck-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.ck-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 600px;      /* this is what was missing: the panel was full-bleed */
  min-width: 320px;
  margin: auto;
  padding: 40px 32px 32px;
  border-radius: var(--ck-radius);
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}
@media (max-width: 640px) {
  .ck-modal { padding: 12px; }
  .ck-modal__panel { padding: 32px 18px 22px; min-width: 0; }
}

.ck-modal__close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  color: #9aa5a0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.ck-modal__close:hover { color: #51605a; }

/* S833-back: back arrow, payment step only -- mirrors .ck-modal__close on the left */
.ck-modal__back {
  position: absolute;
  top: 14px;
  left: 18px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: #9aa5a0;
  line-height: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ck-modal__back[hidden] { display: none; }
.ck-modal__back:hover { color: #51605a; }
@media (max-width: 640px) { .ck-modal__back { top: 10px; left: 10px; } }   /* phones: clear of the first step dot */

.ck-modal__title {
  margin: 0 0 24px;
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
}
@media (max-width: 640px) { .ck-modal__title { font-size: 21px; } }

/* step indicator ---------------------------------------------------------- */

.ck-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}
.ck-steps__item { display: flex; align-items: center; opacity: 0.4; transition: opacity 0.2s ease; }
.ck-steps__item.is-active,
.ck-steps__item.is-done { opacity: 1; }

.ck-steps__mark { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ck-steps__dot {
  width: 16px;
  height: 16px;
  border: 2px solid var(--brand-primary, #4fc3b0);
  border-radius: 50%;
  background: #fff;
}
.ck-steps__item.is-done .ck-steps__dot { background: var(--brand-primary, #4fc3b0); }
.ck-steps__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary, #4fc3b0);
}
.ck-steps__bar {
  width: 92px;
  height: 2px;
  margin: 7px 8px 0;
  background: var(--brand-primary, #4fc3b0);
}
@media (max-width: 640px) { .ck-steps__bar { width: 46px; } }

/* form -------------------------------------------------------------------- */

.ck-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 640px) { .ck-grid { grid-template-columns: 1fr; } }
.ck-grid__full { grid-column: 1 / -1; }

.ck-field {
  position: relative;
  display: block;
  padding: 20px 16px 8px;
  border: 1px solid var(--ck-border);
  border-radius: 12px;
  background: #fff;
  text-align: left;
}
.ck-field:focus-within { border-color: var(--brand-primary, #4fc3b0); }
.ck-field.has-error { border-color: var(--brand-accent, #e42100); }

.ck-field__label {
  position: absolute;
  top: 17px;
  left: 16px;
  color: #9aa5a0;
  font-size: 16px;
  pointer-events: none;
  transition: top 0.14s ease, font-size 0.14s ease;
}
/* float the label once the field is focused or filled */
.ck-field:focus-within .ck-field__label,
.ck-field__input:not(:placeholder-shown) + .ck-field__label {
  top: 6px;
  font-size: 11px;
}
.ck-field__req { color: var(--brand-accent, #e42100); }

.ck-field__input,
.ck-field__select {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: inherit;
}
.ck-field__input:focus, .ck-field__select:focus { outline: none; box-shadow: none; }

.ck-field__row { display: flex; align-items: center; gap: 8px; }
.ck-field__flag { width: 24px; height: 16px; object-fit: cover; flex: 0 0 auto; }
.ck-field__prefix { flex: 0 0 auto; font-size: 16px; }

.ck-error {
  display: none;
  margin-top: 4px;
  color: var(--brand-accent, #e42100);
  font-size: 11px;
}
.ck-error.is-shown { display: block; }

.ck-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--brand-page-bg, #f4f7f6);
  font-size: 14px;
}

/* payment step ------------------------------------------------------------ */

.ck-express { margin-bottom: 20px; padding: 16px; border-radius: 16px; background: #f7f7f7; }
.ck-express__title { margin: 0 0 12px; text-align: center; font-size: 14px; color: #6b7a73; }

.ck-or { margin: 16px 0; text-align: center; font-size: 14px; color: #8d9992; }

.ck-paybox { padding: 16px; border: 1px solid var(--ck-border); border-radius: 16px; }
.ck-paybox + .ck-paybox { margin-top: 14px; }
.ck-paybox__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ck-paybox__name { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.ck-paybox__brands { font-size: 11px; letter-spacing: 0.06em; color: #9aa5a0; text-transform: uppercase; }

.ck-cardrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--ck-border);
  border-radius: 12px;
}
.ck-cardrow input { border: 0; outline: none; background: transparent; font: inherit; font-size: 16px; padding: 0; }
.ck-cardrow__number { flex: 1 1 auto; min-width: 0; }
.ck-cardrow__exp { flex: 0 0 72px; width: 72px; text-align: right; }
.ck-cardrow__cvv { flex: 0 0 54px; width: 54px; text-align: right; }

.ck-label-sm { display: block; margin-bottom: 6px; font-size: 14px; color: #6b7a73; }

.ck-guarantee { margin: 12px 0 0; text-align: center; font-size: 14px; font-weight: 600; }

.ck-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7a73;
}

.ck-receipt { padding: 40px 0; text-align: center; }
.ck-receipt__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--brand-primary, #4fc3b0);
}

.ck-banner {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fee;
  color: #a11;
  text-align: center;
  font-size: 14px;
}
.ck-banner.is-shown { display: block; }

/* -------------------------------------------------------- sticky bundle CTA */

.ck-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--ck-border);
  background: #fff;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.ck-sticky.is-visible { transform: translateY(0); }
.ck-sticky__btn {
  display: flex;          /* inline-flex + auto margins would not centre */
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  min-height: 70px;
  font-size: 18px;
}

/* ----------------------------------------------------------------- the FAQ */
/* The origin collapses answers with Tailwind's max-h-0; we add the open state. */

[data-faq-panel] { transition: max-height 0.28s ease; }
[data-faq-panel].is-open { max-height: 1200px !important; }
[data-faq-toggle] [data-faq-icon] { transition: transform 0.2s ease; display: inline-flex; }
[data-faq-toggle].is-open [data-faq-icon] { transform: rotate(45deg); }

/* ------------------------------------------------- upsell & thank-you pages */

.pg {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
.pg-header { display: flex; justify-content: center; padding: 26px 0; }

.up-progress { border-top: 1px solid var(--ck-border); border-bottom: 1px solid var(--ck-border); background: rgba(255, 255, 255, 0.6); }
.up-progress__inner { padding: 16px 0; text-align: center; }
.up-progress__bar { display: flex; align-items: center; gap: 12px; max-width: 560px; margin: 8px auto 0; }
.up-progress__track { flex: 1 1 auto; height: 10px; border-radius: 999px; background: #fff; overflow: hidden; }
.up-progress__fill { display: block; height: 100%; border-radius: 999px; background: var(--brand-primary-dark, #15423e); }

.up-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 40px;
  padding: 56px 0;
}
@media (max-width: 900px) { .up-grid { grid-template-columns: 1fr; padding: 32px 0; } }

.up-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 4px;
  background: var(--brand-accent, #e42100);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.up-product { margin: 20px 0 0; font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-primary-dark, #15423E); }
.up-product + .up-title { margin-top: 8px; }
.up-title { margin: 24px 0 0; font-size: 44px; font-weight: 600; line-height: 1.1; }
@media (max-width: 900px) { .up-title { font-size: 30px; } }
.up-desc { max-width: 520px; margin: 20px 0 0; font-size: 18px; color: #3c4a43; }

.up-offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
  margin-top: 32px;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.up-offer__kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #8d9992; }
.up-offer__price { margin: 4px 0 0; font-size: 40px; font-weight: 600; line-height: 1; }
.up-offer__regular { margin: 4px 0 0; font-size: 14px; color: #6b7a73; }
.up-offer__regular s { color: var(--brand-accent, #e42100); }
.up-offer__actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.up-art { position: relative; padding: 32px; border-radius: 24px; background: #fff; }
.up-art img { display: block; width: 100%; max-width: 460px; height: auto; margin: 0 auto; object-fit: contain; }
.up-art__free {
  position: absolute;
  top: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--brand-accent, #e42100);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
}
@media (max-width: 900px) { .up-art__free { width: 78px; height: 78px; font-size: 15px; top: 16px; right: 16px; } }

.pg-footer {
  padding: 22px 0;
  background: var(--brand-primary-dark, #15423e);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  font-size: 14px;
}

/* thank-you --------------------------------------------------------------- */

.ty { max-width: 720px; margin: 0 auto; padding: 56px 20px; }
.ty__card { padding: 48px 40px; border-radius: 24px; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); text-align: center; }
@media (max-width: 640px) { .ty__card { padding: 30px 20px; } }
.ty__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--brand-primary, #4fc3b0);
}
.ty__title { margin: 0; font-size: 34px; font-weight: 600; line-height: 1.2; }
@media (max-width: 640px) { .ty__title { font-size: 25px; } }
.ty__lead { max-width: 460px; margin: 12px auto 0; color: #3c4a43; }
.ty__ref { display: inline-block; margin-top: 24px; padding: 12px 20px; border-radius: 12px; background: var(--brand-page-bg, #f4f7f6); font-size: 14px; }
.ty__lines { margin-top: 32px; border-top: 1px solid #ede8df; border-bottom: 1px solid #ede8df; text-align: left; }
.ty__line { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; }
.ty__line + .ty__line { border-top: 1px solid #ede8df; }
.ty__line--total { font-size: 18px; font-weight: 700; }
.ty__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 32px; text-align: left; }
@media (max-width: 640px) { .ty__cols { grid-template-columns: 1fr; } }
.ty__h { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #8d9992; }
.ty__help { margin-top: 40px; font-size: 14px; color: #8d9992; }

/* market picker (index.php) ------------------------------------------------ */

.mk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .mk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .mk-grid { grid-template-columns: 1fr; } }
.mk-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--ck-border);
  border-radius: 16px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mk-card:hover { border-color: var(--brand-primary, #4fc3b0); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }
.mk-card__flag { width: 36px; height: 24px; object-fit: cover; flex: 0 0 auto; }
.mk-card__name { display: block; font-weight: 600; }
.mk-card__meta { display: block; font-size: 12px; color: #8d9992; }

/* selected bundle card ------------------------------------------------------ */

[data-bundle].is-selected {
  border-color: var(--brand-primary, #4fc3b0);
  box-shadow: 0 0 0 2px var(--brand-primary, #4fc3b0);
}

/* ======================================================= trust badges ====== */
/* Card brands, the payment badge strip and the icon call-outs, lifted from the
   origin's checkout (see inc/trust-badges.php).                                */

.tb-brands { height: 20px; width: auto; flex: 0 0 auto; }

.tb-riskfree {
  margin: 16px 0 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.tb-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tb-strip__img,
.tb-strip__svg { display: block; height: 36px; width: auto; flex: 0 0 auto; object-fit: contain; }
.tb-strip__svg { height: 28px; }

.tb-callouts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 620px;
  margin: 16px auto 0;
  padding-top: 16px;
  border-top: 1px solid #e3e3e3;
}
.tb-callout { max-width: 135px; margin: 0 auto; text-align: center; }
.tb-callout__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #fff;
}
/* the shipping step uses a pale tinted disc behind the icon */
.tb-callout__badge--light { background: #e9f7f4; }
.tb-callout__icon { display: block; flex: 0 0 auto; }
.tb-callout__label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
}

/* the "Credit card" row: a filled dot stands in for the removed radio */
.ck-paybox__dot {
  width: 16px;
  height: 16px;
  border: 5px solid var(--brand-primary, #4fc3b0);
  border-radius: 50%;
  background: #0b0b0b;
  box-sizing: border-box;
}

/* upsell benefit list ------------------------------------------------------- */

.up-benefits {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  max-width: 520px;
}
.up-benefits li { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; }
.up-benefits svg { flex: 0 0 auto; margin-top: 3px; color: var(--brand-primary, #4fc3b0); }

/* ------------------------------------------------- S765: order summary + Whop Elements */
.ck-summary { margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--ck-border); border-radius: 16px; background: #fff; }
.ck-summary__title { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.ck-summary__row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; line-height: 1.5; }
.ck-summary__row > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ck-summary__total { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--ck-border); font-size: 17px; font-weight: 700; }
.ck-whop { margin-top: 8px; }
.ck-whop__target { min-height: 120px; }
.ck-whop__status { margin: 4px 0 10px; font-size: 15px; color: var(--ck-muted); }
.ck-whop__error { margin: 4px 0 10px; padding: 10px 12px; border-radius: 10px; background: #fdecea; color: #a61b0b; font-size: 15px; }
.ck-btn--ghost { margin-top: 12px; min-height: 48px; font-size: 16px; background: transparent; color: var(--brand-primary-dark, #15423e); border: 2px solid var(--brand-primary, #4fc3b0); }

/* S777: signed abandon-email coupon -- the offer-page bar and the order-summary discount row */
.mg-coupon-bar { background: #0f7a3a; color: #fff; text-align: center; font-size: 15px; font-weight: 600; line-height: 1.4; padding: 10px 16px; }
.ck-summary__disc > span:last-child { color: #0f7a3a; font-weight: 600; }
.ck-summary__row[hidden] { display: none; }
