/* Lightbox background */
.lightbox-bg {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100dvh;
    background: none;
    overflow: hidden;
}
.lightbox-overlay {
    position:fixed;
    top:0;
    bottom:0;
    left:0;
    right:0;
    background:rgba(0,0,0,.6);
    backdrop-filter:blur(5px);
}
/* Lightbox content */
.lightbox-inner {
    position:relative;
}
.lightbox-content {
    position: relative;
    margin: auto;
    padding: 20px;
    max-width: calc(100vw - 200px);
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease; /* Add opacity transition */
}

/* Lightbox image */
.lightbox-img {
    max-height: calc(100dvh - 250px);
    margin: auto;
    box-shadow: var(--mainshadow);
    transition: opacity 0.3s ease; /* Add opacity transition */
}

/* Thumbnails */
.lightbox-thumbnails {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    width: 100%;
    transition: opacity 0.3s ease; /* Add opacity transition */
}


/* Close button */
.lightbox-close {
    position: absolute;
    top: 35px;
    right: 50px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
    border:none;
    background:none;
    height:40px;
    width:40px;
    display:flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
}

.lightbox-close:after {
    content:"";
    background:url("/wp-content/themes/brando_flex/assets/close_alt.svg");
    width:30px;
    height:30px;
    position: absolute;
    top:0;
    left:0;
    background-size: contain;
    display: block;
}
.lightbox-close:before {
    content:"";
    height:100vh;
    width:100vw;
    position:absolute;
    right:-50px;
    top:0;
    z-index:0;
}
/* Navigation buttons */
.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    height:50px;
    width:50px;
    user-select: none;
    -webkit-user-select: none;
    z-index:9;
    display:flex;
    align-items: center;
    justify-content: center;
    background:#fff;
    border-radius:50%;
    box-shadow:var(--mainshadow);
    border:none;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right:20px;
}


.lightbox-next:after, .lightbox-prev:after {
    content:"";
    background:url("/wp-content/themes/brando_flex/assets/arrow.svg") no-repeat;
    width:25px;
    height:25px;
    position: absolute;
    top:auto;
    bottom:auto;
    right:auto;
    left:auto;
    background-size: contain;
    ;
}
.lightbox-next:after {
    transform: rotate(180deg);
}



/* Thumbnails */
.lightbox-thumbnails {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    width:100%;
    position:absolute;
}

.lightbox-thumbnail {
    padding:5px;
    cursor: pointer;
    opacity: 0.5;
    aspect-ratio:1/1;
    filter:grayscale(1);
    transition:all ease .25s;
}
.lightbox-thumbnail:hover {
    opacity:1;
    filter:grayscale(0);
}

.lightbox-thumbnail.active {
    opacity: 1;
    filter:grayscale(0);
}

.lightbox-thumbnail img {
    width: 50px;
    height: 100%;
    object-fit: cover;
}

.lightbox-thumbnails {
    display:none;
}


/* Responsive Edits */
@media only screen and (max-width: 768px) {

    .lightbox-prev, .lightbox-next {
        height:35px;
        width:35px;
    }
    .lightbox-next::after, .lightbox-prev::after { 
        width:15px;
        height:15px;
    }
    .lightbox-prev {
        left:10px;
    }
    .lightbox-next {
        right:10px;
    }
    .lightbox-content {
        max-width:none;
        padding:0;
    }
}