/* ── Care & Protect Page Styles ─────────────────────────── */

:root {
    --cp-charcoal: #2e313b;
    --cp-charcoal-dark: #23252d;
    --cp-lemon: #F4C300;
    --cp-lemon-dark: #d4a900;
}

/* ── Layout ─────────────────────────────────────────────── */

.cp-page { min-height: 100vh; }

.cp-section { display: none; }
.cp-section.active { display: block; }

/* ── Hero / Quote Section ───────────────────────────────── */

.cp-hero {
    position: relative;
    background-color: #1a1a2e;
    overflow: hidden;
}
.cp-hero-bg {
    position: absolute;
    inset: 0;
    background: url('/images/layout/careandprotect-hero.jpg') center/cover no-repeat;
}
.cp-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}
.cp-hero-content {
    position: relative;
    z-index: 1;
}

.cp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(244,195,0,0.15);
    color: var(--cp-lemon);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── VIN Entry Form ─────────────────────────────────────── */

.cp-vin-form-card {
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 24px;
    max-width: 480px;
    margin: 0 auto;
}

/* ── Quote Display ──────────────────────────────────────── */

.cp-quote-card {
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    overflow: hidden;
}
.cp-quote-card .cp-price {
    display: inline;
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.cp-quote-card .cp-price-period {
    font-size: 1.25rem;
    font-weight: 600;
    color: #9ca3af;
}
.cp-daily-cost {
    font-size: 11px;
    color: rgba(244,195,0,0.7);
    font-weight: 500;
}
.cp-discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(34,197,94,0.2);
    color: #86efac;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 50px;
}

/* ── Coverage Options ───────────────────────────────────── */

.cp-option-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    color: #9ca3af;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s;
}
.cp-option-chip:hover {
    border-color: rgba(255,255,255,0.25);
}
.cp-option-chip.selected {
    background: rgba(244,195,0,0.15);
    border-color: rgba(244,195,0,0.6);
    color: #fff;
    font-weight: 500;
}
.cp-chip-check {
    width: 14px;
    height: 14px;
    border: solid 1px #9ca3af;
    border-radius: 2px;
    font-size: 9px;
    color: var(--cp-lemon);
}
.cp-option-chip:focus {
    outline: 1px solid var(--cp-lemon);
    outline-offset: 1px;
}

/* ── Repair Exposure Grid ───────────────────────────────── */

.cp-repair-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cp-repair-row:last-child { border-bottom: none; }
.cp-repair-row .system { font-size: 14px; color: #d1d5db; }
.cp-repair-row .cost { font-size: 14px; font-weight: 700; color: #fff; }

.cp-check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
    color: #d1d5db;
}
.cp-check-icon {
    color: var(--cp-lemon);
    font-weight: bold;
}

/* ── Buttons ────────────────────────────────────────────── */

.btn-lemon {
    background-color: var(--cp-lemon);
    color: #1a1a2e;
    font-weight: 700;
    border: none;
    padding: 12px 48px;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.15s;
}
.btn-lemon:hover {
    background-color: var(--cp-lemon-dark);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(244,195,0,0.2);
}
.btn-lemon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── WhyYouQualify / WhatsCovered Sections ──────────────── */

.cp-section-dark { background-color: var(--cp-charcoal); }
.cp-section-darker { background-color: var(--cp-charcoal-dark); }

.cp-advantage-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.cp-advantage-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(244,195,0,0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cp-lemon-dark);
}
.cp-coverage-item {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── FAQ Accordion ──────────────────────────────────────── */

.cp-faq-item {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 6px;
}
.cp-faq-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: transparent;
    border: none;
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}
.cp-faq-btn:hover { background: rgba(255,255,255,0.03); }
.cp-faq-btn .arrow {
    transition: transform 0.2s;
    color: #6b7280;
    font-size: 12px;
}
.cp-faq-item.open .cp-faq-btn .arrow { transform: rotate(180deg); }
.cp-faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
}
.cp-faq-item.open .cp-faq-body { max-height: 300px; }
.cp-faq-body-inner {
    background: #fff;
    padding: 16px;
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}

/* ── Checkout Steps ─────────────────────────────────────── */

.cp-step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 24px;
}
.cp-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}
.cp-step-num.done { background: rgba(34,197,94,0.2); color: #4ade80; }
.cp-step-num.current { background: var(--cp-lemon); color: #1a1a2e; }
.cp-step-num.upcoming { background: rgba(255,255,255,0.1); color: #6b7280; }
.cp-step-label { font-size: 12px; font-weight: 500; }
.cp-step-label.current { color: #fff; }
.cp-step-label.other { color: #6b7280; }
.cp-step-divider { width: 32px; height: 1px; background: rgba(255,255,255,0.15); margin: 0 4px; }

/* ── Checkout Cards ─────────────────────────────────────── */

.cp-checkout-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cp-summary-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.cp-summary-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    background: #f9fafb;
    font-size: 14px;
    font-weight: 700;
    color: #111;
}
.cp-summary-body { padding: 20px; }
.cp-summary-footer {
    padding: 12px 20px;
    border-top: 1px solid #f3f4f6;
    background: #f9fafb;
    font-size: 12px;
    color: #6b7280;
}

.cp-review-section {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}
.cp-review-header {
    padding: 10px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 11px;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cp-review-body { padding: 16px; }

.cp-coverage-detail-card {
    background: linear-gradient(to bottom right, #f9fafb, #fff);
    padding: 20px;
}
.cp-stat-box {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    padding: 12px;
}
.cp-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    font-weight: 600;
}
.cp-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #111;
}

/* ── Contract Acceptance ────────────────────────────────── */

.cp-acceptance-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
}
.cp-acceptance-box label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 12px;
}
.cp-acceptance-box label:last-child { margin-bottom: 0; }
.cp-acceptance-box input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--cp-lemon-dark);
}

/* ── Payment Iframe ─────────────────────────────────────── */

.cp-payment-iframe-wrap {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #f9fafb;
    position: relative;
}
.cp-payment-iframe-wrap iframe {
    width: 100%;
    border: 0;
    height: 600px;
    min-height: 500px;
}
.cp-payment-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    z-index: 10;
}
.cp-payment-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 12px;
    color: #9ca3af;
    padding-top: 16px;
}

/* ── Success Page ───────────────────────────────────────── */

.cp-success-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: left;
}
.cp-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}
.cp-success-icon.ok { background: #dcfce7; color: #16a34a; }
.cp-success-icon.pending { background: #fef3c7; color: #d97706; }

/* ── Sticky CTA (mobile) ───────────────────────────────── */

.cp-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: var(--cp-charcoal-dark);
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    transform: translateY(100%);
    transition: transform 0.3s;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cp-sticky-cta.visible { transform: translateY(0); }

@media (min-width: 576px) {
    .cp-sticky-cta { display: none !important; }
}

/* ── Error Alert ────────────────────────────────────────── */

.cp-error-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 14px;
    color: #dc2626;
    margin-bottom: 16px;
}

/* ── Loading Spinner ────────────────────────────────────── */

.cp-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0,0,0,0.15);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: cp-spin 0.6s linear infinite;
}
@keyframes cp-spin { to { transform: rotate(360deg); } }

.cp-spinner-lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

/* ── Form.io Overrides ──────────────────────────────────── */

.cp-vin-form-card .formio-component-submit .btn { display: none; }
.cp-vin-form-card .formio-component { margin-bottom: 12px; }
.cp-vin-form-card .form-control {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 8px;
    padding: 10px 16px;
}
.cp-vin-form-card .form-control::placeholder { color: #9ca3af; }
.cp-vin-form-card .form-control:focus {
    border-color: var(--cp-lemon);
    box-shadow: 0 0 0 2px rgba(244,195,0,0.25);
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.cp-vin-form-card .col-form-label,
.cp-vin-form-card label.col-form-label { color: #e5e7eb; font-size: 14px; }
.cp-vin-form-card .formio-errors .error { color: #fca5a5; }

.cp-checkout-card .formio-component { margin-bottom: 12px; }
.cp-checkout-card .form-control {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: #111;
}
.cp-checkout-card .form-control:focus {
    border-color: var(--cp-lemon);
    box-shadow: 0 0 0 2px rgba(244,195,0,0.25);
}
.cp-checkout-card .col-form-label { font-size: 12px; color: #4b5563; font-weight: 500; }

/* ── Utility ────────────────────────────────────────────── */

.text-lemon { color: var(--cp-lemon) !important; }
.bg-lemon { background-color: var(--cp-lemon) !important; }
.text-gray-light { color: #9ca3af; }
.text-gray { color: #6b7280; }
