/* ═══════════════════════════════════════════════════
   INFO HOTSPOT — diagonal label style (fixed)
   ═══════════════════════════════════════════════════ */

.info-hotspot {
  line-height: 1.2em;
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  backface-visibility: hidden;
  transition: opacity 0.3s ease;
}

.info-hotspot.out-of-viewport {
  width: 20px;
  height: 20px;
  margin-left: -10px;
  margin-top: -10px;
  opacity: 0.6;
  pointer-events: none; /* off-screen hotspot labels must not block pano */
}

.info-hotspot.in-viewport {
  width: 20px;
  height: 20px;
  margin-left: -10px;
  margin-top: -10px;
  opacity: 1;
  pointer-events: auto;
}

/* ── Dot ──────────────────────────────────────────── */
.info-hotspot-dot {
  position: absolute;
  width: 11px;
  height: 11px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  /* Centered horizontally at the hotspot origin; sits at the bottom of the
     wrapper so the label floats above it.                                    */
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  transition: transform 0.3s ease;
  will-change: transform;
}

@keyframes dotPulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.15);
  }
}

.info-hotspot.in-viewport .info-hotspot-dot {
  animation: dotPulse 2s ease-in-out infinite;
}

/* ── Label container ─────────────────────────────────
   Positioned so its BOTTOM-RIGHT corner is near the dot.
   The label floats to the upper-left; the JS then draws
   an arrow from the dot center to the vertical tick on
   the right edge of the label text box.
   ─────────────────────────────────────────────────── */
.info-hotspot-label {
  position: absolute;

  /* Push label UP above the dot */
  bottom: 18px; /* clears the dot (11 px) + a small gap           */

  /* Pull label LEFT so the text box sits to the left of the dot.
     Adjust this if you need the label further left/right.                    */
  right: 50px; /* shifts the whole label further to the left      */

  /* Let the label be as wide as its text */
  white-space: nowrap;

  opacity: 1;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s 1.2s;
  z-index: 10;
  will-change: opacity, transform;
}

.info-hotspot.near-center .info-hotspot-label {
  visibility: visible;
  transition: visibility 0s 0s;
}

/* ── Diagonal arrow line (drawn by JS) ───────────────
   clip-path animates from "no line" → "full line"
   clip-path: inset(0 100% 0 0) means the right 100 % is clipped → invisible
   clip-path: inset(0   0% 0 0) means nothing is clipped → fully visible
   ─────────────────────────────────────────────────── */
.info-hotspot-label-arrow {
  position: absolute;
  /* width/height/left/top/transform are all set by arrow_positioning.js */
  background: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  transform-origin: 0 50%; /* rotate from left end (= dot side)     */

  /* Start fully clipped from the right (dot side) so it "draws" leftward */
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.55s ease 0s;
}

.info-hotspot.near-center .info-hotspot-label-arrow {
  clip-path: inset(0 0% 0 0); /* fully visible                         */
}

/* ── Vertical tick on the right edge of the text box ─
   Appears AFTER the diagonal line arrives (delay = 0.55s)
   ─────────────────────────────────────────────────── */
.info-hotspot-label-vertical {
  /* Base styles — overridden by JS but kept here as fallback */
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  transform-origin: 50% 100%; /* grow upward from the bottom           */
  width: 2.6px;
  height: 30px;
  background: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  pointer-events: none;

  clip-path: inset(100% 0 0 0); /* start hidden (top clipped away)       */
  transition: clip-path 0.25s ease 0.55s; /* starts when diagonal finishes */
}

.info-hotspot.near-center .info-hotspot-label-vertical {
  clip-path: inset(0 0 0 0); /* fully visible, grew upward            */
}

/* ── Yellow label text box ───────────────────────────
   Emerges LEFT-ward from where the vertical tick sits.
   Appears AFTER the vertical tick grows (delay = 0.55 + 0.25 = 0.8s)
   ─────────────────────────────────────────────────── */
.info-hotspot-label-text {
  display: block;
  background: #ffea00;
  color: #314900;
  padding: 8px 16px;
  border-radius: 5px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  letter-spacing: 0.3px;
  line-height: 1.3;
  text-align: center;

  transform-origin: right center; /* emerge from the right (vertical tick) */
  clip-path: inset(0 0 0 100%); /* start hidden, clipped from right      */
  transition: clip-path 0.35s ease 0.8s;
}

.info-hotspot.near-center .info-hotspot-label-text {
  clip-path: inset(0 0 0 0%); /* fully visible                         */
}

/* ── Mobile tweaks ───────────────────────────────────  */
.mobile .info-hotspot-dot {
  width: 8px;
  height: 8px;
}

.mobile .info-hotspot.out-of-viewport {
  width: 14px;
  height: 14px;
  margin-left: -7px;
  margin-top: -7px;
}

.mobile .info-hotspot.in-viewport {
  width: 14px;
  height: 14px;
  margin-left: -7px;
  margin-top: -7px;
}

.mobile .info-hotspot-label-text {
  font-size: 11px;
  padding: 5px 10px;
}

/* Extra-small phones */
@media (max-width: 400px) {
  .mobile .info-hotspot-dot {
    width: 7px;
    height: 7px;
  }
  .mobile .info-hotspot-label-text {
    font-size: 10px;
    padding: 4px 8px;
  }
}

/* ── Hide default modal elements on desktop ──────────  */
.info-hotspot .info-hotspot-header,
.info-hotspot .info-hotspot-icon-wrapper,
.info-hotspot .info-hotspot-icon,
.info-hotspot .info-hotspot-title-wrapper,
.info-hotspot .info-hotspot-close-wrapper,
.info-hotspot .info-hotspot-text {
  display: none !important;
  visibility: hidden !important;
}

/* ══════════════════════════════════════════════════════
   INFO HOTSPOT MODAL  (mobile only)
   ══════════════════════════════════════════════════════ */
.desktop .info-hotspot-modal {
  display: none;
}

.info-hotspot-modal {
  position: fixed; /* fixed so it reliably covers viewport from body */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 11000 !important;
  background-color: rgba(0, 0, 0, 0.5);
  line-height: 1.2em;
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important; /* NEVER block pano drag when not visible */
  transition:
    opacity 0.2s ease-in-out 0.5s,
    visibility 0s 0.7s;
}

.info-hotspot-modal.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto !important;
  transition:
    opacity 0.2s ease-in-out,
    visibility 0s 0s;
}

.info-hotspot-modal .info-hotspot-header {
  position: absolute;
  top: 60px;
  left: 10px;
  right: 10px;
  width: auto;
  height: 50px;
  background-color: rgba(103, 115, 131, 0.8);
  opacity: 0;
  transition: opacity 0.3s ease-in-out 0.2s;
  display: flex !important;
  visibility: visible !important;
}

.info-hotspot-modal.visible .info-hotspot-header {
  opacity: 1;
}

.info-hotspot-modal .info-hotspot-icon-wrapper {
  width: 50px;
  height: 50px;
  display: flex !important;
  visibility: visible !important;
}

.info-hotspot-modal .info-hotspot-icon {
  width: 90%;
  height: 90%;
  margin: 5%;
  display: block !important;
  visibility: visible !important;
}

.info-hotspot-modal .info-hotspot-title-wrapper {
  position: absolute;
  top: 0;
  left: 50px;
  right: 50px;
  width: auto;
  height: 50px;
  padding: 0 10px;
  display: flex !important;
  visibility: visible !important;
}

.info-hotspot-modal .info-hotspot-title-wrapper:before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  height: 100%;
}

.info-hotspot-modal .info-hotspot-title {
  display: inline-block !important;
  visibility: visible !important;
  vertical-align: middle;
  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.info-hotspot-modal .info-hotspot-close-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  width: 50px;
  height: 50px;
  background-color: rgba(78, 88, 104, 0.8);
  cursor: pointer;
  display: flex !important;
  visibility: visible !important;
}

.info-hotspot-modal .info-hotspot-close-icon {
  width: 70%;
  height: 70%;
  margin: 15%;
  display: block !important;
  visibility: visible !important;
}

.info-hotspot-modal .info-hotspot-text {
  position: absolute;
  top: 110px;
  bottom: 10px;
  left: 10px;
  right: 10px;
  padding: 10px;
  background-color: rgba(58, 68, 84, 0.8);
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  display: block !important;
  visibility: visible !important;
  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.info-hotspot-modal.visible .info-hotspot-text {
  opacity: 1;
  transition: opacity 0.3s ease-in-out 0.4s;
}
