/* CSS styles for the image modals (related colors are in stylesheet_colors.css) */
 .imgmodal {
     display: none;
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     z-index: 9999;
     text-align: center;
}
 .image-grid {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    /* Uses SMALL_IMAGE_WIDTH via inline style override */
     gap: 10px;
}
 .image-grid img {
     width: 100%;
     height: 100%;
     object-fit: cover;
    /* This ensures the image is zoomed and cropped to fit the square container */
     object-position: center;
    /* Center the visible portion of the image */
     position: relative;
}
 .image-grid::before {
     content: "";
     padding-top: 0;
    /* This creates a square aspect ratio for each grid item */
     grid-column: 1 / -1;
}
 .centered-image {
     max-width: 100%;
     max-height: 100%;
     display: block;
     margin: 0 auto;
}
 .imgmodal-content {
     position: absolute;
     top: 50%;
     left: 50%;
     transform: translate(-50%, -50%);
     padding: 10px;
     border-radius: 5px;
     display: flex;
     flex-direction: column;
     justify-content: center;
     align-items: center;
     width: 100%;
    /* Ensure 100% width on small screens */
     box-sizing: border-box;
}
 .imgmodal-close {
     position: absolute;
     top: 10px;
     right: 10px;
     font-size: 24px;
     cursor: pointer;
     z-index: 2;
}
 .imgmodal img {
     padding-bottom: 10px;
}
 @media (min-width: 576px) {
     .imgmodal-content {
         max-width: 600px;
    }
     .centered-image {
         max-width: 500px;
    }
}
