#gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#gallery-lightbox[hidden] {
    display: none !important;
}

#gallery-lightbox.is-open {
    display: flex;
}

@media (min-width: 640px) {
    #gallery-lightbox.is-open {
        padding: 2rem;
    }
}

/* Photo fills the entire left media panel (no letterboxing). */
#lightbox-media {
    position: relative;
    overflow: hidden;
}

#lightbox-image:not(.hidden) {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    object-position: center;
}

@media (min-width: 1024px) {
    #lightbox-media {
        min-height: 420px;
        align-self: stretch;
    }

    #lightbox-image:not(.hidden) {
        position: absolute;
        inset: 0;
        min-height: 0;
    }
}
