/* ===================================================================
   PickUpFirst — FluentCart checkout + receipt (loaded only on those pages,
   see inc/checkout.php). FluentCart's stylesheets load after this one, so
   every rule is scoped under body.pf-co to win on specificity.
   Relies on FluentCart 2.2.0 markup: .fct_checkout_inner, .fct_checkout_form,
   .fct_checkout_summary, .fct_summary, .fct_summary_box, .fct_place_order_btn,
   .fct-order-processing, .fct-thank-you-page-*. See DESIGN.md → Checkout.
   =================================================================== */

/* ---------- shell ---------- */
.pf-co { background: var(--bg-alt); min-height: 100vh; display: flex; flex-direction: column; }
.pf-co main.co { flex: 1; padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(3rem, 6vw, 5rem); }

.co-bar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.admin-bar .co-bar { top: 32px; }
@media (max-width: 782px) { .admin-bar .co-bar { top: 46px; } }
@media (max-width: 600px) { .admin-bar .co-bar { top: 0; } }
.co-bar__inner { display: flex; align-items: center; gap: 1.25rem; height: 60px; }
.co-bar__secure { display: inline-flex; align-items: center; gap: 7px; color: var(--signal-text); padding-left: 1.25rem; border-left: 1px solid var(--line); height: 22px; }
.co-bar__secure .i { width: 15px; height: 15px; color: var(--signal-ink); }
.co-bar__help { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.co-bar__help:hover { color: var(--ink); }
.co-bar__help .i { width: 15px; height: 15px; }

.co__intro { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.co__title { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.08; letter-spacing: -0.04em; font-weight: 600; text-wrap: balance; }
.co__lede { margin-top: .6rem; color: var(--muted); font-size: 15.5px; max-width: 62ch; }

.co-foot { border-top: 1px solid var(--line); background: #fff; padding: 22px 0; font-size: 13px; color: var(--muted); }
.co-foot__inner { display: flex; justify-content: space-between; align-items: center; gap: 10px 24px; flex-wrap: wrap; }
.co-foot__links { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.co-foot__links a:hover { color: var(--ink); }

/* ---------- FluentCart palette (checkout-scoped variables) ---------- */
body.pf-co .fluent-cart-checkout-page,
body.pf-co .fct-thank-you-page {
  --fct-primary-text-color: var(--ink);
  --fct-border-color: var(--line);
  --fct-card-bg-color: #fff;
  --fct-checkout-primary-text-color: var(--ink);
  --fct-checkout-secondary-text-color: var(--muted);
  --fct-checkout-border-color: var(--line-strong);
  --fct-checkout-active-border-color: var(--ink);
  --fct-checkout-primary-bg-color: var(--ink);
  --fct-checkout-secondary-bg-color: var(--bg-alt);
  --fct-checkout-btn-bg-color: var(--ink);
  --fct-checkout-btn-text-color: #fff;
  --fct-checkout-btn-hover-bg-color: #24272c;
  --fct-checkout-btn-hover-text-color: #fff;
  --fct-btn-border-color: var(--ink);
  --fct-checkout-input-bg-color: #fff;
  --fct-checkout-input-text-color: var(--ink);
  --fct-checkout-input-placeholder-text-color: #8b9098;
  --fct-checkout-input-disabled-bg-color: var(--bg-alt);
  --fct-checkout-input-border-color: var(--line-strong);
  --fct-checkout-summary-bg-color: #fff;
  --fct-checkout-payment-method-bg-color: #fff;
  --fct-checkout-radio-border-color: var(--line-strong);
  --fct-checkout-radio-active-border-color: var(--ink);
  --fct-checkout-radio-active-bg-color: var(--ink);
  --fct-checkout-badge-bg-color: var(--ink);
  --fct-input-radius: var(--r-sm);
  --fct-btn-radius: 999px;
  --fct-card-radius: var(--r-lg);
  --fct-container-radius: var(--r);
  font-family: var(--sans);
  color: var(--ink);
}

/* ---------- layout: form left, summary right; stacked (summary under form) when narrow ---------- */
body.pf-co .fluent-cart-checkout-page { padding: 0; max-width: none; }
body.pf-co .fct_checkout { max-width: none; }
body.pf-co .fct_checkout_inner { column-gap: clamp(28px, 4vw, 56px); align-items: flex-start; }
body.pf-co .fct_checkout_inner .fct_checkout_form { width: auto; flex: 1 1 0; min-width: 0; padding-bottom: 0; }
body.pf-co .fct_checkout_inner .fct_checkout_summary { width: 420px; flex: none; }
@container checkout-page (max-width: 900px) {
  body.pf-co .fct_checkout_inner { flex-direction: column; gap: 28px; }
  body.pf-co .fct_checkout_inner .fct_checkout_form,
  body.pf-co .fct_checkout_inner .fct_checkout_summary { width: 100%; }
}

/* the form column reads as one white card */
body.pf-co .fct_checkout_form_items {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh);
  padding: clamp(20px, 3vw, 28px);
}
body.pf-co .fct_checkout_form_section .fct_form_section_header_label,
body.pf-co .fct_checkout_form_section h4.fct_form_section_header_label {
  font: 500 11.5px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0;
}
body.pf-co .fct_checkout_form_items > .fct_checkout_form_section + *,
body.pf-co .fct_checkout_billing_and_shipping { margin-top: 22px; }

/* inputs */
body.pf-co .fct_checkout .fct-input,
body.pf-co .fct_checkout .fct-nice-select { font-family: var(--sans); font-size: 15px; color: var(--ink); }
body.pf-co .fct_checkout .fct-input:focus,
body.pf-co .fct_checkout .fct-nice-select:focus,
body.pf-co .fct_checkout .fct-nice-select.open { outline: none; border-color: var(--signal-ink); box-shadow: var(--ring); position: relative; z-index: 1; }
body.pf-co .fct_checkout [data-fct-label]::after { font-family: var(--sans); color: var(--muted); }

/* our trial note (printed by the pickupfirst-engine plugin with inline styles) */
body.pf-co .pf-trial-note {
  position: relative; margin: 22px 0 0 !important; padding: 14px 16px 14px 44px !important;
  border-radius: var(--r) !important; background: var(--signal-soft) !important; border: 1px solid #c4ecd5;
  font-size: 14.5px; line-height: 1.5; color: var(--ink-2);
}
body.pf-co .pf-trial-note::before {
  content: "✓"; position: absolute; left: 14px; top: 13px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--signal-ink); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
}

/* the payment-terms tick box (pickupfirst-engine Commerce\CheckoutConsent), just above the order button */
body.pf-co .pf-consent { margin-top: 22px; }
body.pf-co .pf-consent .fct_checkout_agree_terms > div {
  padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line-strong); background: #fff;
}
body.pf-co .pf-consent label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--ink-2); cursor: pointer; }
body.pf-co .pf-consent input[type="checkbox"] { flex: none; margin-top: 3px; width: 17px; height: 17px; accent-color: var(--ink); }
body.pf-co .pf-consent input[aria-invalid="true"] { outline: 2px solid var(--miss); outline-offset: 2px; }
body.pf-co .pf-consent__more { display: block; margin: 6px 0 0 27px; font-size: 13px; }
body.pf-co .pf-consent__more a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
body.pf-co .pf-consent__more a:hover { color: var(--ink); }
body.pf-co .pf-consent__err { display: block; margin: 8px 0 0 27px; font-size: 13px; color: var(--miss-text); }
body.pf-co .pf-consent__err[hidden] { display: none; }

/* payment methods */
body.pf-co .fct_checkout_payment_methods { margin-top: 22px; }
body.pf-co .fct_checkout_payment_methods .fct_form_section_header { margin-bottom: 10px; }
body.pf-co .fct_checkout_payment_methods .fct-empty-state {
  padding: 14px 16px; border-radius: var(--r); border: 1px dashed var(--line-strong); background: var(--bg-alt);
  color: var(--muted); font-size: 14px;
}

/* order button: black pill */
body.pf-co .fct_place_order_btn_wrap { margin-top: 22px; }
body.pf-co .fct_place_order_btn {
  min-height: 52px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff;
  font: 500 16px/1 var(--sans); letter-spacing: -0.01em; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 1px 2px rgba(0, 0, 0, .2); background-image: none;
  transition: background .15s, opacity .15s;
}
body.pf-co .fct_place_order_btn:hover:not(:disabled) { background: #24272c; }
body.pf-co .fct_place_order_btn:disabled { opacity: .4; cursor: not-allowed; }
body.pf-co .fct_place_order_btn:focus-visible { outline: none; box-shadow: var(--ring); }
.pf-co-secure { display: flex; gap: 8px; align-items: flex-start; justify-content: center; margin: 12px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.pf-co-secure .i { width: 15px; height: 15px; margin-top: 2px; color: var(--signal-ink); }

/* ---------- summary column ---------- */
body.pf-co .fct_summary { display: flex; flex-direction: column; gap: 14px; }
body.pf-co .fct_summary > * { margin-top: 0; margin-bottom: 0; }
body.pf-co .fct_summary > .pf-co-plan { order: -1; }

/* FluentCart's own box: kept for the live total + coupon; its line item is replaced by our card */
body.pf-co .fct_summary .fct_summary_box .fct_checkout_form_section { margin-bottom: 0; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh); background: #fff; }
body.pf-co .fct_summary .fct_summary_box .fct_form_section_header { padding: 14px 20px; }
body.pf-co .fct_summary .fct_summary_box .fct_form_section_header h4 { font: 500 11.5px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0; }
body.pf-co .fct-checkout.pf-fc--plan .fct_summary_box .fct_items_wrapper { display: none; }
body.pf-co .fct-checkout.pf-fc--plan ul.fct_summary_items_list { margin-top: 0; padding-top: 0; border-top: 0; }
body.pf-co ul.fct_summary_items_list { font-size: 14px; color: var(--muted); }
body.pf-co ul.fct_summary_items_list .fct_summary_items_total { font-size: 16px; color: var(--ink); border-color: var(--line); }
body.pf-co .fct_coupon .fct_coupon_toggle a { background: transparent; padding: 6px 0; font-weight: 500; font-size: 13.5px; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
body.pf-co .fct_coupon .fct_coupon_toggle a:hover { color: var(--ink); }
body.pf-co .fct_item_payment_info .trial-days { display: none; } /* "Free Trial: 45 days" is the Stripe safety buffer, not the offer */

/* our plan card */
.pf-co-plan { background: #fff; border: 1px solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: 24px; }
.pf-co-plan__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pf-co-plan__k { color: var(--muted); }
.pf-co-plan__name { margin-top: 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 26px; line-height: 1.1; letter-spacing: -0.035em; font-weight: 600; }
.pf-co-plan__term { font: 500 11.5px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px; transform: translateY(-3px); }
.pf-co-plan__for { margin-top: 6px; color: var(--muted); font-size: 14.5px; }
.pf-co-plan__list { margin-top: 14px; font-size: 14.5px; color: var(--ink-2); }
.pf-co-plan__list li { padding: 7px 0 7px 26px; }
.pf-co-plan__list strong { color: var(--ink); font-weight: 600; }
.pf-co-plan__list li.is-no { color: var(--muted); }
.pf-co-plan__list li.is-no::before { content: "–"; color: var(--faint); }
.pf-co-plan__today { margin-top: 16px; padding: 14px 16px; border-radius: var(--r); background: var(--signal-soft); border: 1px solid #c4ecd5; }
.pf-co-plan__today-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pf-co-plan__today-row .mono { color: var(--signal-text); }
.pf-co-plan__today-row b { font-size: 30px; line-height: 1; letter-spacing: -0.04em; font-weight: 600; font-variant-numeric: tabular-nums; }
.pf-co-plan__today p { margin-top: 6px; font-size: 14px; color: var(--ink-2); font-weight: 500; text-wrap: pretty; }
/* recurring charge: plan + GST (10%) = total */
.pf-co-plan__bill { margin-top: 16px; padding: 12px 16px 4px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.pf-co-plan__bill .pf-co-plan__k { display: block; margin-bottom: 4px; }
.pf-co-plan__bill dl { margin: 0; font-size: 14px; }
.pf-co-plan__bill dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 7px 0; }
.pf-co-plan__bill dt { color: var(--muted); }
.pf-co-plan__bill dd { margin: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pf-co-plan__bill .pf-co-plan__total { border-top: 1px solid var(--line-2); padding: 10px 0 10px; }
.pf-co-plan__bill .pf-co-plan__total dt { color: var(--ink); font-weight: 500; }
.pf-co-plan__bill .pf-co-plan__total b { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.pf-co-plan__rows { margin: 14px 0 0; font-size: 14px; }
.pf-co-plan__rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.pf-co-plan__rows > div:first-child { border-top: 0; }
.pf-co-plan__rows dt { color: var(--muted); flex: none; max-width: 48%; }
.pf-co-plan__rows dd { margin: 0; text-align: right; color: var(--ink-2); }
.pf-co-plan__rows dd b { color: var(--ink); font-size: 17px; letter-spacing: -0.02em; font-weight: 600; font-variant-numeric: tabular-nums; }

/* before you add a card */
.pf-co-terms { border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; padding: 20px 22px; }
.pf-co-terms__k { color: var(--muted); font-weight: 500; }
.pf-co-terms__list { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.pf-co-terms__list li { position: relative; padding: 9px 0 9px 18px; border-top: 1px solid var(--line-2); }
.pf-co-terms__list li:first-child { border-top: 0; }
.pf-co-terms__list li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 5px; height: 5px; border-radius: 50%; background: var(--signal-ink); }
.pf-co-terms__links { margin-top: 10px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.pf-co-terms__links a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.pf-co-terms__links a:hover { text-decoration-color: var(--ink); }

/* trust points */
.pf-co-trust { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pf-co-trust li { display: flex; gap: 12px; align-items: center; font-size: 13.5px; color: var(--muted); }
.pf-co-trust b { color: var(--ink); font-weight: 600; }
.pf-co-trust__i { width: 30px; height: 30px; flex: none; border-radius: 9px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--signal-ink); }
.pf-co-trust__i .i { width: 15px; height: 15px; }

/* ---------- processing overlay (FluentCart JS adds .fct-order-processing to <body>) ---------- */
body.pf-co .fct-order-processing { background: rgba(250, 250, 250, .94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); gap: 6px; }
body.pf-co .fct-order-processing::before {
  content: ""; width: 44px; height: 44px; margin-bottom: 18px;
  background: url("../img/logo-mark.svg") center / contain no-repeat;
}
body.pf-co .fct-order-processing br { display: none; }
body.pf-co .fct-order-processing .fct-loader-spinner { order: 2; margin-top: 18px; }
body.pf-co .fct-order-processing .fct-loader-spinner::before,
body.pf-co .fct-order-processing .fct-loader-spinner::after { border-color: var(--line) !important; border-left-color: var(--signal-ink) !important; border-bottom-color: var(--signal-ink) !important; }
body.pf-co .fct-order-processing .loading-status { background: none; color: var(--ink); font: 600 clamp(1.4rem, 3vw, 1.9rem)/1.15 var(--sans); letter-spacing: -0.035em; padding: 0 24px; text-align: center; }
body.pf-co .fct-order-processing .fct-browser-notify { position: static; order: 1; background: none; color: var(--muted); font: 400 14.5px/1.5 var(--sans); padding: 0 24px; border-radius: 0; text-align: center; }

/* ---------- receipt / thank-you ---------- */
body.pf-co--receipt .co__body { max-width: 760px; margin-inline: auto; }
body.pf-co .fct-thank-you-page { padding: 0; background: none; }
body.pf-co .fct-thank-you-page-inner { max-width: none; margin: 0; padding: 0; }
body.pf-co .fct-thank-you-page-content { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh); overflow: hidden; font-family: var(--sans); color: var(--ink-2); }
body.pf-co .fct-thank-you-page-header { background: var(--signal-soft) !important; }
body.pf-co .fct-thank-you-page-header-title { font-family: var(--sans); letter-spacing: -0.03em; color: var(--ink) !important; }
body.pf-co .fct-thank-you-page-header-icon { background: var(--signal-ink) !important; }
body.pf-co .pf-receipt-hero ~ .fct-thank-you-page-header { display: none; }
body.pf-co .fct-thank-you-page-body { border: 0; border-radius: 0; background: #fff; color: var(--ink-2); }
body.pf-co .fct-thank-you-page-body-content-inner .no-print-title { color: var(--ink); letter-spacing: -0.025em; font-size: 20px; }
body.pf-co .fct-thank-you-page-body a { color: var(--ink); }
body.pf-co .fct-thank-you-page-body strong[style] { color: var(--ink) !important; }
body.pf-co .fct-thank-you-page-order-items-header,
body.pf-co .fct-thank-you-page-order-items-subscriptions-heading,
body.pf-co .fct-thank-you-page-order-items-addresses h5 { font: 500 11.5px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
body.pf-co .pf-receipt-hero ~ .fct-thank-you-page-body .fct-thank-you-page-order-items-addresses-ship-to { display: none; }
/* the renewal date FluentCart prints is the Stripe safety-buffer trial end, not when billing starts */
body.pf-co .pf-receipt-hero ~ .fct-thank-you-page-body .fct-thank-you-page-order-items-subscriptions-billing-infos-next-billing { display: none; }
body.pf-co .fct-thank-you-page-footer { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; padding: 22px 0 0; background: none; border: 0; }
body.pf-co .fct-thank-you-page-footer a {
  display: inline-flex; align-items: center; height: 40px; padding: 0 1rem; border-radius: 999px; font: 500 14px/1 var(--sans);
  background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--sh); text-decoration: none;
}
body.pf-co .fct-thank-you-page-footer a:hover { border-color: var(--line-strong); background: var(--bg-alt); }

.pf-receipt-hero { padding: clamp(28px, 5vw, 44px) clamp(22px, 5vw, 44px) clamp(24px, 4vw, 36px); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--signal-soft), #fff 85%); }
.pf-receipt-hero__mark { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--signal); display: grid; place-items: center; margin-bottom: 18px; }
.pf-receipt-hero__mark .i { width: 20px; height: 20px; stroke-width: 2.6; }
.pf-receipt-hero__k { color: var(--signal-text); }
.pf-receipt-hero__title { margin-top: 10px; font-size: clamp(1.9rem, 4.4vw, 2.8rem); line-height: 1.05; letter-spacing: -0.045em; font-weight: 600; color: var(--ink); text-wrap: balance; max-width: 18ch; }
.pf-receipt-hero__text { margin-top: 12px; color: var(--muted); font-size: 16px; max-width: 52ch; }
.pf-receipt-hero__actions { margin-top: 22px; }
.pf-receipt-hero__actions .btn { color: #fff; text-decoration: none; }

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  .co-bar__inner { gap: .8rem; height: 56px; }
  .co-bar__secure { padding-left: .8rem; }
  .co-bar__help span { display: none; }
  .pf-co-plan { padding: 20px; }
  .co-foot__inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .co-bar .brand span span, .co-bar .brand > span { font-size: 15px; }
}
