/**
 * NGVF Lightbox Styles
 * 
 * @package NGVF_Standalone
 * @version 2.0.0
 */

/* ==========================================================================
   Lightbox Overlay
   ========================================================================== */

.ngvf-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ngvf-lightbox-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* ==========================================================================
   Lightbox Content
   ========================================================================== */

.ngvf-lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95vh;
    cursor: default;
    animation: ngvf-lightbox-zoom-in 0.3s ease;
}

@keyframes ngvf-lightbox-zoom-in {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.ngvf-lightbox-content img {
    display: block;
    max-width: 100%;
    max-height: 95vh;
    width: auto;
    height: auto;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   Close Button
   ========================================================================== */

.ngvf-lightbox-close {
    position: fixed;
    top: 20px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 30px;
    line-height: 50px;
    text-align: center;
    color: #333;
    transition: all 0.3s ease;
    z-index: 100000;
    padding: 0;
}

.ngvf-lightbox-close:hover {
    background: white;
    transform: rotate(90deg);
}

.ngvf-lightbox-close:focus {
    outline: 2px solid white;
    outline-offset: 3px;
}

/* ==========================================================================
   Navigation Arrows
   ========================================================================== */

.ngvf-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 30px;
    color: #333;
    transition: all 0.3s ease;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ngvf-lightbox-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.ngvf-lightbox-nav:focus {
    outline: 2px solid white;
    outline-offset: 3px;
}

.ngvf-lightbox-prev {
    left: 30px;
}

.ngvf-lightbox-next {
    right: 30px;
}

.ngvf-lightbox-nav.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.ngvf-lightbox-nav.disabled:hover {
    transform: translateY(-50%) scale(1);
}

/* ==========================================================================
   Image Counter
   ========================================================================== */

.ngvf-lightbox-counter {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    z-index: 100000;
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */

.ngvf-lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top: 6px solid white;
    border-radius: 50%;
    animation: ngvf-lightbox-spin 1s linear infinite;
}

@keyframes ngvf-lightbox-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media screen and (max-width: 768px) {
    .ngvf-lightbox-close {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
        font-size: 25px;
        line-height: 45px;
    }
    
    .ngvf-lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 25px;
    }
    
    .ngvf-lightbox-prev {
        left: 10px;
    }
    
    .ngvf-lightbox-next {
        right: 10px;
    }
    
    .ngvf-lightbox-counter {
        bottom: 20px;
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ==========================================================================
   Disable Body Scroll When Lightbox Active
   ========================================================================== */

body.ngvf-lightbox-open {
    overflow: hidden;
}
