

/* =========================================================
Modal - Host 
========================================================= */
    
.bo-modal-dialog {
    width: 100%;
    margin: 0.75rem;
}

@media (min-width: 768px) {
    .bo-modal-dialog {
        margin: 1.5rem auto;
    }
}

.bo-modal {
    z-index: 99999;
}

.bo-modal-content {
    border: 0;
    border-radius: var(--bo-radius-lg);
    overflow: hidden;
}

.bo-modal-header {
    border-bottom: 1px solid var(--bo-alpha-black-03);
    padding: var(--bo-size-md) var(--bo-space-4);
}

.bo-modal-body {
    padding: var(--bo-space-4);
}

/* Size presets controlled by JS */
.bo-modal--sm .bo-modal-dialog {
    max-width: 520px;
}

.bo-modal--md .bo-modal-dialog {
    max-width: 720px;
}

.bo-modal--lg .bo-modal-dialog {
    max-width: 900px;
}

.bo-modal--xl .bo-modal-dialog {
    max-width: 1100px;
}

/* Fullscreen on mobile for certain modals (gallery/forms) */
@media (max-width: 767.98px) {
    .bo-modal--mobile-full .bo-modal-dialog {
        max-width: none;
        width: 100%;
        height: 100%;
        margin: 0;
    }

    .bo-modal--mobile-full .bo-modal-content {
        border-radius: 0;
        height: 100%;
    }

    .bo-modal--mobile-full .bo-modal-body {
        height: calc(100vh - 3.5rem);
        overflow: auto;
    }
}

.bo-hidden {
    display: none !important;
}


/* =========================================================
Modal - Share 
========================================================= */

.bo-modal--share .bo-modal-header {
    display: visible; /* Avgör om vi ska visa/dölja close-btn */
}

.bo-modal--share .bo-modal-body {
    padding: 0;
}

.bo-share-modal {
    padding: var(--bo-space-8);
}

.bo-share-head {
    display: flex;
    align-items: center;
    gap: var(--bo-space-1);
    margin-bottom: var(--bo-space-6);
}

.bo-share-title {
    font-size: clamp(1.5rem, 2.2vw, 1.5rem);
    font-weight: 700;
    margin: 0;
}

.bo-share-icon {
    width: var(--bo-size-7xl);
    height: var(--bo-size-7xl);
}

.bo-share-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.bo-share-tile {
    background: var(--bo-modal-tile-bg);
    border-radius: var(--bo-radius-3xl);
    padding: var(--bo-space-5) var(--bo-space-4);
    border: 1px solid var(--bo-alpha-black-06);
    display: grid;
    place-items: center;
    gap: var(--bo-space-3);
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: transform .15s ease, filter .15s ease;
}

.bo-share-tile:hover {
    transform: translateY(-1px);
    filter: brightness(.99);
}

.bo-share-tile:active {
    transform: translateY(0);
}

.bo-share-tile-icon {
    width: 3rem;
    height: 3rem;
    max-height:3rem;
}

.bo-share-label {
    font-weight: 500;
    font-size: 1.05rem;
}

.bo-share-urlbox {
    margin-top: var(--bo-space-6);
    background: var(--bo-modal-urlbox-bg);
    border-radius: var(--bo-radius-md);
    padding: 0.9375rem var(--bo-space-5);
    text-align: center;
    font-weight: 500;
    font-size: clamp(1rem, 1.6vw, 1rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 992px) {
    .bo-share-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .bo-share-modal {
        padding: var(--bo-space-4);
    }

    .bo-share-shell {
        padding: var(--bo-space-4);
    }

    .bo-share-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
Modal - Lead 
========================================================= */

.bo-modal--lead .bo-modal-header {
    display: visible; /* Avgör om vi ska visa/dölja close-btn */
}

.bo-modal--lead .bo-modal-body {
    padding: 0;
}

.bo-lead-modal {
    padding: var(--bo-space-8);
}

.bo-lead-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: var(--bo-space-6);
}

.bo-lead-head-icon {
    width: var(--bo-size-7xl);
    height: var(--bo-size-7xl);
}

.bo-lead-title {
    font-size: clamp(1.5rem, 2.2vw, 1.5rem);
    font-weight: 700;
    margin: 0;
}

.bo-lead-car-img {
    width: var(--bo-size-11xl);
    height: var(--bo-size-10xl);
    border-radius: var(--bo-radius-xl);
    overflow: hidden;
    background: var(--bo-card-media-bg);
    flex: 0 0 auto;
}

.bo-lead-car-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bo-lead-toggle {
    width: 100%;
    background: var(--bo-modal-lead-toggle-bg);
    border: 1px solid var(--bo-alpha-black-06);
    border-radius: var(--bo-radius-3xl);
    padding: var(--bo-space-5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.bo-lead-check {
    width: 1.5rem;
    height: 1.5rem;
    display: grid;
    place-items: center;
    border-radius: 0.45rem;
    border: 2px solid var(--bo-modal-lead-check-border);
    font-weight: 900;
    color: transparent;
    background: transparent;
}

.bo-lead-toggle.is-on .bo-lead-check {
    background: var(--bo-white);
}

.bo-lead-car-meta .bo-pill {
    display: inline-flex;
    align-items: center;
    padding: .35rem .6rem;
    border-radius: 999px;
    border: 1px solid var(--bo-alpha-black-08);
    font-weight: 500;
    font-size: var(--bo-size-sm);
    color:var(--bo-neutral-900);
}

.bo-pill--lead {
    background: var(--bo-surface-subtle);
}

@media (max-width: 576px) {
    .bo-lead-modal {
        padding: var(--bo-space-4);
    }
}

.bo-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--bo-alpha-black-10);
    background: var(--bo-white);
    font-weight: 700;
    font-size: .85rem;
}

.bo-chip .bo-chip-x {
    width: var(--bo-size-4xl);
    height: var(--bo-size-4xl);
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid var(--bo-alpha-black-15);
    background: transparent;
    cursor: pointer;
    font-weight: 900;
    line-height: 1;
}

.bo-lead-toggle {
    cursor: pointer;
}

.bo-lead-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bo-lead-toggle {
    position: relative;
}

.bo-lead-toggle:has(.bo-lead-checkbox:checked) .bo-lead-check {
    background: var(--bo-white);
    color:var(--bo-text-strong);
}

/* =========================================================
Modal - SpecsAll 
========================================================= */

/* Full-height modal layout (sticky head/foot, scroll body) */
.bo-specs-modal {
    display: flex;
    flex-direction: column;
    height: min(86vh, 56.25rem);
}

@media (max-width: 576px) {
    .bo-modal--mobile-full .modal-dialog {
        margin: 0;
        height: 100%;
        max-width: 100%;
    }

    .bo-modal--mobile-full .modal-content {
        height: 100%;
        border-radius: 0;
    }

    .bo-specs-modal {
        height: 100%;
    }
}

.bo-specs-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bo-white);
    padding: var(--bo-space-5) var(--bo-space-5) var(--bo-space-3) var(--bo-space-5);
}

.bo-specs-title {
    margin: 0;
    font-size: clamp(1.5rem, 2.2vw, 1.5rem);
    font-weight: 700;
}

.bo-specs-icon {
    width: var(--bo-size-5xl);
    height: var(--bo-size-5xl);
}

.bo-specs-body {
    overflow: auto;
    padding: var(--bo-space-3) var(--bo-space-5) var(--bo-space-5) var(--bo-space-5);
}

.bo-specs-foot {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: var(--bo-white);
    padding: 1rem 1.25rem 1.25rem 1.25rem;
}

/* Sections + rows */
.bo-specs-section {
    margin-bottom: var(--bo-space-6);
}

.bo-specs-h3 {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0 0 .75rem 0;
}

.bo-specs-table {
    border-radius: var(--bo-radius-3xl);
    overflow: hidden;
    border: var(--bo-border);
    background: var(--bo-white);
}

.bo-specs-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 1.4fr;
    gap: 1rem;
    padding: 0.85rem var(--bo-space-4);
    border-top: 1px solid var(--bo-alpha-black-06);
}

.bo-specs-row:first-child {
    border-top: none;
}

.bo-specs-k {
    font-weight: 500;
}

.bo-specs-v {
    color: rgba(0, 0, 0, .72);
}

/* =========================================================
Modal - Equipment 
========================================================= */
 
.bo-eq-modal {
    display: flex;
    flex-direction: column;
    height: min(86vh, 56.25rem);
}

@media (max-width: 576px) {
    .bo-modal--mobile-full .modal-dialog {
        margin: 0;
        height: 100%;
        max-width: 100%;
    }

    .bo-modal--mobile-full .modal-content {
        height: 100%;
        border-radius: 0;
    }

    .bo-eq-modal {
        height: 100%;
    }
}

.bo-eq-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bo-white);
    padding: var(--bo-space-5) var(--bo-space-5) var(--bo-space-3) var(--bo-space-5);
}

.bo-eq-title {
    margin: 0;
    font-size: clamp(1.5rem, 2.2vw, 1.5rem);
    font-weight: 700;
}

.bo-eq-head-icon {
    width: var(--bo-size-5xl);
    height: var(--bo-size-5xl);
}

.bo-eq-body {
    overflow: auto;
    padding: var(--bo-space-3) var(--bo-space-5) var(--bo-space-5) var(--bo-space-5);
}

.bo-eq-foot {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: var(--bo-white);
    padding: 1rem 1.25rem 1.25rem 1.25rem;
}

/* Sections + rows */
.bo-eq-section {
    margin-bottom: var(--bo-space-6);
}

.bo-eq-h3 {
    font-weight: 800;
    font-size: 1.1rem;
    margin: 0 0 .75rem 0;
}

.bo-eq-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom:0;
    list-style:none;
    padding-left:0;
}

    @media (max-width: 767.98px) {

        .bo-eq-list {
            margin-bottom:var(--bo-space-4);
        }
    }


.bo-eq-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem var(--bo-space-4);
    border-radius: var(--bo-radius-3xl);
    background: var(--bo-white);
    border: var(--bo-border);
}

.bo-eq-icon {
    width: .75rem;
    height: .75rem;
    flex: 0 0 auto;
    margin-right:.25rem;
}

.bo-eq-text {
    font-weight: 600;
}

/* =========================================================
Modal - Testdrive 
========================================================= */

.bo-td-slot {
    flex: 1;
    border-radius: var(--bo-radius-2xl);
    border: 1px solid var(--bo-alpha-black-06);
    background: var(--bo-td-slot-bg);
    padding: var(--bo-space-4);
    font-weight: 600;
}

.bo-td-slot:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.bo-td-slot.is-active {
    background: var(--bo-td-slot-bg-active);
    border-color: var(--bo-alpha-black-12);
}

/* =========================================================
Modal - Secure 
========================================================= */

.bo-secure-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: var(--bo-space-6);
}

.bo-secure-icon {
    width: var(--bo-size-7xl);
    height: var(--bo-size-7xl);
}

.bo-secure-title {
    font-size: clamp(1.5rem, 2.2vw, 1.5rem);
    font-weight: 700;
    margin: 0;
}

/* =========================================================
Modal - Residual 
========================================================= */

.bo-residual-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: var(--bo-space-5);
}

.bo-residual-icon {
    width: var(--bo-size-7xl);
    height: var(--bo-size-7xl);
}

.bo-residual-title {
    font-size: clamp(1.5rem, 2.2vw, 1.5rem);
    font-weight: 700;
    margin: 0;
}

.bo-residual-intro {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 1.25rem 0;
}

.bo-residual-soft {
    border-radius: var(--bo-radius-4xl);
}

.bo-residual-subtitle {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.bo-residual-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--bo-space-3);
}

.bo-residual-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: var(--bo-space-4);
    border-radius: var(--bo-radius-3xl);
    background: var(--bo-surface-soft);
    /* neutral light */
}

.bo-residual-bullet {
    min-width: var(--bo-size-6xl);
    height: var(--bo-size-9xl);
    display: grid;
    place-items: center;
    border-radius: var(--bo-radius-xl);
    background: var(--bo-white);
    font-size: var(--bo-size-4xl);
}


/* =========================================================
Modal - Lightbox
========================================================= */

.bo-gallery-modal-dialog {
    width: 100%;
    margin: 0.75rem;
}

.bo-gallery-modal-content {
    border: 0;
    border-radius: var(--bo-radius-lg);
    overflow: hidden;
    background: var(--bo-surface-inverse);
    color: var(--bo-white);
}

@media (max-width: 767.98px) {
    .bo-gallery-modal-dialog {
        margin: 0;
        height: 100%;
    }

    .bo-gallery-modal-content {
        border-radius: 0;
        height: 100%;
    }
}

.bo-gallery-modal-header {
    border-bottom: 1px solid var(--bo-gallery-border-dark);
    padding: var(--bo-size-md) var(--bo-space-4);
    background: var(--bo-gallery-overlay-bg);
}

.bo-gallery-modal-body {
    padding: 0;
    background: var(--bo-surface-inverse);
}

/* Main swiper (stor bild) */
.bo-gallery-lightbox-swiper {
    width: 100%;
    height: 72vh;
}

@media (max-width: 767.98px) {
    .bo-gallery-lightbox-swiper {
        height: calc(100vh - 3.5rem - 5.75rem);
        /* header + thumbs ungefär */
    }
}

/* Bild: contain i lightbox */
.bo-gallery-lightbox-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bo-gallery-lightbox-swiper img {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Prev/next */
.bo-gallery-lightbox-prev,
.bo-gallery-lightbox-next {
    color: var(--bo-alpha-white-95);
}

/* Thumbs */
.bo-gallery-lightbox-thumbs {
    padding: var(--bo-space-3) var(--bo-space-3) var(--bo-size-md);
    border-top: 1px solid var(--bo-gallery-border-dark);
    background: var(--bo-gallery-overlay-bg);
}

.bo-gallery-lightbox-thumbs .swiper-slide {
    width: 5.25rem;
    height: 3.75rem;
    opacity: 0.6;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--bo-gallery-border-dark-2);
    cursor: pointer;
}

.bo-gallery-lightbox-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--bo-gallery-border-dark-active);
}

.bo-gallery-lightbox-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* BO ADD: force gallery lightbox fullscreen look */
.bo-gallery-modal .modal-dialog {
    margin: 0;
    max-width: none;
}

.bo-gallery-modal .modal-content {
    border-radius: 0;
    height: 100vh;
    background: var(--bo-surface-inverse);
}

.bo-gallery-modal .modal-body {
    height: calc(100vh - 3.5rem);
    /* headerhöjd ungefär */
}

/* =========================================================
Modal - Watch
========================================================= */

.bo-modal--watch .bo-modal-header {
    display: visible; /* Avgör om vi ska visa/dölja close-btn */
}

.bo-modal--watch .bo-modal-body {
    padding: 0;
}

.bo-watch-modal {
    padding: var(--bo-space-8);
}

.bo-watch-head {
    display: flex;
    align-items: center;
    gap: var(--bo-space-3);
    margin-bottom: 1rem;
}

.bo-watch-head-icon {
    font-size: 2rem;
    line-height: 1;
}

.bo-watch-title {
    font-size: clamp(1.5rem, 2.2vw, 1.5rem);
    font-weight: 700;
    margin: 0;
}

.bo-watch-chipbar {
    background: var(--bo-td-slot-bg);
    border-radius: 999px;
    padding: .6rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

.bo-watch-chip {
    background: var(--bo-white);
    border: 1px solid var(--bo-alpha-black-08);
    border-radius: 999px;
    padding: .35rem .75rem;
    font-weight: 600;
    font-size: .95rem;
}

.bo-watch-fields {
    display: grid;
    gap: .9rem;
}

.bo-watch-field {
    background: var(--bo-td-slot-bg);
    border-radius: var(--bo-radius-3xl);
    padding: 1rem 1rem;
    display: grid;
    gap: .5rem;
}

.bo-watch-label {
    font-weight: 700;
}

.bo-watch-input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    font-weight: 600;
}

.bo-watch-consent {
    display: flex;
    gap: var(--bo-space-3);
    align-items: flex-start;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.bo-watch-link {
    text-decoration: none;
}

.bo-watch-submit[disabled] {
    opacity: .6;
}

.bo-lead-addmoretrade-btn {
    padding-top: 6px;
    margin-top: 5px;
    display: block;
    text-decoration: none;
    cursor: pointer;
    width: fit-content;
}

.bo-no-select {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* gamla Edge/IE */
    user-select: none; /* standard */
}

.bo-modal-result {
    padding: var(--bo-space-4);
    border-radius: var(--bo-radius-md);
}

.bo-modal-result--error {
    background: var(--bo-danger-50);
}

.bo-modal-result--success {
    background: var(--bo-success-500);
}

