/* SMARTERS Checkout — blank-canvas, mobile-first, conversion-focused. */

:root {
    /* SMARTERS brand palette (see SMARTERS_Design_System.pptx).
       Neutral "Black Not" CTA + Smart Green accents; greens lead, accents
       (red/yellow) only on white/tints, never on green. */
    --smc-bg: #f1f1f1;            /* Not White */
    --smc-card: #ffffff;
    --smc-ink: #0a1e0d;           /* Black Not */
    --smc-muted: #5c6e5e;         /* muted green-gray */
    --smc-line: #e2e4e0;          /* soft green-tinted border */
    --smc-accent: #0a1e0d;        /* CTA bg — Black Not (neutral, on-brand) */
    --smc-accent-ink: #ffffff;
    --smc-brand: #14aa41;         /* Smart Green — links, checks, focus, accents */
    --smc-brand-dark: #0a6423;    /* Dark Green — hovers, success/guarantee text */
    --smc-bump: #fcf4e0;          /* Royal Yellow tint */
    --smc-bump-line: #eac071;     /* Royal Yellow */
    --smc-ok: #0a6423;            /* success text — Dark Green */
    --smc-ok-bg: #e7f3ea;         /* pale green fill (guarantee/badges) */
    --smc-err: #dc2828;           /* Passion Red */
    --smc-gold: #e0a92e;          /* star glyphs (legible gold) */
    --smc-radius: 14px;
    --smc-maxw: 520px;
    --font-brand: "Readex Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-eyebrow: "Courier New", Courier, monospace;
}

/* The canvas has no theme reset, so enforce these ourselves. */
[hidden] { display: none !important; }
img.wp-smiley, img.emoji {
    display: inline !important;
    height: 1em !important;
    width: 1em !important;
    margin: 0 .07em !important;
    vertical-align: -0.1em !important;
    border: none !important;
    box-shadow: none !important;
}

.smc-body {
    margin: 0;
    background: var(--smc-bg);
    color: var(--smc-ink);
    font-family: var(--font-brand);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Eyebrow — Courier New, uppercase, tracked. Brand device for small labels
   (price, section titles, secure/proof microcopy, divider). */
.smc-eyebrow {
    font-family: var(--font-eyebrow);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    font-size: 12px;
    color: var(--smc-muted);
}
.smc-secure-eyebrow { margin: 8px 0 0; }

.smc-shell {
    max-width: var(--smc-maxw);
    margin: 0 auto;
    padding: 20px 16px 64px;
}

.smc-logo {
    text-align: center;
    padding: 12px 0 20px;
}
.smc-logo img { max-height: 40px; width: auto; }
.smc-logo-text { font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }

.smc-card,
.smc-summary {
    background: var(--smc-card);
    border: 1px solid var(--smc-line);
    border-radius: var(--smc-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

/* Order summary */
.smc-product-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}
.smc-product-name { font-size: 22px; line-height: 1.3; margin: 0 0 4px; font-weight: 700; letter-spacing: -0.01em; }
.smc-product-price { font-size: 20px; font-weight: 700; white-space: nowrap; }
.smc-product-sub { color: var(--smc-muted); margin: 8px 0 0; font-size: 14px; }
.smc-product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--smc-line);
}
.smc-price-label { color: var(--smc-muted); font-size: 14px; }
.smc-includes { margin-top: 14px; font-size: 14px; }
.smc-includes-title { margin: 0; font-weight: 600; }
.smc-includes ul { margin: 8px 0 0; padding-left: 0; list-style: none; }
.smc-includes li { margin: 6px 0; padding-left: 24px; position: relative; }
.smc-includes li::before { content: "✓"; position: absolute; left: 0; color: var(--smc-brand); font-weight: 700; }

/* Express checkout */
.smc-express { margin-bottom: 14px; }
.smc-divider {
    text-align: center;
    border-top: 1px solid var(--smc-line);
    margin: 18px 0;
    position: relative;
}
.smc-divider span {
    position: relative;
    top: -11px;
    background: var(--smc-bg);
    padding: 0 12px;
    color: var(--smc-muted);
    font-size: 13px;
}

/* Form */
.smc-form { background: transparent; }
.smc-loggedin-note {
    font-size: 13px;
    color: var(--smc-muted);
    background: #f0f4ff;
    border: 1px solid #dbe3ff;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0 0 14px;
}
.smc-field { margin-bottom: 14px; }
.smc-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}
.smc-field input[type="email"],
.smc-field input[type="text"],
.smc-field input[type="tel"],
.smc-field input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 16px; /* >=16px stops iOS zoom */
    border: 1px solid var(--smc-line);
    border-radius: 10px;
    background: #fff;
    color: var(--smc-ink);
}
.smc-field input:focus {
    outline: none;
    border-color: var(--smc-brand);
    box-shadow: 0 0 0 3px rgba(20, 170, 65, 0.18);
}
#smc-payment-element,
#smc-upsell-payment-element { margin-top: 4px; }

.smc-error { color: var(--smc-err); font-size: 13px; margin: 6px 0 0; min-height: 1px; }

/* B2B expander */
.smc-b2b {
    border: 1px dashed var(--smc-line);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
}
.smc-b2b summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.smc-b2b .smc-field { margin-top: 12px; }

/* Order bump */
.smc-bump {
    border: 2px dashed var(--smc-bump-line);
    background: var(--smc-bump);
    border-radius: 10px;
    padding: 14px;
    margin: 4px 0 18px;
}
.smc-bump-label { display: flex; gap: 12px; cursor: pointer; align-items: flex-start; }
.smc-bump-label input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; }
.smc-bump-body { display: flex; gap: 8px; }
.smc-bump-cue { font-size: 18px; }
.smc-bump-text strong { display: block; font-size: 15px; }
.smc-bump-price { color: var(--smc-ok); }
.smc-bump-benefit { display: block; font-size: 13px; color: var(--smc-muted); margin-top: 2px; }
/* Struck-through regular price shown as a discount anchor (bump + upsell) */
.smc-price-was { color: var(--smc-muted); text-decoration: line-through; font-weight: 400; margin-right: 4px; }

/* Pay button */
.smc-submit {
    width: 100%;
    border: none;
    border-radius: 12px;
    background: var(--smc-accent);
    color: var(--smc-accent-ink);
    padding: 16px 20px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: opacity 0.15s ease, transform 0.05s ease;
}
.smc-submit:hover { opacity: 0.92; }
.smc-submit:active { transform: translateY(1px); }
.smc-submit:disabled { opacity: 0.5; cursor: default; }
.smc-submit.is-loading { opacity: 0.7; cursor: progress; }
.smc-submit.is-done { background: var(--smc-ok); }
.smc-submit-total { background: rgba(255,255,255,0.18); padding: 4px 10px; border-radius: 999px; font-size: 15px; }

/* Immediacy cue under the CTA — present-bias reassurance ("instant access"). */
.smc-immediacy { text-align: center; font-size: 13px; font-weight: 600; color: var(--smc-brand-dark); margin: 10px 0 0; }

/* Card-field reassurance at the highest-anxiety input. */
.smc-card-trust { font-size: 12px; color: var(--smc-muted); margin: 6px 0 0; }

/* Trust signals */
.smc-trust { text-align: center; margin-top: 16px; font-size: 13px; color: var(--smc-muted); }
.smc-trust p { margin: 4px 0; }
.smc-trust-guarantee { color: var(--smc-ok); font-weight: 600; }

/* Social proof — up to 3 testimonials, stacked (graceful for any count) */
.smc-social { margin-bottom: 16px; }
.smc-social-title { font-weight: 700; font-size: 15px; margin: 0 0 10px; }
.smc-testimonials { display: flex; flex-direction: column; gap: 10px; }
.smc-testimonial {
    margin: 0;
    padding: 14px 16px;
    background: #fafafa;
    border-radius: 10px;
    border: 1px solid var(--smc-line);
}
.smc-testimonial blockquote { margin: 0; font-style: italic; }
.smc-testimonial figcaption { margin-top: 8px; font-size: 13px; color: var(--smc-muted); }
.smc-stars { color: var(--smc-gold); }
.smc-testimonial .smc-stars { display: block; margin-bottom: 6px; }

/* Order summary — itemised total in the decision zone (price off the button) */
.smc-order-summary {
    border: 1px solid var(--smc-line);
    border-radius: 10px;
    padding: 12px 14px;
    margin: 4px 0 14px;
    font-size: 15px;
}
.smc-order-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.smc-order-row span:last-child { white-space: nowrap; }
.smc-order-total {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--smc-line);
    font-weight: 700;
    font-size: 17px;
}

/* Guarantee badge — risk reversal, prominent beside the CTA */
.smc-guarantee-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 12px 16px;
    border: 1px solid var(--smc-brand);
    border-radius: 10px;
    background: var(--smc-ok-bg);
    color: var(--smc-ok);
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}
.smc-guarantee-icon { font-size: 18px; line-height: 1; }

/* Terms / privacy microcopy */
.smc-terms { text-align: center; font-size: 12px; color: var(--smc-muted); margin: 12px 0 0; }
.smc-terms a { color: var(--smc-brand-dark); }

/* Success lock overlay */
.smc-success-lock {
    position: fixed;
    inset: 0;
    background: rgba(246, 247, 249, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.smc-success-inner { text-align: center; font-weight: 600; }

/* Spinner */
.smc-spinner {
    width: 28px; height: 28px;
    margin: 8px auto;
    border: 3px solid var(--smc-line);
    border-top-color: var(--smc-accent);
    border-radius: 50%;
    animation: smc-spin 0.8s linear infinite;
}
@keyframes smc-spin { to { transform: rotate(360deg); } }

/* Upsell */
.smc-receipt { text-align: center; margin-bottom: 18px; }
.smc-receipt-badge {
    width: 54px; height: 54px; line-height: 54px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: var(--smc-ok);
    color: #fff;
    font-size: 28px;
}
.smc-receipt h1 { font-size: 22px; margin: 0 0 6px; }
.smc-receipt-sub { color: var(--smc-muted); margin: 0; }

.smc-offer-headline { font-size: 20px; margin: 0 0 8px; }
.smc-offer-sub { color: var(--smc-muted); margin: 0 0 14px; }
.smc-offer-includes { margin: 0 0 16px; padding-left: 18px; }
.smc-offer-includes li { margin: 5px 0; }
.smc-oto-note {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--smc-err);
    background: #fef3f2;
    border: 1px solid #fecdca;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0 0 14px;
}
.smc-offer-magic { font-weight: 600; text-align: center; margin: 14px 0; }
.smc-inline-card { margin: 14px 0; }
.smc-inline-note { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.smc-consent { font-size: 12px; color: var(--smc-muted); text-align: center; margin: 8px 0 0; }
.smc-offer-guarantee { text-align: center; color: var(--smc-ok); font-weight: 600; font-size: 13px; margin: 12px 0 0; }

.smc-decline {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--smc-muted);
    text-decoration: underline;
    font-size: 14px;
    padding: 14px 0 4px;
    cursor: pointer;
}

/* Thank-you */
.smc-thankyou { max-width: var(--smc-maxw); margin: 0 auto; padding: 32px 16px; }
.smc-ty-title { font-size: 24px; margin: 0 0 8px; }
.smc-ty-status { color: var(--smc-muted); }
.smc-access-title { font-weight: 600; margin: 16px 0 6px; }
.smc-access-list { margin: 0 0 16px; padding-left: 18px; }
.smc-account-btn { text-decoration: none; margin-top: 12px; }
.smc-account-note { font-size: 13px; color: var(--smc-muted); margin-top: 10px; }

/* Invalid */
.smc-invalid-card { text-align: center; }
.smc-link { color: var(--smc-brand-dark); }

/* Proof bar — optional rating + buyer count, near the headline. Renders only
   when authored (no fake numbers). Compact, eyebrow-styled. */
.smc-proof {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0 0;
}
.smc-proof .smc-stars { color: var(--smc-gold); font-size: 15px; letter-spacing: 1px; }
.smc-proof-rating { font-weight: 700; font-size: 14px; }
.smc-proof-count { font-size: 13px; color: var(--smc-muted); }

/* Payment-method marks — small inline SVG brand logos (replaces emoji). */
.smc-cardmarks { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.smc-cardmarks svg { height: 24px; width: auto; display: block; }

/* Sticky mobile pay bar — always-in-thumb-reach CTA on phones. Mirrors the
   inline submit's state; hidden on desktop and once the inline button shows. */
.smc-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--smc-card);
    border-top: 1px solid var(--smc-line);
    box-shadow: 0 -2px 12px rgba(10, 30, 13, 0.08);
}
.smc-sticky-total { display: flex; flex-direction: column; line-height: 1.2; }
.smc-sticky-total-label { font-family: var(--font-eyebrow); text-transform: uppercase; letter-spacing: 0.06em; font-size: 10px; color: var(--smc-muted); }
.smc-sticky-total-amount { font-weight: 700; font-size: 18px; white-space: nowrap; }
.smc-sticky-btn {
    flex: 1;
    border: none;
    border-radius: 12px;
    background: var(--smc-accent);
    color: var(--smc-accent-ink);
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}
.smc-sticky-btn:disabled { opacity: 0.5; cursor: default; }
.smc-sticky-btn.is-loading { opacity: 0.7; cursor: progress; }
/* Desktop: no sticky bar (inline CTA is always reachable). */
@media (min-width: 600px) {
    .smc-shell { padding-top: 32px; }
    .smc-sticky-bar { display: none !important; }
}
/* Mobile: leave room so the fixed bar never occludes the form footer. */
@media (max-width: 599px) {
    .smc-checkout-body .smc-shell { padding-bottom: 96px; }
}
