/* 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 */
}

.image-grid::before {
    content: "";
    padding-top: 10%; /* 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%;
    max-width:auto; /* Set width to 100% for fullscreen effect */
    max-height:100%; /* Set height to 100% for fullscreen effect */
    transform: translate(-50%, -50%);
    padding: 20px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.imgmodal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
}

.imgmodal img {
    padding-bottom: 10px;
}
