/* ========================================
   LIGHTBOX / MODAL
   ======================================== */

.necox-lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999999 !important;
    display: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.necox-lightbox-modal.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.necox-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999999;
    animation: fadeIn 0.3s ease;
}

.necox-lightbox-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 20px;
    box-sizing: border-box;
}

/* Close Button */
.necox-lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000001;
}

.necox-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

/* Slideshow */
.necox-lightbox-slideshow {
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10000000;
}

.necox-lightbox-slideshow.active {
    display: flex !important;
}

.necox-lightbox-image-container {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000000;
    position: relative;
}

.necox-lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 10000000;
}

/* Navigation Arrows */
.necox-lightbox-prev,
.necox-lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000001;
}

.necox-lightbox-prev {
    left: 20px;
}

.necox-lightbox-next {
    right: 20px;
}

.necox-lightbox-prev:hover,
.necox-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

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

/* Counter */
.necox-lightbox-counter {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    z-index: 10000001;
}

/* Video Player */
.necox-lightbox-video {
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10000000;
}

.necox-lightbox-video.active {
    display: flex !important;
}

.necox-lightbox-video-container {
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    animation: zoomIn 0.3s ease;
    z-index: 10000000;
    position: relative;
}

.necox-lightbox-video-container iframe,
.necox-lightbox-video-container video {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .necox-lightbox-container {
        padding: 70px 10px 10px;
    }
    
    .necox-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .necox-lightbox-prev,
    .necox-lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .necox-lightbox-prev {
        left: 10px;
    }
    
    .necox-lightbox-next {
        right: 10px;
    }
    
    .necox-lightbox-counter {
        bottom: 20px;
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .necox-lightbox-video-container {
        width: 95%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Body scroll lock when lightbox is open */
body.necox-lightbox-open {
    overflow: hidden !important;
}

/* Elementor overlay fix */
.necox-lightbox-modal {
    position: fixed !important;
    pointer-events: auto !important;
}

.necox-lightbox-modal * {
    pointer-events: auto !important;
}
