/* Universal image zoom overlay for exam content */
.image-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 10250; /* Must clear .exam-nav-bar (10150) so the zoomed image isn't blocked by the question-number nav bar */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease-in-out;
    opacity: 0;
}

.image-zoom-overlay.active {
    background: rgba(0, 0, 0, 0.92);
    opacity: 1;
}

.image-zoom-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 60px 60px;
}

.image-zoom-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 100%;
}

.image-zoom-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: default;
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

.image-zoom-overlay.active .image-zoom-content img {
    transform: scale(1);
}

.image-zoom-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    font-weight: 300;
}

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

.image-zoom-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

.image-zoom-overlay.active .image-zoom-hint {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .image-zoom-container {
        padding: 60px 20px 40px;
    }
    
    .image-zoom-close {
        width: 44px;
        height: 44px;
        font-size: 26px;
    }
    
    .image-zoom-hint {
        font-size: 12px;
        padding: 8px 16px;
    }
}
