.unlockafe-image-hotspot-wrapper {
  position: relative;
  width: 100%;
}

.unlockafe-image-hotspot-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

.unlockafe-image-hotspot-container img {
  width: 100%;
  height: auto;
  display: block;
}

.unlockafe-hotspot {
  position: absolute;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 1;
}

.unlockafe-hotspot-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: #4054b2;
  color: white;
  border-radius: 50%;
  font-size: 16px;
  transition: all 0.3s ease;
  animation: unlockafe-pulse 1.5s infinite;
  background: var(--hotspot-bg, #4054b2);
  color: var(--hotspot-icon, #fff);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

.unlockafe-hotspot-icon i,
.unlockafe-hotspot-icon svg {
  width: 1em;
  height: 1em;
  position: relative;
  display: block;
}

.unlockafe-hotspot:hover .unlockafe-hotspot-icon {
  background-color: #2f3b89;
  transform: scale(1.1);
  background: var(--hotspot-bg-hover, #2f3b89);
}

/* Tooltip base styles */
.unlockafe-hotspot-tooltip {
  position: absolute;
  min-width: 120px;
  max-width: 260px;
  background: #222;
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 15px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 1.5px 6px rgba(0,0,0,0.10);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.35s cubic-bezier(.4,0,.2,1), transform 0.35s cubic-bezier(.4,0,.2,1);
  word-break: break-word;
  line-height: 1.5;
  font-family: inherit;
  display: block;
  visibility: hidden;
}

.unlockafe-hotspot.open .unlockafe-hotspot-tooltip,
.unlockafe-hotspot:hover .unlockafe-hotspot-tooltip {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
  display: block !important;
  visibility: visible !important;
}

/* Tooltip arrow base */
.unlockafe-hotspot-tooltip::after {
  content: '';
  position: absolute;
  width: 0; height: 0;
  border-style: solid;
}

/* Arrow for top */
.unlockafe-hotspot-tooltip[data-pos="top"]::after {
  bottom: -10px; left: 50%; transform: translateX(-50%);
  border-width: 10px 10px 0 10px;
  border-color: #222 transparent transparent transparent;
}

/* Arrow for right */
.unlockafe-hotspot-tooltip[data-pos="right"]::after {
  left: -10px; top: 50%; transform: translateY(-50%);
  border-width: 10px 10px 10px 0;
  border-color: transparent #222 transparent transparent;
}

/* Arrow for bottom */
.unlockafe-hotspot-tooltip[data-pos="bottom"]::after {
  top: -10px; left: 50%; transform: translateX(-50%);
  border-width: 0 10px 10px 10px;
  border-color: transparent transparent #222 transparent;
}

/* Arrow for left */
.unlockafe-hotspot-tooltip[data-pos="left"]::after {
  right: -10px; top: 50%; transform: translateY(-50%);
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent #222;
}

/* Tooltip positioning */
.unlockafe-hotspot-tooltip[data-pos="top"] {
  bottom: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
}

.unlockafe-hotspot-tooltip[data-pos="right"] {
  left: calc(100% + 15px);
  top: 50%;
  transform: translateY(-50%) translateX(-10px);
}

.unlockafe-hotspot-tooltip[data-pos="bottom"] {
  top: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
}

.unlockafe-hotspot-tooltip[data-pos="left"] {
  right: calc(100% + 15px);
  top: 50%;
  transform: translateY(-50%) translateX(10px);
}

.unlockafe-hotspot.open .unlockafe-hotspot-tooltip[data-pos="top"],
.unlockafe-hotspot:hover .unlockafe-hotspot-tooltip[data-pos="top"] {
  transform: translateX(-50%) translateY(0) !important;
}

.unlockafe-hotspot.open .unlockafe-hotspot-tooltip[data-pos="right"],
.unlockafe-hotspot:hover .unlockafe-hotspot-tooltip[data-pos="right"] {
  transform: translateY(-50%) translateX(0) !important;
}

.unlockafe-hotspot.open .unlockafe-hotspot-tooltip[data-pos="bottom"],
.unlockafe-hotspot:hover .unlockafe-hotspot-tooltip[data-pos="bottom"] {
  transform: translateX(-50%) translateY(0) !important;
}

.unlockafe-hotspot.open .unlockafe-hotspot-tooltip[data-pos="left"],
.unlockafe-hotspot:hover .unlockafe-hotspot-tooltip[data-pos="left"] {
  transform: translateY(-50%) translateX(0) !important;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .unlockafe-hotspot-tooltip {
    font-size: 13px;
    min-width: 90px;
    max-width: 90vw;
    padding: 10px 8px;
  }
}

/* Mobile Styles */
@media (max-width: 767px) {
  .unlockafe-hotspot {
    width: 24px;
    height: 24px;
  }

  .unlockafe-hotspot-tooltip {
    width: 160px;
    padding: 10px;
  }

  .unlockafe-hotspot-icon {
    font-size: 12px;
  }
}

/* Pulse animation */
@keyframes unlockafe-pulse {
  0% { box-shadow: 0 0 0 0 rgba(64,84,178,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(64,84,178,0); }
  100% { box-shadow: 0 0 0 0 rgba(64,84,178,0); }
}