/**
 * Pre-Qualification Quiz — Stylesheet v2
 *
 * TBB brand: primary blue #0f2744 | accent #1e6fb0 | red/white/blue only
 * Design language: premium dealership — confident, clean, trustworthy
 *
 * @package BoatBrokerDSD
 * @since   13.24.1
 */

/* ── Theme override — hide WP page title on prequal page ─────────────────── */
.bbi-prequal-page .tbb-article__title,
.bbi-prequal-page .page-title,
.bbi-prequal-page .entry-title {
    display: none !important;
}

/* ── Wrap ──────────────────────────────────────────────────────────────────── */
.bbi-prequal-wrap {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 0 80px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1a2b3c;
    box-sizing: border-box;
}

/* ── Step indicator ────────────────────────────────────────────────────────── */
.bbi-pq-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 20px 24px 0;
}
.bbi-pq-step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d0d8e4;
    transition: background 0.3s, transform 0.3s;
    flex-shrink: 0;
}
.bbi-pq-step-dot.completed {
    background: #1e6fb0;
}
.bbi-pq-step-dot.active {
    background: #0f2744;
    transform: scale(1.4);
}
.bbi-pq-step-connector {
    flex: 1;
    height: 2px;
    background: #d0d8e4;
    max-width: 40px;
    transition: background 0.3s;
}
.bbi-pq-step-connector.completed {
    background: #1e6fb0;
}

/* ── Panel base ────────────────────────────────────────────────────────────── */
.bbi-pq-panel {
    display: none;
}
.bbi-pq-panel.active {
    display: block;
    animation: bbi-pq-slide-in 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes bbi-pq-slide-in {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Intro panel — hero ────────────────────────────────────────────────────── */
.bbi-pq-panel-hero {
    background: linear-gradient(150deg, #0a1e35 0%, #0f2744 40%, #163354 100%);
    border-radius: 20px;
    padding: 64px 56px 72px;
    position: relative;
    overflow: hidden;
    margin: 0 0 0;
}
.bbi-pq-panel-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(30,111,176,0.18) 0%, transparent 70%);
    pointer-events: none;
}
.bbi-pq-panel-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #1e6fb0 30%, #c0392b 60%, transparent 100%);
}
.bbi-pq-hero-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1e6fb0;
    margin: 0 0 16px;
}
.bbi-pq-hero-headline {
    font-size: 2.6rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 20px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.bbi-pq-hero-sub {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.72);
    line-height: 1.65;
    margin: 0 0 36px;
    max-width: 520px;
}
.bbi-pq-trust-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 40px;
    padding: 14px 20px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    max-width: 420px;
}
.bbi-pq-trust-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #1e6fb0, #0f2744);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}
.bbi-pq-trust-text strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}
.bbi-pq-trust-text span {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.3;
}
.bbi-pq-hero-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 40px;
}
.bbi-pq-stat {
    text-align: left;
}
.bbi-pq-stat-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}
.bbi-pq-stat-label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
    display: block;
}
.bbi-pq-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    color: #0f2744;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 16px 36px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    letter-spacing: -0.01em;
}
.bbi-pq-hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.bbi-pq-hero-cta svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.bbi-pq-hero-fine {
    margin-top: 16px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
}

/* ── Question panel card ───────────────────────────────────────────────────── */
.bbi-pq-panel-inner {
    background: #fff;
    border-radius: 20px;
    padding: 44px 48px 40px;
    box-shadow: 0 8px 40px rgba(15, 39, 68, 0.10);
    border: 1px solid #e0e8f2;
    margin-top: 4px;
}
.bbi-pq-question-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #e8f0fa 0%, #d0e0f5 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.bbi-pq-question-icon svg {
    width: 28px;
    height: 28px;
    color: #0f2744;
}

/* ── Typography ────────────────────────────────────────────────────────────── */
.bbi-pq-step-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1e6fb0;
    margin-bottom: 10px;
}
.bbi-pq-question {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f2744;
    margin: 0 0 10px;
    line-height: 1.3;
}
.bbi-pq-headline {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f2744;
    margin: 0 0 16px;
    line-height: 1.2;
}
.bbi-pq-intro-copy,
.bbi-pq-sub {
    font-size: 1rem;
    color: #4a5a6c;
    line-height: 1.65;
    margin: 0 0 20px;
}
.bbi-pq-micro-disclosure {
    font-size: 0.72rem;
    color: #8a9aac;
    margin: 14px 0 0;
    line-height: 1.5;
    font-style: italic;
}

/* ── Option buttons — card style ───────────────────────────────────────────── */
.bbi-pq-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0 28px;
}
.bbi-pq-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 20px;
    background: #f7f9fc;
    border: 2px solid #e0e8f2;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 500;
    color: #1a2b3c;
    text-align: left;
    cursor: pointer;
    transition: all 0.18s ease;
    position: relative;
    line-height: 1.35;
}
.bbi-pq-option:hover {
    border-color: #1e6fb0;
    background: #eef5fc;
    transform: translateX(3px);
}
.bbi-pq-option.selected {
    border-color: #0f2744;
    background: #0f2744;
    color: #ffffff;
    transform: translateX(3px);
    box-shadow: 0 4px 16px rgba(15,39,68,0.2);
}
.bbi-pq-option .opt-icon {
    width: 40px;
    height: 40px;
    background: rgba(30,111,176,0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    transition: background 0.18s;
}
.bbi-pq-option.selected .opt-icon {
    background: rgba(255,255,255,0.15);
}
.bbi-pq-option .opt-check {
    width: 22px;
    height: 22px;
    border: 2px solid #c0cad8;
    border-radius: 50%;
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
}
.bbi-pq-option.selected .opt-check {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.2);
}
.bbi-pq-option.selected .opt-check::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    display: block;
}
.bbi-pq-option .opt-label {
    flex: 1;
    font-weight: 600;
}
.opt-dollar-range {
    font-weight: 400;
    font-size: 0.88em;
    color: #5a7a99;
    margin-left: 2px;
}
.bbi-pq-option.selected .opt-dollar-range {
    color: rgba(255, 255, 255, 0.78);
}
.bbi-pq-option .opt-sub {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.65;
    margin-top: 2px;
}

/* ── No Credit Pull badge (question panels) ────────────────────────────────── */
.bbi-no-credit-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #eef5fc;
    border: 1px solid #c5daf0;
    border-radius: 10px;
    margin-bottom: 20px;
}
.bbi-no-credit-badge::before {
    content: '🔒';
    font-size: 18px;
    flex-shrink: 0;
}
.bbi-no-credit-headline {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f2744;
    line-height: 1.2;
}
.bbi-no-credit-sub {
    display: block;
    font-size: 0.78rem;
    color: #4a6a8a;
    line-height: 1.3;
    margin-top: 2px;
}

/* ── Nav row ───────────────────────────────────────────────────────────────── */
.bbi-pq-nav {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}
.bbi-pq-btn-next,
.bbi-pq-btn-primary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 28px;
    background: #0f2744;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, opacity 0.2s;
    letter-spacing: -0.01em;
}
.bbi-pq-btn-next:hover:not(:disabled),
.bbi-pq-btn-primary:hover {
    background: #1a3d5c;
    transform: translateY(-1px);
}
.bbi-pq-btn-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}
.bbi-pq-btn-back,
.bbi-pq-btn-secondary {
    padding: 15px 20px;
    background: transparent;
    color: #6b7a8d;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid #e0e8f2;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}
.bbi-pq-btn-back:hover,
.bbi-pq-btn-secondary:hover {
    border-color: #0f2744;
    color: #0f2744;
}

/* ── Result panel ──────────────────────────────────────────────────────────── */
.bbi-pq-panel[data-panel="result"] .bbi-pq-panel-inner {
    border-top: 4px solid #0f2744;
}
.bbi-pq-result-disclaimer {
    background: #eef5fc;
    border-left: 4px solid #1e6fb0;
    border-radius: 0 10px 10px 0;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: #2a4a6c;
    line-height: 1.55;
}
.bbi-pq-result-card h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f2744;
    margin: 0 0 16px;
    line-height: 1.2;
}
.bbi-pq-result-card p {
    font-size: 1rem;
    color: #3a4a5c;
    line-height: 1.65;
    margin: 0 0 16px;
}
.bbi-pq-result-card p em {
    font-style: italic;
    color: #6b7a8d;
}
.bbi-pq-result-cta {
    background: #f7f9fc;
    border: 1px solid #e0e8f2;
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 4px;
}
.bbi-pq-result-cta strong {
    color: #0f2744;
}
.bbi-pq-nav-result {
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}
.bbi-pq-nav-result .bbi-pq-btn-primary {
    font-size: 1.05rem;
    padding: 17px 28px;
}
.bbi-pq-nav-result .bbi-pq-btn-secondary {
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
}

/* ── Gate / lead-capture form ──────────────────────────────────────────────── */
.bbi-pq-gate-form {
    margin: 24px 0 0;
}
.bbi-hp-field {
    position: absolute;
    left: -9999px;
    visibility: hidden;
}
.bbi-pq-field-group {
    margin-bottom: 16px;
}
.bbi-pq-field-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #2a3a4c;
    margin-bottom: 6px;
}
.bbi-pq-field-group label span[aria-hidden] {
    color: #c0392b;
}
.bbi-pq-field-group input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #d0d8e8;
    border-radius: 12px;
    font-size: 1rem;
    color: #1a2b3c;
    background: #f7f9fc;
    transition: border-color 0.18s, background 0.18s;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.bbi-pq-field-group input:focus {
    outline: none;
    border-color: #0f2744;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(15,39,68,0.06);
}
.bbi-pq-tcpa-row {
    margin: 20px 0 24px;
    padding: 16px;
    background: #f7f9fc;
    border: 1px solid #e0e8f2;
    border-radius: 12px;
}
.bbi-pq-tcpa-label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 0.78rem;
    color: #5a6a7c;
    line-height: 1.55;
    cursor: pointer;
}
.bbi-pq-tcpa-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex-shrink: 0;
    accent-color: #0f2744;
    cursor: pointer;
}
.bbi-pq-form-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.bbi-pq-btn-submit-lead {
    width: 100%;
    padding: 17px 28px;
    font-size: 1.05rem;
}

/* ── Done / post-submit ────────────────────────────────────────────────────── */
.bbi-pq-done-inner {
    text-align: center;
}
.bbi-pq-done-check {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #0f2744, #1e6fb0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
    color: #fff;
}
.bbi-pq-done-inner h2 {
    font-size: 1.9rem;
    font-weight: 800;
    color: #0f2744;
    margin: 0 0 12px;
}
.bbi-pq-done-inner p {
    font-size: 1rem;
    color: #3a4a5c;
    line-height: 1.65;
    margin: 0 0 16px;
}
.bbi-pq-btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 8px 0 20px;
    padding: 15px 32px;
    background: #c0392b;
    color: #ffffff;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 4px 16px rgba(192,57,43,0.25);
}
.bbi-pq-btn-download:hover {
    background: #a93226;
    transform: translateY(-2px);
    color: #fff;
}
.bbi-pq-reassurance {
    font-size: 0.88rem;
    color: #6b7a8d;
}
.bbi-pq-reassurance a {
    color: #1e6fb0;
    font-weight: 600;
    text-decoration: none;
}

/* ── Long quiz (educational accordion) ────────────────────────────────────── */
.bbi-prequal-long {
    margin-top: 56px;
    border-top: 2px solid #e0e8f2;
    padding-top: 48px;
}
.bbi-prequal-long-intro {
    text-align: center;
    margin-bottom: 32px;
}
.bbi-prequal-long-intro h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f2744;
    margin: 0 0 10px;
}
.bbi-prequal-long-intro p {
    font-size: 1rem;
    color: #4a5a6c;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto;
}
.bbi-pq-accordion {
    border: 1px solid #e0e8f2;
    border-radius: 14px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.bbi-pq-accordion:hover {
    box-shadow: 0 4px 16px rgba(15,39,68,0.06);
}
.bbi-pq-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #f7f9fc;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 700;
    color: #0f2744;
    cursor: pointer;
    transition: background 0.18s;
    gap: 12px;
}
.bbi-pq-accordion-header:hover,
.bbi-pq-accordion-header[aria-expanded="true"] {
    background: #eef5fc;
}
.bbi-pq-accordion-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border: 2px solid #c0cad8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s, border-color 0.25s;
    position: relative;
}
.bbi-pq-accordion-icon::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-right: 2px solid #0f2744;
    border-bottom: 2px solid #0f2744;
    transform: rotate(45deg) translate(-1px, -2px);
    transition: transform 0.25s;
}
.bbi-pq-accordion-header[aria-expanded="true"] .bbi-pq-accordion-icon {
    border-color: #0f2744;
    transform: none;
}
.bbi-pq-accordion-header[aria-expanded="true"] .bbi-pq-accordion-icon::after {
    transform: rotate(-135deg) translate(-1px, -2px);
}
.bbi-pq-accordion-body {
    display: none;
    padding: 0 24px 24px;
    background: #fff;
}
.bbi-pq-accordion-body.open {
    display: block;
    animation: bbi-pq-slide-in 0.22s ease;
}
.bbi-pq-qa {
    padding: 16px 0;
    border-bottom: 1px solid #f0f4f8;
}
.bbi-pq-qa:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.bbi-pq-q {
    font-weight: 700;
    color: #0f2744;
    font-size: 0.95rem;
    margin: 0 0 8px;
    line-height: 1.4;
}
.bbi-pq-a {
    font-size: 0.92rem;
    color: #3a4a5c;
    line-height: 1.65;
    margin: 0;
}

/* ── Mobile ────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .bbi-prequal-wrap {
        padding: 0 0 48px;
    }
    .bbi-pq-panel-hero {
        border-radius: 12px;
        padding: 40px 28px 48px;
    }
    .bbi-pq-hero-headline {
        font-size: 1.9rem;
    }
    .bbi-pq-hero-stats {
        gap: 20px;
    }
    .bbi-pq-stat-num {
        font-size: 1.4rem;
    }
    .bbi-pq-panel-inner {
        border-radius: 16px;
        padding: 28px 22px 24px;
    }
    .bbi-pq-question {
        font-size: 1.25rem;
    }
    .bbi-pq-nav {
        flex-direction: column-reverse;
    }
    .bbi-pq-btn-next,
    .bbi-pq-btn-primary {
        width: 100%;
    }
    .bbi-pq-btn-back,
    .bbi-pq-btn-secondary {
        width: 100%;
        text-align: center;
    }
    .bbi-pq-hero-cta {
        width: 100%;
    }
    .bbi-pq-trust-row {
        max-width: 100%;
    }
    .bbi-pq-hero-stats {
        flex-wrap: wrap;
    }
    .bbi-pq-accordion-header {
        padding: 16px 18px;
        font-size: 0.93rem;
    }
    .bbi-pq-accordion-body {
        padding: 0 18px 18px;
    }
    .bbi-prequal-long-intro h2 {
        font-size: 1.35rem;
    }
    .bbi-pq-steps {
        padding: 16px 16px 0;
    }
}
