/* ── Boat Fit Calculator — boat-fit.css (Phase B) ─────────────────────────── */
/* Palette: navy #0B2447 | red #C8102E | white #ffffff | bg #f7f9fc */

:root {
    --bf-navy:   #0B2447;
    --bf-red:    #C8102E;
    --bf-white:  #ffffff;
    --bf-bg:     #f7f9fc;
    --bf-border: #dde3ec;
    --bf-text:   #1a2332;
    --bf-muted:  #5a6a7e;
}

/* ── Container ─────────────────────────────────────────────────────────────── */
.bbi-bf-wrap {
    max-width: 620px;
    margin: 32px auto 0;
    padding: 0 20px 100px;
    font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
    color: var(--bf-text);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

/* ── Progress bar ──────────────────────────────────────────────────────────── */
.bbi-bf-progress-wrap {
    margin-bottom: 28px;
    display: none;
}
.bbi-bf-progress-wrap.bf-visible {
    display: block;
}
.bbi-bf-progress-label {
    font-size: .72rem;
    font-weight: 700;
    color: var(--bf-navy);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 8px;
}
.bbi-bf-progress-track {
    height: 4px;
    background: var(--bf-border);
    border-radius: 2px;
    overflow: hidden;
}
.bbi-bf-progress-fill {
    height: 4px;
    background: var(--bf-navy);
    border-radius: 2px;
    transition: width .3s ease;
    width: 0%;
}

/* ── Panels ────────────────────────────────────────────────────────────────── */
.bbi-bf-panel {
    display: none;
}
.bbi-bf-panel.bf-active {
    display: block;
}
.bbi-bf-panel.bf-in {
    animation: bf-slide-in .22s ease both;
}
.bbi-bf-panel.bf-in-back {
    animation: bf-slide-in-back .22s ease both;
}

@keyframes bf-slide-in {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes bf-slide-in-back {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Welcome panel ─────────────────────────────────────────────────────────── */
.bbi-bf-welcome {
    padding: 16px 0 8px;
    text-align: center;
}
.bbi-bf-welcome-eyebrow {
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--bf-red);
    margin-bottom: 12px;
}
.bbi-bf-welcome-headline {
    font-size: 2rem;
    font-weight: 900;
    color: var(--bf-navy);
    line-height: 1.15;
    margin: 0 0 14px;
}
.bbi-bf-welcome-sub {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--bf-muted);
    max-width: 480px;
    margin: 0 auto 22px;
}
.bbi-bf-welcome-bullets {
    list-style: none;
    padding: 0;
    margin: 0 auto 26px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 20px;
    max-width: 420px;
    text-align: left;
}
.bbi-bf-welcome-bullets li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: .88rem;
    color: var(--bf-text);
    line-height: 1.4;
}
.bbi-bf-welcome-bullets li::before {
    content: '\2713';
    color: var(--bf-red);
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}
.bbi-bf-btn-start {
    display: inline-block;
    background: var(--bf-navy);
    color: var(--bf-white);
    font-size: 1.05rem;
    font-weight: 800;
    padding: 16px 40px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    min-height: 52px;
    transition: background .15s ease;
    margin-bottom: 14px;
}
.bbi-bf-btn-start:hover {
    background: #0d2e5a;
}
.bbi-bf-welcome-trust {
    font-size: .78rem;
    color: var(--bf-muted);
    margin: 0;
}

/* ── Question panels ───────────────────────────────────────────────────────── */
.bbi-bf-q-num {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--bf-red);
    margin-bottom: 8px;
}
.bbi-bf-q-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--bf-navy);
    line-height: 1.25;
    margin: 0 0 20px;
}
.bbi-bf-multi-hint {
    font-size: .85rem;
    font-weight: 500;
    color: var(--bf-muted);
}

/* ── Choice buttons ────────────────────────────────────────────────────────── */
.bbi-bf-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.bbi-bf-choice {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 14px 18px;
    background: var(--bf-white);
    border: 2px solid var(--bf-border);
    border-radius: 8px;
    font-size: .97rem;
    font-weight: 600;
    color: var(--bf-text);
    text-align: left;
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease, color .12s ease;
    box-sizing: border-box;
}
.bbi-bf-choice:hover {
    border-color: var(--bf-navy);
    background: #f0f4fa;
}
.bbi-bf-choice.bf-selected {
    background: var(--bf-navy);
    border-color: var(--bf-navy);
    color: var(--bf-white);
}

/* Multi-select checkbox indicator */
.bbi-bf-choices--multi .bbi-bf-choice {
    gap: 0;
}
.bbi-bf-choices--multi .bbi-bf-choice::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid var(--bf-border);
    border-radius: 3px;
    margin-right: 12px;
    transition: background .12s, border-color .12s;
    background: var(--bf-white);
}
.bbi-bf-choices--multi .bbi-bf-choice.bf-selected::before {
    background-color: var(--bf-red);
    border-color: var(--bf-red);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' stroke='white' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}
.bbi-bf-choices--multi .bbi-bf-choice.bf-selected {
    color: var(--bf-text);
    background: #edf2fc;
    border-color: var(--bf-navy);
}

/* ── Trade-in sub-form ─────────────────────────────────────────────────────── */
.bbi-bf-trade-sub {
    display: none;
    margin-top: 14px;
    padding: 16px;
    background: var(--bf-bg);
    border: 1px solid var(--bf-border);
    border-radius: 8px;
}
.bbi-bf-trade-sub.bf-visible {
    display: block;
    animation: bf-slide-in .18s ease both;
}
.bbi-bf-trade-intro {
    font-size: .82rem;
    color: var(--bf-muted);
    margin: 0 0 12px;
    font-style: italic;
}

/* ── Lead gate ─────────────────────────────────────────────────────────────── */
.bbi-bf-gate-sub {
    font-size: .93rem;
    color: var(--bf-muted);
    line-height: 1.55;
    margin: 4px 0 20px;
}
.bbi-bf-gate-form { margin: 0; }
.bbi-bf-form-row {
    margin-bottom: 14px;
}
.bbi-bf-form-row--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.bbi-bf-form-field label {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--bf-navy);
    margin-bottom: 5px;
}
.bbi-bf-req  { color: var(--bf-red); }
.bbi-bf-opt  { color: var(--bf-muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.bbi-bf-input {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 2px solid var(--bf-border);
    border-radius: 6px;
    font-size: .95rem;
    color: var(--bf-text);
    background: var(--bf-white);
    transition: border-color .12s;
    box-sizing: border-box;
    font-family: inherit;
}
.bbi-bf-input:focus {
    outline: none;
    border-color: var(--bf-navy);
    box-shadow: 0 0 0 3px rgba(11, 36, 71, .1);
}
.bbi-bf-input.bf-error {
    border-color: var(--bf-red);
}
.bbi-bf-tcpa {
    font-size: .75rem;
    line-height: 1.65;
    color: var(--bf-muted);
    margin: 14px 0;
    padding: 12px 14px;
    background: var(--bf-bg);
    border: 1px solid var(--bf-border);
    border-radius: 6px;
}
.bbi-bf-tcpa strong { color: var(--bf-text); }
.bbi-bf-btn-submit {
    display: block;
    width: 100%;
    min-height: 52px;
    background: var(--bf-red);
    color: var(--bf-white);
    font-size: 1.05rem;
    font-weight: 800;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s;
    margin-bottom: 10px;
    font-family: inherit;
}
.bbi-bf-btn-submit:hover {
    background: #a50e25;
}
.bbi-bf-gate-trust {
    font-size: .75rem;
    color: var(--bf-muted);
    text-align: center;
    margin: 0;
}
.bbi-bf-gate-error {
    background: #fdf2f2;
    border: 1px solid var(--bf-red);
    border-radius: 6px;
    color: var(--bf-red);
    font-size: .88rem;
    font-weight: 600;
    padding: 12px 14px;
    margin-bottom: 12px;
}

/* ── Results page ──────────────────────────────────────────────────────────── */
.bbi-bf-results-page {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px 60px;
    font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
    color: var(--bf-text);
}

/* Header */
.bbi-bf-rp-header {
    padding: 20px 0 28px;
    text-align: center;
}
.bbi-bf-rp-eyebrow {
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--bf-red);
    margin-bottom: 10px;
}
.bbi-bf-rp-headline {
    font-size: 1.85rem;
    font-weight: 900;
    color: var(--bf-navy);
    line-height: 1.2;
    margin: 0 0 12px;
}
.bbi-bf-rp-sub {
    font-size: .95rem;
    line-height: 1.6;
    color: var(--bf-muted);
    max-width: 520px;
    margin: 0 auto;
}

/* Match card grid */
.bbi-bf-rp-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Individual match card */
.bbi-bf-match-card {
    background: var(--bf-white);
    border: 2px solid var(--bf-border);
    border-radius: 10px;
    overflow: hidden;
}
.bbi-bf-match-card--top {
    border-color: var(--bf-navy);
}

/* Photo */
.bbi-bf-match-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bf-border);
    overflow: hidden;
}
.bbi-bf-match-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bbi-bf-match-photo-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bf-bg);
}

/* Badge */
.bbi-bf-match-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--bf-navy);
    color: var(--bf-white);
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 4px 10px;
    border-radius: 4px;
}
.bbi-bf-match-badge--top {
    background: var(--bf-red);
}

/* Card body */
.bbi-bf-match-body {
    padding: 18px 20px 20px;
}
.bbi-bf-match-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--bf-navy);
    margin: 0 0 8px;
    line-height: 1.25;
}
.bbi-bf-match-title a {
    color: inherit;
    text-decoration: none;
}
.bbi-bf-match-title a:hover {
    text-decoration: underline;
}

/* Price block */
.bbi-bf-match-price {
    margin-bottom: 12px;
}
.bbi-bf-match-price-list {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--bf-navy);
    display: block;
}
.bbi-bf-match-price-mo {
    font-size: .82rem;
    color: var(--bf-muted);
    display: block;
    margin-top: 2px;
}
.bbi-bf-match-price-disc {
    margin-left: 6px;
    font-size: .75rem;
    color: var(--bf-border);
}

/* Use-case tags */
.bbi-bf-match-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.bbi-bf-match-tag {
    background: var(--bf-bg);
    border: 1px solid var(--bf-border);
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--bf-navy);
    padding: 3px 8px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* Action buttons */
.bbi-bf-match-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.bbi-bf-match-btn {
    display: inline-block;
    font-size: .9rem;
    font-weight: 800;
    padding: 11px 20px;
    border-radius: 6px;
    min-height: 44px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    font-family: inherit;
    line-height: 1.2;
    transition: background .15s, border-color .15s, color .15s;
}
.bbi-bf-match-btn--primary {
    background: var(--bf-navy);
    color: var(--bf-white);
}
.bbi-bf-match-btn--primary:hover {
    background: #0d2e5a;
    color: var(--bf-white);
}
.bbi-bf-match-btn--hold {
    background: var(--bf-red);
    color: var(--bf-white);
}
.bbi-bf-match-btn--hold:hover {
    background: #a50d24;
    color: var(--bf-white);
}
.bbi-bf-match-btn--ghost {
    background: none;
    border: 2px solid var(--bf-red);
    color: var(--bf-red);
}
.bbi-bf-match-btn--ghost:hover {
    background: var(--bf-red);
    color: var(--bf-white);
}

/* Bottom CTA strip */
.bbi-bf-rp-cta-strip {
    margin-top: 36px;
    padding: 28px 24px;
    background: var(--bf-navy);
    border-radius: 10px;
    text-align: center;
}
.bbi-bf-rp-cta-heading {
    color: var(--bf-white);
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0 0 16px;
}
.bbi-bf-rp-cta-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.bbi-bf-rp-btn {
    display: inline-block;
    font-size: .95rem;
    font-weight: 800;
    padding: 13px 26px;
    border-radius: 6px;
    text-decoration: none;
    min-height: 48px;
    transition: opacity .15s;
    font-family: inherit;
}
.bbi-bf-rp-btn:hover { opacity: .88; }
.bbi-bf-rp-btn--navy {
    background: var(--bf-red);
    color: var(--bf-white);
}
.bbi-bf-rp-btn--outline {
    background: transparent;
    color: var(--bf-white);
    border: 2px solid rgba(255,255,255,.5);
}
.bbi-bf-rp-hours {
    color: rgba(255,255,255,.65);
    font-size: .78rem;
    margin: 0;
}

/* Payment disclaimer */
.bbi-bf-rp-disclaimer {
    font-size: .72rem;
    color: var(--bf-muted);
    text-align: center;
    margin: 20px 0 0;
    line-height: 1.55;
}

/* Mobile results */
@media (max-width: 767px) {
    .bbi-bf-results-page {
        padding-left: 16px;
        padding-right: 16px;
    }
    .bbi-bf-rp-headline {
        font-size: 1.5rem;
    }
    .bbi-bf-match-actions {
        flex-direction: column;
    }
    .bbi-bf-match-btn {
        text-align: center;
        width: 100%;
    }
    .bbi-bf-rp-cta-row {
        flex-direction: column;
        align-items: center;
    }
    .bbi-bf-rp-btn {
        width: 100%;
        max-width: 320px;
        text-align: center;
    }
}

/* ── Honeypot (accessibility-safe) ────────────────────────────────────────── */
.bbi-bf-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ── Bottom nav bar ────────────────────────────────────────────────────────── */
.bbi-bf-nav {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0 6px;
    margin-top: 24px;
    border-top: 1px solid var(--bf-border);
}
.bbi-bf-nav.bf-visible {
    display: flex;
}
.bbi-bf-btn-back {
    background: none;
    border: 2px solid var(--bf-border);
    border-radius: 6px;
    color: var(--bf-muted);
    font-size: .9rem;
    font-weight: 700;
    padding: 12px 22px;
    min-height: 44px;
    cursor: pointer;
    transition: border-color .12s, color .12s;
    font-family: inherit;
    white-space: nowrap;
}
.bbi-bf-btn-back:hover:not(:disabled) {
    border-color: var(--bf-navy);
    color: var(--bf-navy);
}
.bbi-bf-btn-back:disabled {
    opacity: .4;
    cursor: default;
}
.bbi-bf-btn-next {
    flex: 1;
    background: var(--bf-red);
    color: var(--bf-white);
    border: none;
    border-radius: 6px;
    font-size: .97rem;
    font-weight: 800;
    padding: 14px 24px;
    min-height: 44px;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
}
.bbi-bf-btn-next:hover:not(:disabled) {
    background: #a50e25;
}
.bbi-bf-btn-next:disabled {
    background: #c8ccd2;
    cursor: not-allowed;
}

/* ── Mobile — sticky nav ───────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .bbi-bf-wrap {
        padding-bottom: 86px;
        padding-left: 16px;
        padding-right: 16px;
    }
    .bbi-bf-nav.bf-visible {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        padding: 10px 16px 16px;
        background: var(--bf-white);
        border-top: 1px solid var(--bf-border);
        border-radius: 0;
        box-shadow: 0 -2px 14px rgba(0, 0, 0, .07);
        z-index: 200;
    }
    .bbi-bf-q-title {
        font-size: 1.22rem;
    }
    .bbi-bf-welcome-headline {
        font-size: 1.65rem;
    }
    .bbi-bf-welcome-bullets {
        grid-template-columns: 1fr;
    }
    .bbi-bf-form-row--2col {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}
