/*
  Panorama Viewer — lightweight, dependency-free
  ------------------------------------------------
  Thumbnail sits inline in the page. Click it to open a full-height
  overlay; moving the mouse (or dragging a finger) left/right pans
  across the full width of the image.
*/

.pv-thumb {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  border-radius: 8px;
  background: #111;
  isolation: isolate;
}

.pv-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.pv-thumb:hover img {
  transform: scale(1.03);
}

.pv-thumb__hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font: 500 12px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.pv-thumb__hint svg {
  width: 14px;
  height: 14px;
  flex: none;
}

/* ---------------- Overlay ---------------- */

.pv-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  cursor: grab;
}

.pv-overlay.pv-open {
  opacity: 1;
  visibility: visible;
}

.pv-overlay.pv-dragging {
  cursor: grabbing;
}

.pv-overlay__img {
  position: absolute;
  left: 0;
  top: 50%;
  height: 100%;
  max-height: 100%;
  width: auto;
  max-width: none; /* guards against a page-wide img{max-width:100%} reset squeezing this */
  transform: translate(0, -50%);
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

.pv-overlay__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pv-overlay__close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.pv-overlay__close svg {
  width: 18px;
  height: 18px;
}

.pv-overlay__hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font: 500 12px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  background: rgba(0, 0, 0, 0.4);
  padding: 7px 14px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s ease 1.2s;
}

.pv-overlay.pv-hint-hidden .pv-overlay__hint {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.pv-overlay__progress {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.pv-overlay__progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 40px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .pv-thumb img,
  .pv-overlay {
    transition: none;
  }
}
