/* 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;
    z-index: 2;
}
.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: 90% !important; /* Ensure 100% width on small screens */
  max-width: 90%;  
  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;}
}

@media (min-width: 768px) {
  .imgmodal-content {
    width: 600px !important; /* Default width behavior */
    max-width: 100%; /* This can be adjusted based on how much space you want */
}
}
