/* Photo-page lightbox viewport. Keeps the displayed image and navigation controls
   in stable positions while different image aspect ratios are browsed. */
.gallery-lightbox {
    position: relative;
    min-width: 0;
}

.gallery-lightbox-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: clamp(320px, 62vh, 720px);
    min-height: 0;
    overflow: hidden;
}

.gallery-lightbox-image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0.75rem 3.75rem;
    box-sizing: border-box;
    cursor: zoom-in;
    line-height: 0;
}

.gallery-lightbox-image-link .gallery-watermark-photo-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.gallery-lightbox-image-link .gallery-watermark-photo-frame > img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    margin: 0;
}

.gallery-lightbox-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 4rem;
    transform: translateY(-50%);
    border: 1px solid rgba(0, 0, 0, 0.22);
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.92);
    color: inherit;
    text-decoration: none;
    font-size: 2.2rem;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.gallery-lightbox-prev {
    left: 0.35rem;
}

.gallery-lightbox-next {
    right: 0.35rem;
}

.gallery-lightbox-arrow:hover,
.gallery-lightbox-arrow:focus-visible {
    background: #fff;
}

.gallery-lightbox-arrow:focus-visible,
.gallery-lightbox-image-link:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 2px;
}

.gallery-lightbox-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 6;
}

@media (max-width: 720px) {
    .gallery-lightbox-stage {
        height: clamp(280px, 58vh, 620px);
    }

    .gallery-lightbox-image-link {
        padding-left: 3rem;
        padding-right: 3rem;
    }

    .gallery-lightbox-arrow {
        width: 2.35rem;
        height: 3.5rem;
        font-size: 1.9rem;
    }
}
