/* Semapix Gallery - Lightbox Overlay */

.spx-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.spx-lightbox-overlay.active {
    opacity: 1;
}

.spx-lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.spx-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.spx-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.spx-lightbox-prev,
.spx-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.spx-lightbox-prev:hover,
.spx-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
}

.spx-lightbox-prev {
    left: 1rem;
}

.spx-lightbox-next {
    right: 1rem;
}

.spx-lightbox-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    user-select: none;
}

/* Hide nav buttons when only one image */
.spx-lightbox-overlay[data-count="1"] .spx-lightbox-prev,
.spx-lightbox-overlay[data-count="1"] .spx-lightbox-next,
.spx-lightbox-overlay[data-count="1"] .spx-lightbox-counter {
    display: none;
}

/* Mobile touch area adjustments */
@media (max-width: 768px) {
    .spx-lightbox-prev,
    .spx-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .spx-lightbox-image {
        max-width: 95vw;
        max-height: 80vh;
    }
}
