/* ================================================================
   SC Funnel — Shared Styles
   Brand: configured per-install via SC Core Site Setup
   Theme: Construction site. Yellow + orange + hazard black + blue.
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Baloo+2:wght@700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    /* ── SC brand palette ────────────────────────────────────
       Four brand accent colors (override in your theme or child CSS):
       construction yellow, safety orange, hazard black, builder blue.
       Greys are Tailwind "slate" so they sit correctly next to the
       #1E293B ink color (slate-800) used in the site header. */
    --scf-yellow:       #FFC72C;   /* header band, hazard stripe */
    --scf-yellow-dark:  #E0A800;
    --scf-yellow-light: #FFF6DC;
    --scf-orange:       #DD6F23;   /* primary CTA ("BOOK NOW!") */
    --scf-orange-dark:  #B85719;
    --scf-orange-light: #FDF0E6;
    --scf-blue:         #2563EB;   /* active nav pill, section headings */
    --scf-blue-dark:    #1D4ED8;
    --scf-blue-light:   #EFF4FE;
    --scf-ink:          #1E293B;   /* top bar / body text */
    --scf-black:        #000000;   /* hazard stripe only */

    /* ── Legacy aliases — DO NOT DELETE ────────────────────────
       The templates and JS were cloned from SC and reference
       --scf-red* / --scf-dark in ~33 places. Aliasing instead of
       renaming keeps this a one-file change; renaming would mean
       touching every template for zero functional gain. Treat the
       names above as canonical when writing NEW styles. */
    --scf-red:         var(--scf-orange);
    --scf-red-dark:    var(--scf-orange-dark);
    --scf-red-light:   var(--scf-orange-light);
    --scf-dark:        var(--scf-ink);

    /* ── Neutrals ─────────────────────────────────────────────── */
    --scf-grey:        #64748B;
    --scf-grey-light:  #F1F5F9;
    --scf-border:      #E2E8F0;
    --scf-white:       #FFFFFF;
    --scf-page-bg:     #F8FAFC;

    /* ── Status ───────────────────────────────────────────────── */
    --scf-success:     #059669;
    --scf-success-bg:  #ECFDF5;
    --scf-warning-bg:  #FFFBEB;
    --scf-warning:     #D97706;

    /* ── Layout ───────────────────────────────────────────────── */
    --scf-radius:      14px;
    --scf-shadow:      0 4px 24px rgba(0,0,0,0.08);
    --scf-font:        'Nunito', sans-serif;
    --scf-font-display:'Baloo 2', sans-serif;
    --scf-max-width:   520px;
    --scf-progress-h:  6px;
}

/* ── Hazard stripe ─────────────────────────────────────────────
   Replaces SC's checkered racing flag. Diagonal black/yellow
   caution banding, matching the strip under the homepage nav.
   Defined once here; the templates each carried their own copy of
   the old .scf-checkered rule, which is why the racing motif was
   hard to remove. New templates should use .scf-hazard only. */
.scf-hazard {
    height: 14px;
    background-image: repeating-linear-gradient(
        -45deg,
        var(--scf-black) 0px, var(--scf-black) 12px,
        var(--scf-yellow) 12px, var(--scf-yellow) 24px
    );
    margin: 0 -16px;
    flex-shrink: 0;
}

/* ── Reset ─────────────────────────────────────────────────── */
.scf-funnel-body *, .scf-funnel-body *::before, .scf-funnel-body *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Page layout ───────────────────────────────────────────── */
.scf-funnel-body {
    font-family: var(--scf-font);
    background: var(--scf-page-bg);
    min-height: 100vh;
    min-height: -webkit-fill-available; /* iOS Safari: excludes address bar */
    color: var(--scf-dark);
}

.scf-funnel-wrap {
    max-width: var(--scf-max-width);
    margin: 0 auto;
    padding: 0 16px 48px;
}

/* ── Progress bar ──────────────────────────────────────────── */
.scf-progress {
    height: var(--scf-progress-h);
    background: var(--scf-border);
    position: sticky;
    top: 0;
    z-index: 100;
    margin: 0 -16px;
}
.scf-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--scf-red), #FF6B6B);
    transition: width 0.5s ease;
    border-radius: 0 3px 3px 0;
}

/* ── Header ────────────────────────────────────────────────── */
.scf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 12px;
}
.scf-logo img {
    height: 48px;
    width: auto;
}
.scf-back-link {
    font-size: 14px;
    color: var(--scf-grey);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.scf-back-link:hover { color: var(--scf-red); }

/* ── Card ──────────────────────────────────────────────────── */
.scf-card {
    background: var(--scf-white);
    border-radius: var(--scf-radius);
    box-shadow: var(--scf-shadow);
    padding: 32px 28px;
    margin-top: 8px;
}

/* ── Step badge ────────────────────────────────────────────── */
.scf-step-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--scf-red);
    background: var(--scf-red-light);
    border-radius: 20px;
    padding: 4px 12px;
    margin-bottom: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Headings ──────────────────────────────────────────────── */
.scf-heading {
    font-family: var(--scf-font-display);
    font-size: 26px;
    font-weight: 800;
    color: var(--scf-dark);
    line-height: 1.2;
    margin-bottom: 6px;
}
.scf-subheading {
    font-size: 15px;
    color: var(--scf-grey);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ── Form fields ───────────────────────────────────────────── */
.scf-form { display: flex; flex-direction: column; gap: 18px; }

.scf-field { display: flex; flex-direction: column; gap: 6px; }

.scf-field label {
    font-size: 14px;
    font-weight: 700;
    color: var(--scf-dark);
}

.scf-required { color: var(--scf-red); }

.scf-field input[type="text"],
.scf-field input[type="email"],
.scf-field input[type="tel"],
.scf-field input[type="number"],
.scf-field textarea,
.scf-field select {
    border: 1.5px solid var(--scf-border);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: var(--scf-font);
    font-size: 16px; /* Must be ≥16px — iOS Safari auto-zooms on inputs < 16px */
    color: var(--scf-dark);
    background: var(--scf-white);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 100%;
}
.scf-field input:focus,
.scf-field textarea:focus,
.scf-field select:focus {
    border-color: var(--scf-red);
    box-shadow: 0 0 0 3px rgba(232,33,43,0.12);
}

.scf-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 400px) {
    .scf-field-row { grid-template-columns: 1fr; }
}

/* ── Radio cards ───────────────────────────────────────────── */
.scf-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.scf-radio-card {
    cursor: pointer;
}
.scf-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.scf-radio-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid var(--scf-border);
    border-radius: 10px;
    background: var(--scf-white);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.scf-radio-card input:checked + .scf-radio-inner {
    border-color: var(--scf-red);
    background: var(--scf-red-light);
    box-shadow: 0 0 0 3px rgba(232,33,43,0.08);
}
.scf-radio-icon { font-size: 20px; }
.scf-radio-label { font-size: 14px; font-weight: 700; color: var(--scf-dark); }

/* Package cards (larger) */
.scf-package-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.scf-package-card .scf-radio-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px 18px;
}
.scf-package-name { font-size: 16px; font-weight: 800; color: var(--scf-dark); }
.scf-package-price { font-size: 14px; color: var(--scf-red); font-weight: 700; }
.scf-package-desc { font-size: 13px; color: var(--scf-grey); line-height: 1.4; margin-top: 4px; }
.scf-package-tag {
    font-size: 11px;
    background: var(--scf-red-light);
    color: var(--scf-red);
    border-radius: 20px;
    padding: 2px 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Address autocomplete ──────────────────────────────────── */
.scf-address-wrap {
    width: 100%;
}

#scf-autocomplete-container {
    background: var(--scf-white);
    border-radius: 10px;
    border: 1.5px solid var(--scf-border);
    overflow: visible;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#scf-autocomplete-container:focus-within {
    border-color: var(--scf-red);
    box-shadow: 0 0 0 3px rgba(232,33,43,0.12);
}

#scf_address_search {
    border: none !important;
    box-shadow: none !important;
    padding: 12px 14px;
    font-family: var(--scf-font);
    font-size: 15px;
    color: var(--scf-dark);
    background: transparent;
    outline: none;
    width: 100%;
    border-radius: 10px;
}

/* Google autocomplete dropdown override */
.pac-container {
    border-radius: 10px;
    border: 1.5px solid var(--scf-border);
    box-shadow: var(--scf-shadow);
    font-family: var(--scf-font);
    margin-top: 4px;
}

gmp-place-autocomplete {
    width: 100%;
    display: block;
    color-scheme: light;
}

/* ── Duration options (packages step) ─────────────────────── */
.scf-duration-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.scf-duration-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border: 1.5px solid var(--scf-border);
    border-radius: 10px;
    background: var(--scf-white);
    font-family: var(--scf-font);
    font-size: 15px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    width: 100%;
    text-align: left;
}
.scf-duration-option:hover {
    border-color: var(--scf-red);
    background: var(--scf-red-light);
    box-shadow: 0 0 0 3px rgba(232,33,43,0.08);
}
.scf-duration-label {
    font-weight: 700;
    color: var(--scf-dark);
}
.scf-duration-price {
    font-weight: 800;
    color: var(--scf-red);
    font-size: 16px;
}

/* ── Package cards ─────────────────────────────────────────── */
.scf-package-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 8px;
}
.scf-package-card {
    position: relative;
    border: 1.5px solid var(--scf-border);
    border-radius: 12px;
    padding: 18px;
    background: var(--scf-white);
}
.scf-package-icon {
    font-size: 28px;
    margin-bottom: 6px;
}
.scf-package-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    background: var(--scf-red-light);
    color: var(--scf-red);
    border-radius: 20px;
    padding: 2px 10px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.scf-package-badge-gold {
    background: #FEF3C7;
    color: #B45309;
}
.scf-package-features {
    list-style: none;
    margin: 8px 0 14px;
    padding: 0;
    font-size: 13px;
    color: var(--scf-grey);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.scf-package-features li::before {
    content: '✓ ';
    color: var(--scf-success);
    font-weight: 700;
}

/* ── Radio row (side-by-side yes/no) ───────────────────────── */
.scf-radio-row {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}
.scf-radio-row .scf-radio-card {
    flex: 1;
}
.scf-radio-row .scf-radio-inner {
    justify-content: center;
    padding: 10px;
}

/* ── Checkbox card ─────────────────────────────────────────── */
.scf-checkbox-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid var(--scf-border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 8px;
}
.scf-checkbox-card:has(input:checked) {
    border-color: var(--scf-red);
    background: var(--scf-red-light);
}
.scf-checkbox-card input[type="checkbox"] {
    accent-color: var(--scf-red);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.scf-checkbox-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--scf-dark);
}
.scf-addon-price {
    color: var(--scf-red);
}

/* ── Summary total ─────────────────────────────────────────── */
.scf-summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    margin-top: 8px;
    border-top: 1.5px solid var(--scf-border);
    font-size: 16px;
    font-weight: 800;
    color: var(--scf-dark);
}

/* ── Addon note ────────────────────────────────────────────── */
.scf-addon-note {
    font-size: 12px;
    color: var(--scf-grey);
    margin: 2px 0 6px;
}
.scf-label-sm {
    font-size: 14px;
    font-weight: 700;
    color: var(--scf-dark);
}
.scf-addon-row {
    margin-bottom: 14px;
}

/* ── Routing status ────────────────────────────────────────── */
.scf-routing-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--scf-grey-light);
    border-radius: 10px;
    font-size: 14px;
    color: var(--scf-grey);
    font-weight: 600;
}
.scf-routing-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--scf-border);
    border-top-color: var(--scf-red);
    border-radius: 50%;
    animation: scf-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes scf-spin { to { transform: rotate(360deg); } }

/* ── Alerts ────────────────────────────────────────────────── */
.scf-alert {
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
}
.scf-alert-success {
    background: var(--scf-success-bg);
    color: var(--scf-success);
    border: 1.5px solid #A7F3D0;
}
.scf-alert-error {
    background: var(--scf-red-light);
    color: var(--scf-red-dark);
    border: 1.5px solid #FECACA;
}
.scf-alert-info {
    background: #EFF6FF;
    color: #1D4ED8;
    border: 1.5px solid #BFDBFE;
}
.scf-alert-warning {
    background: var(--scf-warning-bg);
    color: var(--scf-warning);
    border: 1.5px solid #FDE68A;
}

/* ── Error text ────────────────────────────────────────────── */
.scf-error {
    font-size: 12px;
    color: var(--scf-red);
    font-weight: 600;
    min-height: 16px;
}

/* ── Buttons ───────────────────────────────────────────────── */
.scf-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 10px;
    font-family: var(--scf-font);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    width: 100%;
    margin-top: 8px;
}
.scf-btn-primary {
    background: var(--scf-red);
    color: var(--scf-white);
    box-shadow: 0 4px 14px rgba(232,33,43,0.30);
}
.scf-btn-primary:hover:not(:disabled) {
    background: var(--scf-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(232,33,43,0.35);
}
.scf-btn-primary:active:not(:disabled) { transform: translateY(0); }
.scf-btn-primary:disabled {
    background: #D1D5DB;
    box-shadow: none;
    cursor: not-allowed;
}

.scf-btn-secondary {
    background: var(--scf-white);
    color: var(--scf-dark);
    border: 1.5px solid var(--scf-border);
}
.scf-btn-secondary:hover:not(:disabled) {
    background: var(--scf-grey-light);
    border-color: #9CA3AF;
}

/* ── Help text ─────────────────────────────────────────────── */
.scf-help-text {
    text-align: center;
    font-size: 13px;
    color: var(--scf-grey);
    margin-top: 20px;
}
.scf-help-text a { color: var(--scf-red); font-weight: 700; text-decoration: none; }
.scf-help-text a:hover { text-decoration: underline; }

/* ── Order summary (deposit page) ─────────────────────────── */
.scf-order-summary {
    background: var(--scf-grey-light);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}
.scf-order-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--scf-border);
    gap: 12px;
}
.scf-order-row:last-child { border-bottom: none; }
.scf-order-label { color: var(--scf-grey); font-weight: 600; flex-shrink: 0; }
.scf-order-value { color: var(--scf-dark); font-weight: 700; text-align: right; }
.scf-order-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 0 0;
    margin-top: 8px;
    font-size: 18px;
    font-weight: 800;
}
.scf-order-total-label { color: var(--scf-dark); }
.scf-order-total-value { color: var(--scf-red); }

/* ── Affiliate notice banner ───────────────────────────────── */
.scf-affiliate-notice {
    background: #FFF7ED;
    border: 1.5px solid #FED7AA;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 13px;
    color: #92400E;
    line-height: 1.5;
    margin-bottom: 16px;
}
.scf-affiliate-notice strong { display: block; font-size: 14px; margin-bottom: 2px; }

/* ── Checkbox addon items ──────────────────────────────────── */
.scf-addon-list { display: flex; flex-direction: column; gap: 10px; }
.scf-addon-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid var(--scf-border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.scf-addon-item:has(input:checked) {
    border-color: var(--scf-red);
    background: var(--scf-red-light);
}
.scf-addon-item input[type="checkbox"],
.scf-addon-item input[type="radio"] { margin-top: 2px; flex-shrink: 0; accent-color: var(--scf-red); }
.scf-addon-label { font-size: 14px; font-weight: 700; color: var(--scf-dark); }
.scf-addon-price { font-size: 13px; color: var(--scf-red); font-weight: 700; }
.scf-addon-note  { font-size: 12px; color: var(--scf-grey); margin-top: 2px; }

/* ── Running total ─────────────────────────────────────────── */
.scf-running-total {
    background: var(--scf-dark);
    color: var(--scf-white);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    margin-top: 8px;
}
.scf-running-total-deposit { color: #FCA5A5; font-size: 13px; font-weight: 600; }

/* ── Waiver ────────────────────────────────────────────────── */
.scf-waiver-text {
    background: var(--scf-grey-light);
    border-radius: 10px;
    padding: 16px;
    max-height: 280px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.7;
    color: var(--scf-grey);
    margin-bottom: 20px;
}
.scf-waiver-text h4 {
    font-size: 14px;
    font-weight: 800;
    color: var(--scf-dark);
    margin-bottom: 8px;
}
.scf-waiver-text p { margin-bottom: 10px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
    .scf-card { padding: 24px 18px; }
    .scf-heading { font-size: 22px; }
}
