/* ========================================
   IMAGE VIEWER OVERLAY
   ======================================== */
.image-viewer-container {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

#viewer-image {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 12px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8);
    border: 3px solid rgba(255, 255, 255, 0.15);
    object-fit: contain;
    cursor: zoom-out;
    transition: transform 0.3s ease;
}

#viewer-image:hover {
    transform: scale(1.02);
}

.viewer-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 50px;
    height: 50px;
    background: rgba(255, 51, 102, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(255, 51, 102, 0.4);
    z-index: calc(var(--z-overlays) + 1);
    /* Always above image viewer */
}

.viewer-close:hover {
    background: rgba(255, 51, 102, 1);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 8px 32px rgba(255, 51, 102, 0.6);
}

.viewer-close:active {
    transform: rotate(90deg) scale(0.95);
}