/* Image Hotspot — live demo styles (mirrors the Divi module's output) */

.demo-frame.has-hotspots { overflow: visible; }
/* Closed side tooltips sit off-canvas; clip them so the page never scrolls sideways. */
.section:has(.ihs) { overflow-x: clip; }
.demo-frame.has-hotspots .demo-bar { border-radius: 22px 22px 0 0; }
.demo-frame.has-hotspots .demo-controls { border-radius: 0 0 22px 22px; }

.ihs { position: relative; }
.ihs-media { border-radius: 0; overflow: hidden; }
.ihs-media svg { width: 100%; height: auto; display: block; }

.ihs-spot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  z-index: 2;
}
.ihs-spot.is-open { z-index: 6; }

.ihs-marker {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--brand, #6d3cf0);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 6px 16px -4px rgba(20, 10, 60, .55);
  transition: transform .2s ease, background-color .2s ease;
}
.ihs-marker:hover, .ihs-spot.is-open .ihs-marker { transform: scale(1.1); }
.ihs-marker svg { width: 18px; height: 18px; transition: transform .25s ease; }
.ihs-spot.is-open .ihs-marker.is-plus svg { transform: rotate(45deg); }
.ihs-marker.is-dark { background: #0e0b2e; }
.ihs-marker.is-green { background: #0fb98a; }
.ihs-marker.is-orange { background: #ff7a1a; }
.ihs-marker.is-image { width: 48px; height: 48px; background: #fff; overflow: hidden; }
.ihs-marker.is-image svg { width: 100%; height: 100%; }

.ihs[data-pulse="true"] .ihs-marker::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: currentColor;
  color: rgba(109, 60, 240, .55);
  animation: ihs-pulse 2s ease-out infinite;
  z-index: -1;
}
.ihs[data-pulse="true"] .ihs-marker.is-green::before { color: rgba(15, 185, 138, .55); }
.ihs[data-pulse="true"] .ihs-marker.is-orange::before { color: rgba(255, 122, 26, .55); }
.ihs[data-pulse="true"] .ihs-marker.is-dark::before,
.ihs[data-pulse="true"] .ihs-marker.is-image::before { color: rgba(255, 255, 255, .7); }

@keyframes ihs-pulse {
  0% { transform: scale(1); opacity: .9; }
  100% { transform: scale(2.1); opacity: 0; }
}

/* Tooltip */
.ihs-tip {
  --off: 0px;
  --shift: 0px;
  position: absolute;
  width: min(270px, 78vw);
  background: #fff;
  color: #1d1b3a;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 24px 50px -16px rgba(20, 10, 60, .45), 0 0 0 1px rgba(20, 10, 60, .06);
  text-align: center;
  font-size: .92rem;
  line-height: 1.55;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease, scale .25s ease, translate .25s ease, visibility 0s linear .25s;
}
.ihs-spot.is-open .ihs-tip {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.ihs-tip::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  transform: rotate(45deg);
}
.ihs[data-arrow="false"] .ihs-tip::after { display: none; }

.ihs-spot[data-place="top"] .ihs-tip { bottom: calc(100% + 16px); left: 50%; translate: calc(-50% + var(--shift)) var(--off); }
.ihs-spot[data-place="bottom"] .ihs-tip { top: calc(100% + 16px); left: 50%; translate: calc(-50% + var(--shift)) calc(var(--off) * -1); }
.ihs-spot[data-place="left"] .ihs-tip { right: calc(100% + 16px); top: 50%; translate: var(--off) -50%; }
.ihs-spot[data-place="right"] .ihs-tip { left: calc(100% + 16px); top: 50%; translate: calc(var(--off) * -1) -50%; }

.ihs-spot[data-place="top"] .ihs-tip::after { top: 100%; left: calc(50% - var(--shift)); margin: -7px 0 0 -7px; }
.ihs-spot[data-place="bottom"] .ihs-tip::after { bottom: 100%; left: calc(50% - var(--shift)); margin: 0 0 -7px -7px; }
.ihs-spot[data-place="left"] .ihs-tip::after { left: 100%; top: 50%; margin: -7px 0 0 -7px; }
.ihs-spot[data-place="right"] .ihs-tip::after { right: 100%; top: 50%; margin: -7px -7px 0 0; }

/* Animations */
.ihs[data-animation="zoom"] .ihs-tip { scale: .85; }
.ihs[data-animation="slide"] .ihs-tip { --off: 12px; }
.ihs[data-animation] .ihs-spot.is-open .ihs-tip { scale: 1; --off: 0px; }

/* Tooltip content */
.ihs-tip-media { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: #f3f0ff; color: #6d3cf0; }
.ihs-tip-media svg { width: 34px; height: 34px; }
.ihs-tip-media.is-photo svg { width: 100%; height: 100%; }
.ihs-tip h4 { margin: 0; font-size: 1.15rem; color: #0e0b2e; }
.ihs-tip .ihs-sub { margin: 2px 0 8px; font-weight: 700; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: #6d3cf0; }
.ihs-tip p { margin: 0 0 12px; color: #55537a; }
.ihs-tip .ihs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #0e0b2e;
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  text-decoration: none;
}
.ihs-tip .ihs-btn:hover { background: #6d3cf0; color: #fff; }
.ihs-tip .ihs-btn svg { width: 14px; height: 14px; }
