/* =========================================
   PHOTO ZOOM (tap to enlarge)
   Shared by every page that uses java/photo-zoom.js
   ========================================= */

/* Magnifying-glass cursor on desktop */
.zoomable {
  cursor: zoom-in;
}

/* "Tap to enlarge" label in the photo corner */
.zoom-badge {
  background: rgba(43, 58, 75, 0.85);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 20px;
  pointer-events: none;
}

/* The full-screen viewer */
#zoom-dialog {
  border: none;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  background: transparent;
  overflow: hidden;
}
#zoom-dialog[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
#zoom-dialog::backdrop {
  background: rgba(0, 0, 0, 0.92);
}

/* The enlarged photo: fills the screen, zoom with wheel or pinch */
#zoom-dialog img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 0 0;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: zoom-in;
}
#zoom-dialog img.is-zoomed {
  cursor: grab;
}

/* Close button */
.zoom-close {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #2b3a4b;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

/* Stop the page behind from scrolling while the viewer is open */
html:has(#zoom-dialog[open]) {
  overflow: hidden;
}
