/* Adapted from lakonlab/ui/media_viewer/viewer.css. */

.item img {
  cursor: pointer;
}

#overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: auto;
  overscroll-behavior: contain;
}

#overlay.scrollY {
  justify-content: flex-start;
}

#overlay img {
  max-width: 90vw;
  max-height: 90vh;
  cursor: zoom-in;
}

#overlay img.zoomed {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

#overlay video {
  max-width: 90vw;
  max-height: 90vh;
  cursor: default;
}

#caption {
  color: #fff;
  margin: 1rem auto 0 auto;
  text-align: center;
  font-size: 1rem;
  padding: 0 1rem;
  max-width: 90vw;
}
