@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;800&family=Source+Sans+Pro:wght@300;400&display=swap');

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(1px);
    font-family: Poppins, sans-serif;
    padding: 20px;
    box-sizing: border-box;
    display: grid;
    grid-template-areas: "box" "thumbnails";
    grid-template-rows: 1fr 100px;
}

.lightbox-box {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    align-self: center;
    justify-self: center;
    height: 100%;
}

.lightbox--gallery .lightbox-img {
    max-height: 100%;
    object-fit:cover;
}

.lightbox-img-cnt {
    position: relative;
    min-height: 200px;
    min-width: 200px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 3px;
    box-shadow: 2.8px 2.8px 2.2px rgba(0, 0, 0, 0.02),
    6.7px 6.7px 5.3px rgba(0, 0, 0, 0.028),
    12.5px 12.5px 10px rgba(0, 0, 0, 0.035),
    22.3px 22.3px 17.9px rgba(0, 0, 0, 0.042),
    41.8px 41.8px 33.4px rgba(0, 0, 0, 0.05),
    100px 100px 80px rgba(0, 0, 0, 0.07);
}

.lightbox-img-loading {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-right-color: #fff;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    transform: translate(-50%, -50%) rotate(0);
    animation: lightboxLoadingAnim 0.5s 0s infinite linear;
}

@keyframes lightboxLoadingAnim {
    100% {
        transform: translate(-50%, -50%) rotate(1turn);
    }
}

.lightbox-img {
    max-width: 100%;
    height: 100%;
    width: auto;
    max-height: 90vh;
    display: block;
}

.lightbox-prev,
.lightbox-next {
    text-indent: -9999px;
    overflow: hidden;
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    height: 100%;
    background: none;
    border: 0;
    cursor: pointer;
    background-size: 35px;
    background-repeat: no-repeat;
    opacity: 0;
    transition: 0.3s opacity;
    outline: none;
}

@media (any-pointer: coarse) {
    .lightbox-prev,
    .lightbox-next {
        opacity: 1;
    }
}

.lightbox-prev {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23fff' class='bi bi-chevron-left' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'%3E%3C/path%3E%3C/svg%3E");
    background-position: left 15px center;
}

.lightbox-next {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23fff' class='bi bi-chevron-right' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'%3E%3C/path%3E%3C/svg%3E");
    background-position: right 15px center;
    left: auto;
    right: 0;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    right: 0;
    top: 0;
    width: 60px;
    height: 60px;
    text-indent: -999px;
    overflow: hidden;
    background: none;
    background: rgba(0, 0, 0, 0.4);
    border: 0;
    cursor: pointer;
    transition: 0.3s opacity;
}

.lightbox-close::before,
.lightbox-close::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 30px;
    height: 2px;
    border-radius: 4px;
    background: #FFF;
    transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.lightbox-text {
    text-align: center;
    color: #FFF;
    padding: 5px;
    font-weight: 400;
    font-size: 14px;
}

.lightbox-count {
    text-align: center;
    color: #FFF;
    padding: 5px;
    font-size: 13px;
}


.lightbox-thumbnails {
    text-align: center;
    overflow: hidden;
}

.lightbox-thumbnails-list {
    overflow-x: auto;
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    max-width: 100%;
}

.lightbox-thumbnails-list::-webkit-scrollbar {
    width: 2px;
    background: #000;
    height: 2px;
    border-radius: 2px;
}

.lightbox-thumbnails-list::-webkit-scrollbar {
    width: auto;
}

.lightbox-thumbnails-list::-webkit-scrollbar-thumb {
    background-color: #FFF;
    border-radius: 2px;
}

.lightbox-thumbnails-el {
    position: relative;
    margin: 5px;
    overflow: hidden;
    border-radius: 3px;
    flex-shrink: 0;
}

.lightbox-thumbnails-el img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    display: block;
}

.lightbox-thumbnails-el.is-active::before {
    content: "";
    pointer-events: none;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    box-shadow: 0 0 0 3px #FFF inset;
    z-index: 1;
}

.lightbox-thumbnails-el.is-active img {
    filter: contrast(1.3);
}