/* css/lazy_loading.css */

#gallery {
  display: grid;
  gap: 1.44rem;
  /* excessive padding for lazy loading */
  padding: 0 0 600px 0;
}

#gallery h3{
  grid-column: 1/-1;
  padding: 0 1.44rem;
}

#gallery img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16/9;
}

#modal img{
  object-fit: contain;
}

/* modal styles */

.modal {
  /* This way it could be display flex or grid or whatever also. */
  display: grid;
  /* Probably need media queries here */
  width: clamp(300px, 80vw, 100vw);
  /* min-height: 300px; */
  max-height: 80vh;
  position: fixed;
  z-index: 100;
  left: 50%;
  top: 50%;
  
  /* Use this for centering if unknown width/height */
  transform: translate(-50%, -50%);
  background: rgb(64 64 64 /.9);
  box-shadow: 0 0 60px 10px rgba(0, 0, 0, 0.9);
}
.closed {
  display: none;
}

.modal img{
  /* width: clamp(auto, 80vw, 100vw);*/
  /* height: clamp(200px, 80vh, 80vh); */
  max-height: 80vh;

}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  background: rgba(0, 0, 0, 0.6);
}

.modal figcaption{
  top: -0.5rem;
}


.modal .close-button {
  position: absolute;
  
  /* don't need to go crazy with z-index here, just sits over .modal-guts */
  z-index: 1;
  
  top: 10px;
  
  /* needs to look OK with or without scrollbar */
  right: 20px;
  
  border: 0;
  color: rgb(151 193 234 / 0.85);
  background-color: rgb(16 16 16 /1);
  padding: 5px 10px;
  font-size: 1.2rem;
  border-radius: 0.8rem;
}

.modal .close-button:hover, .open-button:hover {
  color: rgb(16 16 16 / 1);
  background-color: rgb(151 193 234 / 0.85);
}

.open-button{
  padding: 0.25rem 1rem;
  border-radius: 0.8rem;
  color: rgb(151 193 234 / 0.85);
  background-color: rgb(16 16 16 /1);
}




@media screen and (min-width: 720px) {
  #gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  
}
@media screen and (min-width: 960px) {
  #gallery {
    grid-template-columns: repeat(3, 1fr);
  }
  
}