/**
 * Etoilium Image Lightbox Styles
 */

/* Lightbox Overlay */
.etoilium-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.etoilium-lightbox .lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,.9);
    cursor: pointer;
}

/* Lightbox Container */
.etoilium-lightbox .lightbox-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

/* Close Button */
.etoilium-lightbox .lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background-color: #E8E9F2 !important;
    border: none !important;
    border-radius: 50%;
    color: #7371B4 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100001;
}

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

/* Navigation Buttons */
.etoilium-lightbox .lightbox-prev,
.etoilium-lightbox .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: #E8E9F2 !important;
    border: none !important;
    border-radius: 50%;
    color: #7371B4 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100001;
}

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

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

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

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

/* Lightbox Content */
.etoilium-lightbox .lightbox-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: calc(90vh - 150px);
    margin-bottom: 20px;
}

.etoilium-lightbox .lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 20px;
    border: 1px solid #E8E9F2;
}

/* Counter */
.etoilium-lightbox .lightbox-counter {
    color: #7371B4;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--etoilium-text-font, "Nunito", sans-serif);
    margin-bottom: 15px;
    text-align: center;
}

/* Thumbnails */
.etoilium-lightbox .lightbox-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 600px;
}

.etoilium-lightbox .lightbox-thumbnail {
    width: 80px;
    height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
    border: 1px solid #E8E9F2;
}

.etoilium-lightbox .lightbox-thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}

.etoilium-lightbox .lightbox-thumbnail.active {
    border-color: var(--etoilium-primary, #7371B4);
    opacity: 1;
}

/* Gallery cursor pointer */
.etoilium-images-gallery img {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.etoilium-images-gallery img:hover {
    transform: scale(1.02);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .etoilium-lightbox .lightbox-container {
        width: 95%;
        height: 95vh;
    }
    
    .etoilium-lightbox .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    .etoilium-lightbox .lightbox-prev,
    .etoilium-lightbox .lightbox-next {
        width: 44px;
        height: 44px;
    }
    
    .etoilium-lightbox .lightbox-prev {
        left: 10px;
    }
    
    .etoilium-lightbox .lightbox-next {
        right: 10px;
    }
    
    .etoilium-lightbox .lightbox-content {
        max-height: calc(95vh - 180px);
    }
    
    .etoilium-lightbox .lightbox-counter {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .etoilium-lightbox .lightbox-thumbnails {
        gap: 8px;
        max-width: 100%;
        padding: 0 10px;
    }
    
    .etoilium-lightbox .lightbox-thumbnail {
        width: 60px;
        height: 60px;
    }
}

/* Animation */
@keyframes lightboxFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.etoilium-lightbox {
    animation: lightboxFadeIn 0.3s ease;
}
