.site-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem 1rem;
    background: rgb(0 0 0 / 90%);
}

.site-lightbox.is-open {
    display: flex;
}

.site-lightbox__content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
}

.site-lightbox__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 78vh;
    object-fit: contain;
}

.site-lightbox button {
    position: absolute;
    z-index: 1;
    border: 0;
    border-radius: 0.25rem;
    padding: 0.4rem 0.7rem;
    color: #fff;
    background: rgb(0 0 0 / 55%);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.site-lightbox button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.site-lightbox__close {
    top: -2.8rem;
    right: 0;
}

.site-lightbox__prev,
.site-lightbox__next {
    top: 50%;
    transform: translateY(-50%);
}

.site-lightbox__prev {
    left: -3rem;
}

.site-lightbox__next {
    right: -3rem;
}

.site-lightbox__footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding-top: 0.75rem;
    color: #fff;
    font-size: 0.9rem;
}

.site-lightbox__caption {
    overflow-wrap: anywhere;
}

.site-lightbox__counter {
    flex-shrink: 0;
}

body.lightbox-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .site-lightbox {
        padding-inline: 0.5rem;
    }

    .site-lightbox__image {
        max-width: 96vw;
        max-height: 75vh;
    }

    .site-lightbox__prev {
        left: 0.25rem;
    }

    .site-lightbox__next {
        right: 0.25rem;
    }

    .site-lightbox__footer {
        padding-inline: 0.25rem;
    }
}
