/* ---------------------------------------------------------
   WML INTERACTIVE HOTSPOT VIEWER CSS
   --------------------------------------------------------- */

.wml-hotspot-viewer {
  --viewer-height: 100vh;
  position: relative;
  width: 100%;
  height: var(--viewer-height);
  overflow: hidden;
  font-family: inherit;
  background: radial-gradient(ellipse at center, #1a1d24 0%, #0a0b0f 100%);
  color: #f0ece6;
  -webkit-font-smoothing: antialiased;
}

/* STAGE = the cinematic viewport */
.wml-hotspot-viewer .stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  perspective: 1400px;
}

/* The "camera" is the element we scale/translate to simulate zoom */
.wml-hotspot-viewer .camera {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  transition: transform 1500ms cubic-bezier(0.77, 0, 0.175, 1),
              filter   1500ms cubic-bezier(0.77, 0, 0.175, 1);
  will-change: transform, filter;
}

/* HOUSE SCENE (the master image + parallax layers) */
.wml-hotspot-viewer .house-scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The main house image container — keeps a fixed aspect ratio */
.wml-hotspot-viewer .house-frame {
  position: relative;
  width: min(92vw, 1400px);
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.04);
}

/* Parallax depth layers behind/in front of the main image */
.wml-hotspot-viewer .parallax-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: transform 1500ms cubic-bezier(0.77, 0, 0.175, 1);
  will-change: transform;
}
.wml-hotspot-viewer .parallax-back   { z-index: 1; }
.wml-hotspot-viewer .parallax-mid    { z-index: 2; }
.wml-hotspot-viewer .parallax-front  { z-index: 4; }

/* The actual house image */
.wml-hotspot-viewer .house-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  z-index: 3;
  scale: 1;
  transition: scale var(--hs-zoom-duration, 600ms) cubic-bezier(0.22, 1, 0.36, 1),
              filter 1500ms cubic-bezier(0.77, 0, 0.175, 1);
}

/* Soft vignette overlay to add cinematic richness */
.wml-hotspot-viewer .vignette {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%);
}

/* ==========================================================
   HOTSPOTS — base (shared across all styles)
   ========================================================== */

/* Default color token — overridden by --hs-color when set */
.wml-hotspot-viewer {
  --hs-color: rgba(255, 220, 150, 0.9);
  --hs-color-faint: rgba(255, 220, 150, 0.18);
  --hs-color-mid:   rgba(255, 220, 150, 0.45);
}

.wml-hotspot-viewer .hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 10;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 400ms ease,
              background 400ms ease;
}
.wml-hotspot-viewer .hotspot:hover {
  transform: translate(-50%, -50%) scale(1.15);
}

/* When zoomed in, hide hotspots */
.wml-hotspot-viewer .camera.is-zoomed .hotspot {
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms ease;
}

/* Label (shared) */
.wml-hotspot-viewer .hotspot .hotspot-label {
  position: absolute;
  top: 115%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 12px;
  background: rgba(10,10,12,0.75);
  backdrop-filter: blur(6px);
  border: 1px solid var(--hs-color-mid);
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease, transform 300ms ease;
  color: #f6e9c8;
}
.wml-hotspot-viewer .hotspot:hover .hotspot-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================
   STYLE 1 — GLOW  (default warm aura + pulsing center dot)
   ========================================================== */
.wml-hotspot-viewer.hs-style-glow .hotspot {
  background: radial-gradient(circle, var(--hs-color-faint) 0%, transparent 70%);
  border: 1.5px solid var(--hs-color-mid);
  box-shadow: 0 0 0 0 var(--hs-color-faint);
}
.wml-hotspot-viewer.hs-style-glow .hotspot::before {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--hs-color);
  box-shadow: 0 0 14px var(--hs-color-mid);
  animation: wml-hs-glow-pulse 2.4s ease-in-out infinite;
}
.wml-hotspot-viewer.hs-style-glow .hotspot:hover {
  background: radial-gradient(circle, var(--hs-color-mid) 0%, transparent 75%);
  box-shadow: 0 0 30px 6px var(--hs-color-faint);
}
@keyframes wml-hs-glow-pulse {
  0%, 100% { transform: scale(1);   opacity: 0.95; }
  50%       { transform: scale(1.8); opacity: 0.4;  }
}

/* ==========================================================
   STYLE 2 — RING  (expanding concentric pulse rings)
   ========================================================== */
.wml-hotspot-viewer.hs-style-ring .hotspot {
  background: transparent;
  border: 2px solid var(--hs-color);
}
.wml-hotspot-viewer.hs-style-ring .hotspot::before,
.wml-hotspot-viewer.hs-style-ring .hotspot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--hs-color);
  opacity: 0;
  animation: wml-hs-ring-expand 2.2s ease-out infinite;
}
.wml-hotspot-viewer.hs-style-ring .hotspot::after {
  animation-delay: 1.1s;
}
.wml-hotspot-viewer.hs-style-ring .hotspot:hover {
  background: var(--hs-color-faint);
  box-shadow: 0 0 20px 4px var(--hs-color-faint);
}
@keyframes wml-hs-ring-expand {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0;   }
}

/* ==========================================================
   STYLE 3 — CROSSHAIR  (targeting reticle with corner arcs)
   ========================================================== */
.wml-hotspot-viewer.hs-style-crosshair .hotspot {
  background: transparent;
  border: none;
}
.wml-hotspot-viewer.hs-style-crosshair .hotspot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--hs-color-mid);
  animation: wml-hs-crosshair-spin 6s linear infinite;
}
.wml-hotspot-viewer.hs-style-crosshair .hotspot::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--hs-color);
  box-shadow: 0 0 10px var(--hs-color);
}
/* Four corner tick marks via box-shadow on a tiny pseudo */
.wml-hotspot-viewer.hs-style-crosshair .hotspot-label::before {
  display: none;
}
.wml-hotspot-viewer.hs-style-crosshair .hotspot:hover::before {
  border-color: var(--hs-color);
  animation-duration: 1.5s;
}
@keyframes wml-hs-crosshair-spin {
  0%   { transform: rotate(0deg);   }
  100% { transform: rotate(360deg); }
}

/* ==========================================================
   STYLE 4 — DOT  (minimal solid dot with ripple ping)
   ========================================================== */
.wml-hotspot-viewer.hs-style-dot .hotspot {
  background: transparent;
  border: none;
}
.wml-hotspot-viewer.hs-style-dot .hotspot::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--hs-color);
  box-shadow: 0 0 0 0 var(--hs-color-mid);
  animation: wml-hs-dot-ping 2s ease-out infinite;
}
.wml-hotspot-viewer.hs-style-dot .hotspot::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--hs-color);
  animation: wml-hs-dot-ping 2s ease-out infinite;
  animation-delay: 0.5s;
  opacity: 0;
}
.wml-hotspot-viewer.hs-style-dot .hotspot:hover::before {
  box-shadow: 0 0 18px 4px var(--hs-color-mid);
}
@keyframes wml-hs-dot-ping {
  0%   { transform: scale(1);   opacity: 1; }
  70%  { transform: scale(2.8); opacity: 0; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* ==========================================================
   STYLE 5 — DIAMOND  (rotated square with shimmer sweep)
   ========================================================== */
.wml-hotspot-viewer.hs-style-diamond .hotspot {
  border-radius: 4px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--hs-color-faint);
  border: 1.5px solid var(--hs-color);
  overflow: hidden;
}
.wml-hotspot-viewer.hs-style-diamond .hotspot:hover {
  transform: translate(-50%, -50%) rotate(45deg) scale(1.15);
  background: var(--hs-color-mid);
}
.wml-hotspot-viewer.hs-style-diamond .hotspot::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 30%,
    rgba(255,255,255,0.35) 50%,
    transparent 70%
  );
  background-size: 200% 200%;
  animation: wml-hs-diamond-shimmer 2.8s ease-in-out infinite;
}
.wml-hotspot-viewer.hs-style-diamond .hotspot::after {
  content: '';
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 1px;
  background: var(--hs-color);
}
/* Un-rotate the label for diamond so text stays upright */
.wml-hotspot-viewer.hs-style-diamond .hotspot .hotspot-label {
  transform: translateX(-50%) translateY(4px) rotate(-45deg);
}
.wml-hotspot-viewer.hs-style-diamond .hotspot:hover .hotspot-label {
  transform: translateX(-50%) translateY(0) rotate(-45deg);
}
@keyframes wml-hs-diamond-shimmer {
  0%   { background-position: 200% 200%; }
  100% { background-position: -200% -200%; }
}

/* ROOM SCENE */
.wml-hotspot-viewer .room-scene {
  position: absolute;
  inset: 0;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms cubic-bezier(0.77, 0, 0.175, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.wml-hotspot-viewer .room-scene.active {
  opacity: 1;
  pointer-events: auto;
}

.wml-hotspot-viewer .room-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.wml-hotspot-viewer .room-bg, 
.wml-hotspot-viewer .room-mid, 
.wml-hotspot-viewer .room-fg {
  position: absolute;
  inset: 0;
  transition: transform 1400ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.wml-hotspot-viewer .room-scene.active .room-bg  { transform: scale(1.05); }
.wml-hotspot-viewer .room-scene.active .room-mid { transform: scale(1.02); }
.wml-hotspot-viewer .room-scene.active .room-fg  { transform: scale(1.0);  }

/* Initial "entering" animation */
.wml-hotspot-viewer .room-scene .room-bg  { transform: scale(1.35); }
.wml-hotspot-viewer .room-scene .room-mid { transform: scale(1.25); }
.wml-hotspot-viewer .room-scene .room-fg  { transform: scale(1.15); }

.wml-hotspot-viewer .room-title {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%) translateY(30px);
  z-index: 30;
  font-size: clamp(22px, 3vw, 44px);
  letter-spacing: 8px;
  text-transform: uppercase;
  font-weight: 200;
  color: #f6e9c8;
  opacity: 0;
  transition: opacity 900ms ease 500ms, transform 900ms ease 500ms;
  text-shadow: 0 2px 20px rgba(0,0,0,0.7);
  text-align: center;
}

.wml-hotspot-viewer .room-scene.active .room-title {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.wml-hotspot-viewer .room-title small {
  display: block;
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(246,233,200,0.6);
  margin-top: 10px;
  font-weight: 300;
}

/* Dark overlay used for transitions */
.wml-hotspot-viewer .transition-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms ease;
}
.wml-hotspot-viewer .transition-overlay.show { opacity: 1; }

/* UI CHROME */
.wml-hotspot-viewer .brand {
  position: absolute;
  top: 28px; left: 32px;
  z-index: 60;
  font-size: 13px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: rgba(246,233,200,0.75);
  font-weight: 300;
}
.wml-hotspot-viewer .brand b { color: #f6e9c8; font-weight: 500; }

.wml-hotspot-viewer .hint {
  position: absolute;
  bottom: 28px; left: 32px;
  z-index: 60;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(246,233,200,0.55);
  font-weight: 300;
}

.wml-hotspot-viewer .reset-btn {
  position: absolute;
  top: 26px; right: 28px;
  z-index: 60;
  padding: 12px 22px;
  background: rgba(10,10,12,0.6);
  border: 1px solid rgba(246,233,200,0.25);
  color: #f6e9c8;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 400;
  cursor: pointer;
  border-radius: 2px;
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 400ms ease, transform 400ms ease, background 300ms ease;
}

.wml-hotspot-viewer .reset-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.wml-hotspot-viewer .reset-btn:hover {
  background: rgba(246,233,200,0.15);
  border-color: rgba(246,233,200,0.5);
}

.wml-hotspot-viewer .reset-btn::before {
  content: '←';
  margin-right: 10px;
  display: inline-block;
  transition: transform 300ms ease;
}
.wml-hotspot-viewer .reset-btn:hover::before { transform: translateX(-4px); }

/* RESPONSIVE */
@media (max-width: 700px) {
  .wml-hotspot-viewer .brand { top: 18px; left: 18px; font-size: 11px; letter-spacing: 4px; }
  .wml-hotspot-viewer .hint  { display: none; }
  .wml-hotspot-viewer .reset-btn { top: 16px; right: 16px; padding: 10px 16px; font-size: 10px; }
  .wml-hotspot-viewer .hotspot .hotspot-label { font-size: 10px; letter-spacing: 1px; }
}
