/* ─────────────────────────────────────────────────────────────────────────
   vehicle-select.css
   Extras-selection panel that slides in from the right INSIDE the existing
   .bt-screen overlay. No new overlay is created — this is page 2 of the
   same screen.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Slide transition on the results page ────────────────────────────────
   Applied to .bt-screen-inner when the extras panel opens              */
.bt-screen-inner--slide-out {
    transform: translateX(-100%);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    user-select: none;
}

/* ── Extras panel itself ─────────────────────────────────────────────── */
.vs-panel {
    position: absolute;
    inset: 0;
    background: #ffffff;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 2;
}

.vs-panel--active {
    transform: translateX(0);
}

/* ── Header ──────────────────────────────────────────────────────────── */
.vs-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem 0.85rem;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f4;
    flex-shrink: 0;
}

.vs-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.5px solid #e0e0e8;
    background: #f7f7fa;
    font-size: 1.1rem;
    cursor: pointer;
    color: #333;
    transition: background 0.15s;
}
.vs-back-btn:hover { background: #eeeef4; }

.vs-header-title {
    font-family: "Montserrat", "Segoe UI", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #1a1a2e;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Vehicle summary strip ───────────────────────────────────────────── */
.vs-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    background: #f7f7fb;
    border-bottom: 1px solid #eeeef4;
    flex-shrink: 0;
}

.vs-summary-img {
    width: 72px;
    height: 52px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
    background: #efefef;
}

.vs-summary-info { flex: 1; min-width: 0; }

.vs-summary-name {
    font-family: "Montserrat", "Segoe UI", sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #1a1a2e;
    margin: 0 0 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vs-summary-price {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: #8888aa;
    margin: 0;
}

.vs-summary-price-old {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: #9d9dac;
    padding: 0 0.1rem;
}

.vs-summary-price-old::after {
    content: "";
    position: absolute;
    left: -0.08rem;
    right: -0.08rem;
    top: 50%;
    border-top: 2px solid rgba(185, 28, 28, 0.48);
    transform: translateY(-50%);
}

.vs-summary-price-current {
    color: #7d2020;
    font-weight: 700;
}

/* ── Section title ───────────────────────────────────────────────────── */
.vs-section-title {
    font-family: "Montserrat", "Segoe UI", sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #aaaacc;
    padding: 1.1rem 1.1rem 0.5rem;
    margin: 0;
}

/* ── Extra items list ────────────────────────────────────────────────── */
.vs-extras-list {
    display: flex;
    flex-direction: column;
    padding: 0 1.1rem;
    flex: 1;
}

.vs-extra-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f2f2f6;
    cursor: pointer;
}
.vs-extra-item:last-child { border-bottom: none; }

.vs-extra-icon {
    display: none;
    font-size: 1.5rem;
    width: 2.4rem;
    text-align: center;
    flex-shrink: 0;
    display: none;
}

.vs-extra-info { flex: 1; min-width: 0; }

.vs-extra-name {
    font-family: "Montserrat", "Segoe UI", sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    color: #1a1a2e;
    margin: 0 0 0.12rem;
}

.vs-extra-desc {
    font-size: 0.74rem;
    color: #8888aa;
    margin: 0;
}

.vs-extra-price {
    font-family: "Montserrat", "Segoe UI", sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--page-red-seam);
    flex-shrink: 0;
    text-align: right;
    white-space: nowrap;
}

/* Checkbox toggle */
.vs-extra-toggle {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #d0d0e0;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
}
.vs-extra-toggle:checked {
    background: var(--page-red-seam);
    border-color: var(--page-red-seam);
}
.vs-extra-toggle:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: 2.5px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* ── Footer / CTA ────────────────────────────────────────────────────── */
.vs-footer {
    padding: 1rem 1.1rem 2rem;
    background: #ffffff;
    border-top: 1px solid #f0f0f4;
    flex-shrink: 0;
}

.vs-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.85rem;
}

.vs-total-label {
    font-size: 0.82rem;
    color: #8888aa;
    font-family: "Montserrat", "Segoe UI", sans-serif;
}

.vs-total-amount {
    font-family: "Montserrat", "Segoe UI", sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    color: #1a1a2e;
}

.vs-cta-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 14px;
    background: linear-gradient(
        to bottom,
        var(--page-red-top) 0%,
        var(--page-red-seam) 34%,
        var(--page-red-bottom) 100%
    );
    color: #ffffff;
    font-family: "Montserrat", "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: opacity 0.15s, transform 0.12s;
}
.vs-cta-btn:active {
    opacity: 0.88;
    transform: scale(0.98);
}

@media (min-width: 980px) {
    .vs-panel {
        display: grid;
        grid-template-columns: minmax(280px, 340px) minmax(0, 720px);
        grid-template-rows: auto auto minmax(0, 1fr) auto;
        justify-content: center;
        align-content: start;
        column-gap: 1.5rem;
        padding: 1.5rem clamp(2rem, 4vw, 4rem) 2rem;
    }

    .vs-header {
        grid-column: 1 / -1;
        padding: 0 0 1rem;
        margin-bottom: 0.25rem;
    }

    .vs-summary {
        grid-column: 1;
        grid-row: 2 / span 3;
        flex-direction: column;
        align-items: flex-start;
        align-self: start;
        gap: 1.25rem;
        padding: 1.4rem;
        border: 1px solid #ececf4;
        border-radius: 24px;
        background: linear-gradient(180deg, #fafafe 0%, #f5f5fa 100%);
        box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
    }

    .vs-summary-img {
        width: 100%;
        max-width: 260px;
        height: 170px;
        align-self: center;
        padding: 0.85rem;
        border-radius: 18px;
        background: linear-gradient(135deg, #f7f7fb 0%, #ececf5 100%);
    }

    .vs-summary-info {
        width: 100%;
    }

    .vs-summary-name {
        font-size: 1.15rem;
        white-space: normal;
    }

    .vs-summary-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        font-size: 0.88rem;
    }

    .vs-summary-price-current {
        font-size: 1rem;
    }

    .vs-section-title {
        grid-column: 2;
        padding: 0 0 0.8rem;
    }

    .vs-extras-list {
        grid-column: 2;
        padding: 0;
        gap: 0.85rem;
    }

    .vs-extra-item {
        gap: 1rem;
        padding: 1rem 1.05rem;
        border: 1px solid #f0f0f5;
        border-radius: 18px;
        background: #ffffff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    }

    .vs-extra-item:last-child {
        border-bottom: 1px solid #f0f0f5;
    }

    .vs-extra-icon {
        display: none !important;
        width: 2.75rem;
        height: 2.75rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 14px;
        background: linear-gradient(135deg, rgba(195, 2, 4, 0.12) 0%, rgba(220, 5, 4, 0.06) 100%);
        color: #7d2020;
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.04em;
    }

    .vs-footer {
        grid-column: 2;
        padding: 1.1rem 0 0;
        border-top: none;
    }
}
