/* ═══════════════════════════════════════════════════════
   Mute Hotspots — Frontend CSS
   ═══════════════════════════════════════════════════════ */

/* ── RESET ─────────────────────────────────────────── */
.mh-wrap *,
.mh-wrap *::before,
.mh-wrap *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── WRAPPER ───────────────────────────────────────── */
.mh-wrap {
  position: relative;
  display: block;
  width: 100%;
  height: 560px;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

/* ── IMAGE ─────────────────────────────────────────── */
.mh-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

/* ── HOTSPOT container ─────────────────────────────── */
.mh-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 10;
}

/* ── PIN ───────────────────────────────────────────── */
.mh-pin {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #C4501A;
  color: #fff;
  border: none;
  cursor: pointer;
  outline: none;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  transition: background 0.25s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.mh-pin:hover,
.mh-hotspot.is-open .mh-pin {
  background: #E8A835;
  transform: scale(1.12);
}
.mh-pin-icon {
  display: block;
  line-height: 1;
  font-style: normal;
  pointer-events: none;
  transition: transform 0.25s ease;
}
.mh-hotspot.is-open .mh-pin-icon {
  transform: rotate(45deg); /* + becomes × */
}
.mh-pin-label {
  font-size: 10px;
  letter-spacing: 0.04em;
  font-weight: 700;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
}

/* ── PULSE animation ───────────────────────────────── */
.mh-pulse .mh-pin::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(196, 80, 26, 0.35);
  animation: mh-pulse 2s ease-out infinite;
}
.mh-hotspot.is-open .mh-pin::before,
.mh-pin:hover::before {
  animation: none;
  opacity: 0;
}
@keyframes mh-pulse {
  0%   { transform: scale(0.85); opacity: 1; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(0.85); opacity: 0; }
}

/* ── TOOLTIP ───────────────────────────────────────── */
.mh-tooltip {
  position: absolute;
  z-index: 100;
  width: 240px;
  background: #fff;
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  transform: translateY(6px) scale(0.97);
  transform-origin: bottom center;
}
.mh-hotspot.is-open .mh-tooltip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* ── TOOLTIP positions ─────────────────────────────── */

/* top (default) */
.mh-tooltip[data-pos="top"] {
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.97);
  transform-origin: bottom center;
}
.mh-hotspot.is-open .mh-tooltip[data-pos="top"] {
  transform: translateX(-50%) translateY(0) scale(1);
}

/* bottom */
.mh-tooltip[data-pos="bottom"] {
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px) scale(0.97);
  transform-origin: top center;
}
.mh-hotspot.is-open .mh-tooltip[data-pos="bottom"] {
  transform: translateX(-50%) translateY(0) scale(1);
}

/* left */
.mh-tooltip[data-pos="left"] {
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px) scale(0.97);
  transform-origin: right center;
}
.mh-hotspot.is-open .mh-tooltip[data-pos="left"] {
  transform: translateY(-50%) translateX(0) scale(1);
}

/* right */
.mh-tooltip[data-pos="right"] {
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px) scale(0.97);
  transform-origin: left center;
}
.mh-hotspot.is-open .mh-tooltip[data-pos="right"] {
  transform: translateY(-50%) translateX(0) scale(1);
}

/* ── ARROW ─────────────────────────────────────────── */
.mh-tooltip-arrow {
  position: absolute;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: rotate(45deg);
}
.mh-tooltip[data-pos="top"]    .mh-tooltip-arrow {
  bottom: -5px; left: 50%; margin-left: -5px;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.06);
}
.mh-tooltip[data-pos="bottom"] .mh-tooltip-arrow {
  top: -5px; left: 50%; margin-left: -5px;
  box-shadow: -2px -2px 4px rgba(0,0,0,0.06);
}
.mh-tooltip[data-pos="left"]   .mh-tooltip-arrow {
  right: -5px; top: 50%; margin-top: -5px;
  box-shadow: 2px -2px 4px rgba(0,0,0,0.06);
}
.mh-tooltip[data-pos="right"]  .mh-tooltip-arrow {
  left: -5px; top: 50%; margin-top: -5px;
  box-shadow: -2px 2px 4px rgba(0,0,0,0.06);
}

/* ── TOOLTIP content ───────────────────────────────── */
.mh-tooltip-title {
  font-size: 14px;
  font-weight: 700;
  color: #0d1117;
  margin-bottom: 6px;
  line-height: 1.3;
}
.mh-tooltip-text {
  font-size: 13px;
  color: #1a1a1a;
  line-height: 1.55;
  margin-bottom: 12px;
}
.mh-tooltip-text:last-child { margin-bottom: 0; }

.mh-tooltip-btn {
  display: inline-block;
  background: #C4501A;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  margin-top: 4px;
  transition: background 0.2s ease;
  line-height: 1;
}
.mh-tooltip-btn:hover {
  background: #E8A835;
  color: #fff;
  text-decoration: none;
}

/* ── Editor: tooltips always visible when panel open ── */
.elementor-editor-active .mh-tooltip {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateX(-50%) translateY(0) scale(1) !important;
}
.elementor-editor-active .mh-tooltip[data-pos="left"],
.elementor-editor-active .mh-tooltip[data-pos="right"] {
  transform: translateY(-50%) translateX(0) scale(1) !important;
}
.elementor-editor-active .mh-tooltip[data-pos="bottom"] {
  transform: translateX(-50%) translateY(0) scale(1) !important;
}

/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 767px) {
  .mh-tooltip {
    width: 180px;
  }
  /* On mobile, always show tooltip above the pin */
  .mh-tooltip[data-pos="left"],
  .mh-tooltip[data-pos="right"] {
    left: 50%;
    right: auto;
    top: auto;
    bottom: calc(100% + 12px);
    transform: translateX(-50%) translateY(6px) scale(0.97);
    transform-origin: bottom center;
  }
  .mh-hotspot.is-open .mh-tooltip[data-pos="left"],
  .mh-hotspot.is-open .mh-tooltip[data-pos="right"] {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  .mh-tooltip[data-pos="left"]  .mh-tooltip-arrow,
  .mh-tooltip[data-pos="right"] .mh-tooltip-arrow {
    bottom: -5px; left: 50%; margin-left: -5px;
    right: auto; top: auto; margin-top: 0;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.06);
  }
}
