img.pa-ir-thumb {
  cursor: zoom-in;
}

.pa-ir-noscroll {
  overflow: hidden;
}

/* Overlay */
#pa-ir-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;

  background: rgba(0, 0, 0, 0.75);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 12px;

  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

#pa-ir-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Stage: only image + controls */
.pa-ir-stage {
  position: relative;
  max-width: 100dvw;
  max-height: 100dvh;

  display: flex;
  align-items: center;
  justify-content: center;

  touch-action: pan-y; /* allow vertical scroll, block horizontal */
}

/* Image */
.pa-ir-full {
  max-width: calc(100dvw - 24px);
  max-height: calc(100dvh - 24px);
  object-fit: contain;

  background: #111;
  border-radius: 6px;

  opacity: 0;
  transition: opacity 200ms ease;
}

.pa-ir-full.is-loaded {
  opacity: 1;
}

/* Buttons */
.pa-ir-close,
.pa-ir-prev,
.pa-ir-next {
  position: absolute;
  border: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
}

.pa-ir-close {
  top: -6px;
  right: -6px;
  width: 40px;
  height: 40px;
  font-size: 26px;
}

.pa-ir-prev,
.pa-ir-next {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  font-size: 30px;
}

.pa-ir-prev { left: -54px; }
.pa-ir-next { right: -54px; }

.pa-ir-hidden {
  display: none !important;
}

.pa-ir-counter {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: #fff;
}
