#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--img-viewer-background);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

#lightbox.open {
    display: flex;
}

#lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    /* prevent img from being a flex item that stretches */
    flex-shrink: 0;
    user-select: none;
    -webkit-user-drag: none;
}

#lightbox-prev,
#lightbox-next {
    position: fixed;
    /* fixed instead of absolute — avoids any stacking quirks */
    top: 50%;
    transform: translateY(-50%);
    background: var(--img-viewer-button);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    width: 10vh;
    height: 10vh;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s, background 0.2s;
    z-index: 1001;
}

#lightbox-prev {
    left: 4vw;
}

#lightbox-next {
    right: 4vw;
}

#lightbox-prev [data-lucide],
#lightbox-next [data-lucide] {
    width: 5vh;
    height: 5vh;
    stroke: white;
    stroke-width: 1;
}

#lightbox-prev:hover,
#lightbox-next:hover {
    background: var(--button-hover);
}

#lightbox-prev:disabled,
#lightbox-next:disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}