/* ============================================
   J4 ATELIER — Lightbox Styles
   Image enlargement with prev/next
   ============================================ */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 10, 10, 0.96);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    user-select: none;
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background-color: transparent;
    border: 1px solid rgba(250, 247, 242, 0.3);
    color: var(--color-ivory, #FAF7F2);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background-color: rgba(250, 247, 242, 0.1);
    border-color: rgba(250, 247, 242, 0.6);
}

/* Navigation Arrows */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: transparent;
    border: 1px solid rgba(250, 247, 242, 0.3);
    color: var(--color-ivory, #FAF7F2);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(250, 247, 242, 0.1);
    border-color: rgba(250, 247, 242, 0.6);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:disabled,
.lightbox-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Image Counter */
.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(250, 247, 242, 0.7);
    font-size: 0.9rem;
    font-family: var(--font-sans, 'Inter', sans-serif);
    letter-spacing: 0.05em;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-counter {
        bottom: 20px;
        font-size: 0.85rem;
    }
}

/* Loading State */
.lightbox-image.loading {
    opacity: 0.5;
}

/* Swipe Gesture Hint (Mobile) */
@media (hover: none) and (pointer: coarse) {
    .lightbox-prev,
    .lightbox-next {
        opacity: 0.5;
    }
}
