/* CSS styles for the image modals */

.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: 5px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

/* colors for the image modals */
.imgmodal {background-color: rgba(0, 0, 0, 0.81);}
.image-grid img {border: 1px solid #364fb5; box-shadow: 1px 1px 1px #364fb5;}
.imgmodal-content {background-color: #fff;}
