.ba-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    background: rgba(0, 0, 0, 0.88);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}

.ba-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}


/* Close button */

.ba-lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;

    width: 45px;
    height: 45px;

    padding: 0;
    border: 0;

    background: transparent;

    color: #fff;
    font-size: 40px;
    font-weight: 300;
    line-height: 45px;

    cursor: pointer;

    z-index: 2;
}

.ba-lightbox-close:hover {
    opacity: 0.7;
}


/* Before / After images */

.ba-lightbox-images {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;

    width: min(90vw, 1000px);
}

.ba-lightbox-panel {
    position: relative;

    width: calc(50% - 10px);
    aspect-ratio: 1 / 1;
}

.ba-card-plabel {pointer-events: none;}

.ba-lightbox-panel img {
    display: block;

    width: 100%;
    height: 100%;

    border: 6px solid #fff;

    object-fit: cover;
    object-position: center;

}

.ba-lightbox-panel .ba-card-plabel {
    position: absolute;
    left: 22px;
    bottom: 22px; right:auto !important
}


/* Mobile */

@media (max-width: 700px) {

    .ba-lightbox {
        padding: 20px;
    }

    .ba-lightbox-images {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .ba-lightbox-panel {
    width: min(100%, 40dvh);
}

    .ba-lightbox-close {
        top: 10px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 36px;
        line-height: 40px;
    }
}


/* Very small screens */

@media (max-width: 400px) {

    .ba-lightbox-images {
        gap: 10px;
    }



}