/**
 * COD Templates Stylesheet (v9.2.124)
 *
 * Base styles + layout variants + form input theming. Everything reads from
 * CSS custom properties scoped to .cod-tpl, so changing the variables
 * (which COD_Template_Engine injects inline per render) re-skins the whole
 * form without changing a single rule below.
 *
 * Layout classes:
 *   .cod-tpl-classic      → single column, centered
 *   .cod-tpl-split        → 2-col grid (aside + main); collapses to 1col <768px
 *   .cod-tpl-centered_card → bold card on dark/colored bg
 */

/* ============================================================
   BASE — variable consumption + layout-agnostic styles
   ============================================================ */
.cod-tpl {
    /* Fallback values if the inline style block somehow doesn't load */
    --cod-primary: #2563eb;
    --cod-secondary: #1e40af;
    --cod-accent: #f59e0b;
    --cod-bg: #ffffff;
    --cod-surface: #f8fafc;
    --cod-text: #0f172a;
    --cod-text-muted: #64748b;
    --cod-border: #e2e8f0;
    --cod-heading-font: 'Inter', sans-serif;
    --cod-body-font: 'Inter', sans-serif;
    --cod-base-size: 15px;
    
    background: var(--cod-bg);
    color: var(--cod-text);
    font-family: var(--cod-body-font);
    font-size: var(--cod-base-size);
    line-height: 1.6;
    box-sizing: border-box;
}
.cod-tpl *,
.cod-tpl *::before,
.cod-tpl *::after {
    box-sizing: border-box;
}

.cod-tpl h1, .cod-tpl h2, .cod-tpl h3, .cod-tpl h4 {
    font-family: var(--cod-heading-font);
    color: var(--cod-text);
    line-height: 1.3;
}

.cod-tpl-logo {
    display: block;
    max-width: 200px;
    height: auto;
}

.cod-tpl-hero {
    font-size: 1.6em;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--cod-text);
}

.cod-tpl-hero-sub {
    font-size: 0.95em;
    color: var(--cod-text-muted);
    margin: 0 0 20px;
    line-height: 1.5;
}

.cod-tpl-bullets {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
}
.cod-tpl-bullets li {
    padding: 8px 0;
    font-size: 0.95em;
    color: var(--cod-text);
    border-bottom: 1px solid var(--cod-border);
}
.cod-tpl-bullets li:last-child { border-bottom: none; }

/* ============================================================
   FORM INPUTS — theme via CSS variables
   ============================================================ */
.cod-tpl input[type="text"],
.cod-tpl input[type="email"],
.cod-tpl input[type="tel"],
.cod-tpl input[type="number"],
.cod-tpl select,
.cod-tpl textarea {
    background: var(--cod-bg);
    color: var(--cod-text);
    border: 1px solid var(--cod-border);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: var(--cod-base-size);
    font-family: var(--cod-body-font);
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.cod-tpl input[type="text"]:focus,
.cod-tpl input[type="email"]:focus,
.cod-tpl input[type="tel"]:focus,
.cod-tpl input[type="number"]:focus,
.cod-tpl select:focus,
.cod-tpl textarea:focus {
    outline: none;
    border-color: var(--cod-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cod-primary) 20%, transparent);
}

.cod-tpl label {
    color: var(--cod-text);
    font-weight: 500;
    font-size: 0.9em;
    margin-bottom: 6px;
    display: block;
}

.cod-tpl button[type="submit"],
.cod-tpl .cod-submit-btn,
.cod-tpl input[type="submit"] {
    background: var(--cod-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.15s, transform 0.05s;
}
.cod-tpl button[type="submit"]:hover,
.cod-tpl .cod-submit-btn:hover,
.cod-tpl input[type="submit"]:hover {
    background: var(--cod-secondary);
}
.cod-tpl button[type="submit"]:active,
.cod-tpl .cod-submit-btn:active,
.cod-tpl input[type="submit"]:active {
    transform: translateY(1px);
}

/* Accent (highlights, badges, urgency cues) */
.cod-tpl .cod-accent,
.cod-tpl .cod-urgency,
.cod-tpl .cod-discount-applied {
    background: var(--cod-accent);
    color: #fff;
}

/* ============================================================
   LAYOUT: CLASSIC — single column, centered, max-width
   ============================================================ */
.cod-tpl-classic .cod-tpl-classic-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 32px 24px;
    background: var(--cod-bg);
}

/* ============================================================
   LAYOUT: SPLIT — 2-col on desktop, stacked mobile
   ============================================================ */
.cod-tpl-split .cod-tpl-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-width: 1100px;
    margin: 0 auto;
    background: var(--cod-bg);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
.cod-tpl-split .cod-tpl-aside {
    background: var(--cod-surface);
    padding: 48px 36px;
    border-right: 1px solid var(--cod-border);
}
.cod-tpl-split .cod-tpl-main {
    padding: 48px 36px;
    background: var(--cod-bg);
}

/* Stack on mobile */
@media (max-width: 768px) {
    .cod-tpl-split .cod-tpl-inner {
        grid-template-columns: 1fr;
        border-radius: 0;
        box-shadow: none;
    }
    .cod-tpl-split .cod-tpl-aside {
        border-right: none;
        border-bottom: 1px solid var(--cod-border);
        padding: 32px 20px;
    }
    .cod-tpl-split .cod-tpl-main {
        padding: 32px 20px;
    }
}

/* ============================================================
   LAYOUT: CENTERED CARD — bold, dramatic, designed for dark themes
   ============================================================ */
.cod-tpl-centered_card .cod-tpl-card-outer {
    background: var(--cod-bg);
    min-height: 100vh;
    padding: 40px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.cod-tpl-centered_card .cod-tpl-card {
    background: var(--cod-surface);
    border: 1px solid var(--cod-border);
    border-radius: 16px;
    padding: 40px 36px;
    max-width: 560px;
    width: 100%;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
}
.cod-tpl-centered_card .cod-tpl-card .cod-tpl-logo-wrap {
    text-align: center;
    margin-bottom: 20px;
}
.cod-tpl-centered_card .cod-tpl-card .cod-tpl-hero {
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 12px;
}
.cod-tpl-centered_card .cod-tpl-card .cod-tpl-hero-sub {
    text-align: center;
    margin-bottom: 28px;
}

/* On the dark template, ensure form labels stay readable */
.cod-tpl-centered_card label {
    color: var(--cod-text);
}
.cod-tpl-centered_card input[type="text"],
.cod-tpl-centered_card input[type="email"],
.cod-tpl-centered_card input[type="tel"],
.cod-tpl-centered_card input[type="number"],
.cod-tpl-centered_card select,
.cod-tpl-centered_card textarea {
    background: color-mix(in srgb, var(--cod-bg) 50%, var(--cod-surface));
    color: var(--cod-text);
    border-color: var(--cod-border);
}

@media (max-width: 768px) {
    .cod-tpl-centered_card .cod-tpl-card {
        padding: 28px 20px;
    }
}

/* ============================================================
   RESPONSIVE — global tweaks
   ============================================================ */
@media (max-width: 480px) {
    .cod-tpl-hero { font-size: 1.4em; }
    .cod-tpl-hero-sub { font-size: 0.9em; }
}

/* ============================================================
   v9.2.125 — THANK-YOU TEMPLATES
   Same CSS-variable approach as checkout. Vars are scoped to .cod-ty-tpl
   with --cod-ty-* prefix so checkout + thank-you can coexist on one page.
   ============================================================ */
.cod-ty-tpl {
    --cod-ty-primary: #10b981;
    --cod-ty-secondary: #059669;
    --cod-ty-accent: #f59e0b;
    --cod-ty-bg: #ffffff;
    --cod-ty-surface: #ecfdf5;
    --cod-ty-text: #0f172a;
    --cod-ty-text-muted: #64748b;
    --cod-ty-border: #a7f3d0;
    --cod-ty-heading-font: 'Plus Jakarta Sans', sans-serif;
    --cod-ty-body-font: 'Inter', sans-serif;
    --cod-ty-base-size: 15px;
    
    background: var(--cod-ty-bg);
    color: var(--cod-ty-text);
    font-family: var(--cod-ty-body-font);
    font-size: var(--cod-ty-base-size);
    line-height: 1.6;
    box-sizing: border-box;
}
.cod-ty-tpl *,
.cod-ty-tpl *::before,
.cod-ty-tpl *::after { box-sizing: border-box; }

.cod-ty-tpl h1, .cod-ty-tpl h2, .cod-ty-tpl h3, .cod-ty-tpl h4 {
    font-family: var(--cod-ty-heading-font);
    color: var(--cod-ty-text);
    line-height: 1.3;
}

.cod-ty-tpl .cod-ty-logo {
    display: block;
    max-width: 180px;
    height: auto;
}

.cod-ty-tpl .cod-ty-hero {
    font-size: 2em;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--cod-ty-text);
}

.cod-ty-tpl .cod-ty-hero-sub {
    font-size: 1em;
    color: var(--cod-ty-text-muted);
    margin: 0 0 24px;
    line-height: 1.6;
}

/* ============================================================
   LAYOUT: CELEBRATION
   ============================================================ */
.cod-ty-tpl-celebration .cod-ty-celebration-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 20px;
    background: var(--cod-ty-bg);
}
.cod-ty-tpl-celebration .cod-ty-hero-area {
    text-align: center;
    padding: 32px 20px 24px;
    background: var(--cod-ty-surface);
    border: 1px solid var(--cod-ty-border);
    border-radius: 16px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.cod-ty-tpl-celebration .cod-ty-checkmark-wrap {
    margin: 0 auto 16px;
    display: flex;
    justify-content: center;
}
.cod-ty-tpl-celebration .cod-ty-checkmark {
    width: 80px;
    height: 80px;
    background: var(--cod-ty-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    font-weight: 700;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--cod-ty-primary) 40%, transparent);
    animation: cod-ty-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cod-ty-pop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
.cod-ty-tpl-celebration .cod-ty-hero {
    font-size: 2.2em;
    color: var(--cod-ty-primary);
}
.cod-ty-tpl-celebration .cod-ty-content {
    background: var(--cod-ty-bg);
}

/* ============================================================
   LAYOUT: MINIMAL — restrained, professional, serif heading
   ============================================================ */
.cod-ty-tpl-minimal .cod-ty-minimal-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 60px 24px 40px;
    text-align: left;
}
.cod-ty-tpl-minimal .cod-ty-minimal-divider {
    width: 40px;
    height: 2px;
    background: var(--cod-ty-accent);
    margin: 0 0 24px;
}
.cod-ty-tpl-minimal .cod-ty-hero {
    font-size: 2.4em;
    font-weight: 600;
}
.cod-ty-tpl-minimal .cod-ty-hero-sub {
    max-width: 520px;
    margin-bottom: 36px;
}
.cod-ty-tpl-minimal .cod-ty-content {
    border-top: 1px solid var(--cod-ty-border);
    padding-top: 32px;
    margin-top: 24px;
}

/* ============================================================
   LAYOUT: URGENCY & FOLLOW-UP — bold red banner, conversion-focused
   ============================================================ */
.cod-ty-tpl-urgency .cod-ty-urgency-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 0 40px;
    background: var(--cod-ty-bg);
}
.cod-ty-tpl-urgency .cod-ty-urgency-banner {
    background: var(--cod-ty-primary);
    color: #fff;
    padding: 14px 20px;
    text-align: center;
    margin-bottom: 24px;
}
.cod-ty-tpl-urgency .cod-ty-urgency-badge {
    background: #fff;
    color: var(--cod-ty-primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 1px;
    display: inline-block;
}
.cod-ty-tpl-urgency .cod-ty-logo-wrap {
    text-align: center;
    padding: 0 20px;
}
.cod-ty-tpl-urgency .cod-ty-hero,
.cod-ty-tpl-urgency .cod-ty-hero-sub {
    text-align: center;
    padding: 0 20px;
}
.cod-ty-tpl-urgency .cod-ty-hero {
    font-size: 2em;
}
.cod-ty-tpl-urgency .cod-ty-content {
    padding: 0 20px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
    .cod-ty-tpl .cod-ty-hero { font-size: 1.6em; }
    .cod-ty-tpl-celebration .cod-ty-checkmark {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }
    .cod-ty-tpl-minimal .cod-ty-hero { font-size: 1.8em; }
    .cod-ty-tpl-minimal .cod-ty-minimal-wrap { padding: 40px 20px 24px; }
}

/* ============================================================
   v9.2.126 — TEMPLATE RESET: when the form is wrapped by a
   template, the template controls width and chrome. The inner
   .cod-order-form-wrapper from cod-order-form.css imposes a
   600px cap that turns the form into a narrow column inside
   wider layouts (especially Modern Split's right pane). These
   resets let the template's wrapper geometry win.
   ============================================================ */

/* Inner form wrapper: drop the 600px cap and the auto-centering
   margin so it fills whatever the template gives it */
.cod-tpl .cod-order-form-wrapper {
    max-width: none;
    width: 100%;
    margin: 0;
}

/* Inner form container: drop the redundant card chrome (the template's
   own surface/card already provides background, border, padding) */
.cod-tpl .cod-form-container {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

/* Inputs: ensure full-width fills */
.cod-tpl .cod-order-form-wrapper input[type="text"],
.cod-tpl .cod-order-form-wrapper input[type="email"],
.cod-tpl .cod-order-form-wrapper input[type="tel"],
.cod-tpl .cod-order-form-wrapper input[type="number"],
.cod-tpl .cod-order-form-wrapper select,
.cod-tpl .cod-order-form-wrapper textarea {
    width: 100%;
    max-width: none;
}

/* Premium Dark template: form input default white background fights the
   dark surface. Make inputs read from the dark palette. */
.cod-tpl-centered_card .cod-form-container,
.cod-tpl-centered_card .cod-order-form-wrapper {
    color: var(--cod-text);
}
.cod-tpl-centered_card .cod-form-container label,
.cod-tpl-centered_card .cod-order-form-wrapper label {
    color: var(--cod-text);
}

/* Mobile: the existing form CSS has its own breakpoints at 480/768.
   Preserve them but make sure the template wrapper doesn't add
   competing horizontal padding. */
@media (max-width: 480px) {
    .cod-tpl-classic .cod-tpl-classic-wrap {
        padding: 16px 12px;
    }
    .cod-tpl-split .cod-tpl-aside,
    .cod-tpl-split .cod-tpl-main {
        padding: 24px 16px;
    }
    .cod-tpl-centered_card .cod-tpl-card {
        padding: 22px 16px;
    }
}

/* Thank-you template reset: same idea as checkout — when the
   thank-you page is wrapped by a template, the template controls
   width. The inner .cod-thank-you-wrapper has its own 700px cap. */
.cod-ty-tpl .cod-thank-you-wrapper {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
}
