/* ==========================================
   WEBVERSE OVERLAY & BUTTON STYLES
   ========================================== */
/* Ensure the SVG container allows pointer events on mobile */
#svgOverlay {
  pointer-events: auto !important;
}
#svgOverlay svg {
  pointer-events: auto !important;
}
/* Vector Elements Default State */
#svgOverlay svg polygon,
#svgOverlay svg polyline,
#svgOverlay svg path,
#svgOverlay svg circle,
#svgOverlay svg rect,
#svgOverlay svg g {
  pointer-events: auto !important;
  cursor: pointer !important;
  vector-effect: non-scaling-stroke !important;
  transition: fill 0.25s ease, stroke 0.25s ease, filter 0.25s ease, opacity 0.25s ease !important;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
/* Invisible Hit Area */
#svgOverlay svg polygon,
#svgOverlay svg polyline,
#svgOverlay svg path,
#svgOverlay svg rect,
.hotspot-area {
  fill: rgba(0, 0, 0, 0.001) !important;
  stroke: transparent !important;
  stroke-width: 0px !important;
  filter: none !important;
}
/* SVG Labels Hidden Default */
#svgOverlay svg text,
#svgOverlay svg .hover-label,
#svgOverlay svg .floor-label,
#svgOverlay svg .villa-label {
  opacity: 0 !important;
  fill: #ffffff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  font-family: 'Montserrat', sans-serif !important;
  text-anchor: middle !important;
  pointer-events: none !important;
  transition: opacity 0.25s ease, transform 0.25s ease !important;
  transform: translateY(4px);
}
/* SVG Hover Effects (Thicker stroke line) */
#svgOverlay svg polygon:hover,
#svgOverlay svg polyline:hover,
#svgOverlay svg path:hover,
#svgOverlay svg rect:hover,
#svgOverlay svg g:hover > polygon,
#svgOverlay svg g:hover > polyline,
#svgOverlay svg g:hover > path,
#svgOverlay svg g:hover > rect,
.hotspot-area:hover {
  fill: rgba(82, 222, 240, 0.3) !important;
  stroke: #52def0 !important;
  stroke-width: 3.5px !important; /* Increased stroke visibility */
  stroke-linejoin: round;
  filter: drop-shadow(0px 0px 12px rgba(82, 222, 240, 0.9)) !important;
}
#svgOverlay svg g:hover text,
#svgOverlay svg g:hover .hover-label,
#svgOverlay svg g:hover .floor-label,
#svgOverlay svg g:hover .villa-label {
  opacity: 1 !important;
  transform: translateY(0px);
}
/* Selection Mode active overlay styles */
#svgOverlay.selection-mode svg polygon,
#svgOverlay.selection-mode svg path,
#svgOverlay.selection-mode svg rect,
#svgOverlay.selection-mode svg polyline,
#svgOverlay.selection-mode svg circle {
  fill: rgba(82, 222, 240, 0.22) !important;
  stroke: #52def0 !important;
  stroke-width: 3px !important; /* Thicker line size */
  filter: drop-shadow(0 0 12px rgba(82, 222, 240, 0.9));
}
/* Active Button State Styles */
.view-btn.active {
  background: rgba(82, 222, 240, 0.25) !important;
  border-color: #52def0 !important;
  box-shadow: 0 0 0 2px rgba(82, 222, 240, 0.5),
              0 0 20px rgba(82, 222, 240, 0.6),
              0 0 40px rgba(82, 222, 240, 0.3);
  transform: translateY(-2px);
}
.view-btn.active i {
  color: #52def0 !important;
}
/* Eye-Catching Apartment Guidance Pulse Animation */
.apartment-attention {
  position: relative;
  border-color: #52def0 !important;
  box-shadow: 0 0 15px rgba(82, 222, 240, 0.8) !important;
  animation: apartmentRadarPulse 1.5s infinite ease-in-out;
}
.apartment-attention::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 2px solid #52def0;
  opacity: 0;
  animation: radarRing 1.5s infinite ease-out;
}
@keyframes apartmentRadarPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 12px rgba(82, 222, 240, 0.6);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 0 24px rgba(82, 222, 240, 0.95);
  }
}
@keyframes radarRing {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}
/* Selection Mode Toggle Active State */
.select-active {
  border: 2px solid #52def0 !important;
  box-shadow: 0 0 0 2px rgba(82, 222, 240, 0.4),
              0 0 20px rgba(82, 222, 240, 0.7);
  animation: selectPulse 1.3s infinite;
}
@keyframes selectPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ==========================================
   NAME LABEL VISIBILITY TOGGLE (Eye button)
   ========================================== */
/* When the overlay carries this class, every generated name label/chip is
   hidden. This is toggled by the eye button in the bottom panel and is
   independent of hover/selection-mode styling above. */
#svgOverlay.labels-hidden .site-label-group {
  display: none !important;
}
/* Eye button active/inactive visual state (mirrors .select-active look) */
#eyeBtn.eye-active {
  background: rgba(82, 222, 240, 0.18) !important;
  border-color: rgba(82, 222, 240, 0.55) !important;
}
#eyeBtn.eye-active i {
  color: #52def0 !important;
}
#eyeBtn.eye-off i::before {
  /* swapped to fa-eye-slash via JS class toggle on the <i> element */
}