/* Image Viewer Modal Styles */
.image-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.image-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.image-viewer-container {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10001;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.image-nav-prev,
.image-nav-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10001;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.image-nav-prev {
    left: -70px;
}

.image-nav-next {
    right: -70px;
}

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

.image-nav-prev:disabled,
.image-nav-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.image-viewer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
}

.viewer-image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.3s ease-out;
}

.image-info {
    margin-top: 20px;
    text-align: center;
    color: #ffffff;
}

.image-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #ffffff;
}

.image-info p {
    font-size: 1rem;
    opacity: 0.8;
    margin: 0;
}

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

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

/* Mobile Styles */
@media (max-width: 767px) {
    .image-viewer-close {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .image-nav-prev,
    .image-nav-next {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .image-nav-prev {
        left: 20px;
    }

    .image-nav-next {
        right: 20px;
    }

    .viewer-image {
        max-width: 95vw;
        max-height: 70vh;
        border-radius: 8px;
    }

    .image-info {
        margin-top: 15px;
        padding: 0 20px;
    }

    .image-info h3 {
        font-size: 1.25rem;
    }

    .image-info p {
        font-size: 0.9rem;
    }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1024px) {
    .viewer-image {
        max-width: 85vw;
        max-height: 75vh;
    }

    .image-nav-prev {
        left: -60px;
    }

    .image-nav-next {
        right: -60px;
    }
}

/* Loading State */
.viewer-image.loading {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

/* Keyboard Focus Styles */
.image-viewer-close:focus,
.image-nav-prev:focus,
.image-nav-next:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}