/**
 * Frontend Hero Hotspot Styles
 * Smaller dots with pulse/rotate, transparent tooltips, tighter wrapping
 */

/* Hotspot dots - original size with pulse animation only */
#sbv2-hero-hotspots-container .group {
  position: absolute;
  z-index: 10;
}

#sbv2-hero-hotspots-container .group > div:first-child {
  position: relative;
  width: 16px; /* Original size (w-4 = 16px) */
  height: 16px;
  margin-left: -8px;
  margin-top: -8px;
}

#sbv2-hero-hotspots-container .group .relative.w-4 {
  width: 16px !important;
  height: 16px !important;
  margin-left: -8px !important;
  margin-top: -8px !important;
}

#sbv2-hero-hotspots-container .group .relative.w-4 > div {
  width: 16px !important;
  height: 16px !important;
  animation: hotspotPulseFrontend 2s infinite;
  border-width: 2px !important;
}

#sbv2-hero-hotspots-container .group:hover .relative.w-4 > div {
  animation: hotspotPulseFrontend 1s infinite;
}

/* Pulse animation only - no ping/double shade */
@keyframes hotspotPulseFrontend {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.85;
  }
}

/* Tooltip - 25% transparent white background (75% opacity), keep inside screen - compact size */
#sbv2-hero-hotspots-container .group > div.absolute.bg-white {
  background-color: rgba(255, 255, 255, 0.75) !important;
  background: rgba(255, 255, 255, 0.75) !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 20;
  max-width: 200px !important;
  max-height: calc(100vh - 2rem) !important;
  overflow: hidden !important;
  word-wrap: break-word !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  border-radius: 6px !important;
}

/* Compact tooltip text */
#sbv2-hero-hotspots-container .group > div.absolute.bg-white p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
}

#sbv2-hero-hotspots-container .group > div.absolute.bg-white p.font-medium {
  font-size: 12px !important;
  font-weight: 600 !important;
}

#sbv2-hero-hotspots-container .group > div.absolute.bg-white p.text-xs {
  font-size: 11px !important;
  margin-top: 2px !important;
  line-height: 1.2 !important;
}

/* Thumbnails fade transition on small screens */
@media (max-width: 1023px) {
  #sbv2-hero-thumbs-mobile {
    transition: opacity 0.4s ease, visibility 0.4s ease !important;
  }
}

/* Tooltip arrow - match 25% transparent white background - smaller size */
#sbv2-hero-hotspots-container .group > div.absolute.bg-white > div.absolute {
  border-right-color: rgba(255, 255, 255, 0.75) !important;
  border-left-color: rgba(255, 255, 255, 0.75) !important;
  border-top-width: 6px !important;
  border-bottom-width: 6px !important;
  border-right-width: 6px !important;
  border-left-width: 6px !important;
}

#sbv2-hero-hotspots-container .group:hover > div.absolute.bg-white,
#sbv2-hero-hotspots-container .group:focus > div.absolute.bg-white {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Show tooltip on hover/click */
#sbv2-hero-hotspots-container .group:hover > div.absolute.bg-white,
#sbv2-hero-hotspots-container .group:focus > div.absolute.bg-white,
#sbv2-hero-hotspots-container .group.active > div.absolute.bg-white {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(0) !important;
}

/* Delete button on frontend hotspots (optional - for future use) */
#sbv2-hero-hotspots-container .group .sbv2-hotspot-delete {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 18px;
  height: 18px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: none;
  z-index: 20;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#sbv2-hero-hotspots-container .group:hover .sbv2-hotspot-delete {
  display: flex;
  align-items: center;
  justify-content: center;
}
