/* WPCODEBOX: @name custom-image-popup-style */
/* 1. Full Screen Overlay (Hidden by default, shown by JS) */
/* 1. Full Screen Overlay */
#custom-image-popup-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); 
    z-index: 99999;
    
    align-items: center;
    justify-content: center;
    padding: 20px; 
}

/* 2. The Popup Container (The main box) */
#custom-image-popup-container {
    position: relative; 
    
    /* --- CHANGES FOR 80% SIZE AND SQUARE SHAPE --- */
    width: 80vw; /* Sets width to 80% of the viewport width */
    max-width: 80vh; /* Limits the width so it doesn't exceed 80% of viewport height (crucial for square) */
    
    /* This technique ensures the height matches the width (1:1 aspect ratio) */
    height: 0;
    padding-bottom: 80vw; /* Sets height to 80% of viewport width */
    max-height: 80vh; 
    padding-bottom: min(80vw, 80vh); /* Use min to ensure it stays within 80% of both screen axes */
    
    
    /* General Styling */
    border: 5px solid #fff; /* White border around the image */
    border-radius: 20px; /* Rounded corners */
    overflow: hidden; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* 3. The Image */
#custom-image-popup-img {
    position: absolute; /* Needed because the container uses padding for height */
    top: 0;
    left: 0;
    
    display: block;
    width: 100%;
    height: 100%;
    
    /* Ensures the square container is completely filled by the image */
    object-fit: cover; 
}

/* 4. Close Button (Inside & Styled) */
#popup-close-button {
    position: absolute;
    top: 15px; 
    right: 15px; 
    z-index: 100000;
    
    /* Styling */
    background-color: #000000d6; 
    color: white;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    padding: 0;
    text-align: center;
    transition: background-color 0.2s;
}

#popup-close-button:hover {
    background-color: #c90000; 
}