/*
 * CSS for Zoomable Preview (Non-Modal)
 */

/* Backdrop to dim the background */
.zoom-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 1000; /* Below the zoomed content, but above everything else */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.zoom-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

/* 
 * The .preview-square is the main container for the image layout.
 * When we add the .is-zoomed class, it will be lifted up and scaled.
 */
.preview-square.is-zoomed {
    position: fixed;
    top: 50%;
    left: 50%;
    
    /* 
     * Center the element on the screen and then scale it by a factor of 1.5.
     * The translate happens first to center, then the scale is applied.
    */
    transform: translate(-50%, -50%) scale(1.5);

    /* We no longer constrain the size, letting the transform handle it. */
    width: auto;
    height: auto;
    
    z-index: 1001; /* Above the backdrop */
    
    /* Keep the original styles but ensure it's on top */
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 2px solid #555;
    
    /* Make the transition smooth, only for the transform property */
    transition: transform 0.3s ease;
} 