/* Image Modal Component */
/* Full-screen image viewer with smooth animations */

.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: var(--z-modal);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.open {
    display: flex;
    opacity: 1;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: transparent;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.image-modal.open .image-modal-content {
    transform: scale(1);
}

.image-modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--space-4);
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
    text-align: center;
    z-index: 1;
}

.image-modal-header h3 {
    margin: 0;
    color: white;
    font-size: var(--text-lg);
    font-weight: 600;
}

.image-modal-close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.image-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.image-modal-body img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

/* Clickable images */
.clickable-image {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clickable-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 640px) {
    .image-modal-content {
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .image-modal-close {
        top: var(--space-2);
        right: var(--space-2);
        width: 36px;
        height: 36px;
        font-size: 24px;
    }
    
    .image-modal-header {
        padding: var(--space-3);
    }
    
    .image-modal-header h3 {
        font-size: var(--text-base);
    }
}
