/**
 * Image Viewer / Lightbox Styles
 */

.image-viewer-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-viewer-modal.active {
    display: block;
    opacity: 1;
}

.image-viewer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.image-viewer-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 80px;
}

.image-viewer-container {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-container img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.image-viewer-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

/* Navigation Buttons */
.image-viewer-close,
.image-viewer-prev,
.image-viewer-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.image-viewer-close:hover,
.image-viewer-prev:hover,
.image-viewer-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.image-viewer-close {
    top: 20px;
    right: 20px;
}

.image-viewer-close i {
    font-size: 1.2rem;
}

.image-viewer-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.image-viewer-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.image-viewer-prev:hover,
.image-viewer-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.image-viewer-prev i,
.image-viewer-next i {
    font-size: 1.5rem;
}

/* Info Bar */
.image-viewer-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.image-viewer-counter {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

.image-viewer-download {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.image-viewer-download:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .image-viewer-content {
        padding: 80px 10px 100px;
    }

    .image-viewer-close,
    .image-viewer-prev,
    .image-viewer-next {
        width: 40px;
        height: 40px;
    }

    .image-viewer-close {
        top: 10px;
        right: 10px;
    }

    .image-viewer-prev {
        left: 10px;
    }

    .image-viewer-next {
        right: 10px;
    }

    .image-viewer-info {
        bottom: 10px;
        padding: 10px 16px;
        gap: 12px;
    }

    .image-viewer-counter {
        font-size: 0.8rem;
        min-width: 50px;
    }

    .image-viewer-download {
        font-size: 0.8rem;
        padding: 4px 10px;
    }

    .image-viewer-container img {
        max-height: 70vh;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.image-viewer-modal.active .image-viewer-container img {
    animation: fadeIn 0.3s ease;
}
