/* ==================================================
   ROOFNEST V2
   LIGHTBOX
   Version: 1.0
   ================================================== */


/* ==================================================
   LIGHTBOX OVERLAY
   ================================================== */

.lightbox {
    display: none;

    position: fixed !important;
    inset: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, .95);

    z-index: 99999;

    justify-content: center;
    align-items: center;

    flex-direction: column;

    padding: 25px;

    box-sizing: border-box;
}


/* ==================================================
   LIGHTBOX IMAGE
   ================================================== */

.lightbox img {
    max-width: 90vw;
    max-height: 75vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 12px;

    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}


/* ==================================================
   CLOSE BUTTON
   ================================================== */

.close-lightbox {
    position: absolute;

    top: 20px;
    right: 35px;

    color: #fff;

    font-size: 50px;
    line-height: 1;

    cursor: pointer;

    z-index: 1000000;

    user-select: none;
}


/* ==================================================
   PREVIOUS / NEXT BUTTONS
   ================================================== */

.lightbox-prev,
.lightbox-next {
    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    color: #fff;

    font-size: 60px;
    line-height: 1;

    cursor: pointer;

    user-select: none;

    padding: 20px;

    z-index: 1000000;

    transition: opacity .25s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: .7;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}


/* ==================================================
   LIGHTBOX COUNTER
   ================================================== */

#lightboxCounter {
    margin-top: 15px;

    color: #fff;

    font-size: 18px;
    font-weight: 600;

    background: none;

    padding: 0;
}


/* ==================================================
   LIGHTBOX THUMBNAILS
   ================================================== */

#lightboxThumbs {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 8px;

    margin-top: 15px;

    flex-wrap: wrap;

    max-width: 90%;
}

.lightbox-thumb {
    width: 70px;
    height: 55px;

    object-fit: cover;

    border-radius: 6px;

    cursor: pointer;

    opacity: .65;

    border: 2px solid transparent;

    transition: all .25s ease;
}

.lightbox-thumb:hover {
    opacity: 1;
}

.active-thumb {
    border-color: #fff;

    opacity: 1;
}


/* ==================================================
   IMAGE TRANSITION
   ================================================== */

#lightboxImage {
    transition: opacity .35s ease;
}


/* ==================================================
   TABLET
   ================================================== */

@media (max-width: 900px) {

    .lightbox {
        padding: 20px;
    }

    .lightbox img {
        max-width: 88vw;
        max-height: 70vh;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 50px;
        padding: 15px;
    }

}


/* ==================================================
   MOBILE
   ================================================== */

@media (max-width: 600px) {

    .lightbox {
        padding: 15px;
    }

    .lightbox img {
        max-width: 94vw;
        max-height: 65vh;
        border-radius: 8px;
    }

    .close-lightbox {
        top: 15px;
        right: 18px;

        font-size: 40px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 40px;
        padding: 10px;
    }

    .lightbox-prev {
        left: 5px;
    }

    .lightbox-next {
        right: 5px;
    }

    #lightboxCounter {
        font-size: 15px;
    }

    #lightboxThumbs {
        gap: 5px;
        max-width: 95%;
    }

    .lightbox-thumb {
        width: 55px;
        height: 45px;
    }

}