/**
 * Vanilla Lightbox CSS - Replacement for Lightbox2 CSS
 * Lightweight, modern styling for image galleries
 * Saije Esthetics - Performance Optimization
 */

.vanilla-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 300ms ease;
}

.vanilla-lightbox-overlay.show {
    opacity: 1;
}

.vanilla-lightbox-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vanilla-lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    opacity: 0;
    transition: opacity 300ms ease;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.vanilla-lightbox-image.loaded {
    opacity: 1;
}

.vanilla-lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    max-width: 100%;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.vanilla-lightbox-counter {
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin-top: 8px;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.vanilla-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.vanilla-lightbox-close:hover {
    opacity: 0.7;
}

.vanilla-lightbox-prev,
.vanilla-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 10px;
    display: none;
    transition: opacity 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    user-select: none;
}

.vanilla-lightbox-prev {
    left: -50px;
}

.vanilla-lightbox-next {
    right: -50px;
}

.vanilla-lightbox-prev:hover,
.vanilla-lightbox-next:hover {
    opacity: 0.7;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .vanilla-lightbox-container {
        max-width: 95%;
        max-height: 95%;
    }

    .vanilla-lightbox-image {
        max-height: 70vh;
    }

    .vanilla-lightbox-close {
        top: -35px;
        right: -10px;
        font-size: 25px;
    }

    .vanilla-lightbox-prev,
    .vanilla-lightbox-next {
        font-size: 30px;
        padding: 15px;
    }

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

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

    .vanilla-lightbox-caption {
        font-size: 13px;
        margin-top: 10px;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .vanilla-lightbox-prev {
        left: 10px;
        top: 10px;
        transform: none;
    }

    .vanilla-lightbox-next {
        right: 10px;
        top: 10px;
        transform: none;
    }

    .vanilla-lightbox-close {
        top: 10px;
        right: 50%;
        transform: translateX(50%);
    }
}

