/* ==========================================================================
   EPP Hotspot Widget
   ========================================================================== */

.epp-hotspot-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
    line-height: 0;
}

.epp-hotspot-img {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Pin anchor point ── */
.epp-hotspot-point {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* ── Pin button ── */
.epp-hotspot-pin {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #1d4ed8;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform .2s ease, box-shadow .2s ease;
    z-index: 1;
}

.epp-hotspot-pin:hover,
.epp-hotspot-pin[aria-expanded="true"] {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

.epp-hotspot-pin i   { font-size: 14px; color: #fff; line-height: 1; }
.epp-hotspot-pin svg { width: 14px; height: 14px; fill: #fff; }

/* ── Pulse ring ── */
.epp-hotspot-pin--pulse::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background-color: inherit;
    opacity: 0.35;
    animation: epp-hs-pulse 2s ease-out infinite;
    pointer-events: none;
}

@keyframes epp-hs-pulse {
    0%   { transform: scale(1);   opacity: 0.35; }
    70%  { transform: scale(1.8); opacity: 0; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* ── Tooltip ── */
.epp-hotspot-tooltip {
    position: absolute;
    width: 220px;
    background-color: #1f2937;
    border-radius: 6px;
    padding: 12px 16px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 20;
    line-height: 1;
}

/* Arrow */
.epp-hotspot-tooltip::after {
    content: '';
    position: absolute;
    border: 7px solid transparent;
}

/* Position: top */
.epp-hotspot-tooltip[data-pos="top"] {
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
}
.epp-hotspot-tooltip[data-pos="top"]::after {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #1f2937;
}

/* Position: bottom */
.epp-hotspot-tooltip[data-pos="bottom"] {
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
}
.epp-hotspot-tooltip[data-pos="bottom"]::after {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: #1f2937;
}

/* Position: left */
.epp-hotspot-tooltip[data-pos="left"] {
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
}
.epp-hotspot-tooltip[data-pos="left"]::after {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: #1f2937;
}

/* Position: right */
.epp-hotspot-tooltip[data-pos="right"] {
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
}
.epp-hotspot-tooltip[data-pos="right"]::after {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: #1f2937;
}

/* Visible state */
.epp-hotspot-point.epp-hs-active .epp-hotspot-tooltip,
.epp-hotspot-point:hover .epp-hotspot-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.epp-hotspot-point.epp-hs-active .epp-hotspot-tooltip[data-pos="top"],
.epp-hotspot-point:hover .epp-hotspot-tooltip[data-pos="top"] {
    transform: translateX(-50%) translateY(0);
}
.epp-hotspot-point.epp-hs-active .epp-hotspot-tooltip[data-pos="bottom"],
.epp-hotspot-point:hover .epp-hotspot-tooltip[data-pos="bottom"] {
    transform: translateX(-50%) translateY(0);
}
.epp-hotspot-point.epp-hs-active .epp-hotspot-tooltip[data-pos="left"],
.epp-hotspot-point:hover .epp-hotspot-tooltip[data-pos="left"] {
    transform: translateY(-50%) translateX(0);
}
.epp-hotspot-point.epp-hs-active .epp-hotspot-tooltip[data-pos="right"],
.epp-hotspot-point:hover .epp-hotspot-tooltip[data-pos="right"] {
    transform: translateY(-50%) translateX(0);
}

/* Click-mode: disable hover CSS, rely on JS class only */
.epp-hotspot-wrap[data-trigger="click"] .epp-hotspot-point:hover .epp-hotspot-tooltip {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.epp-hotspot-wrap[data-trigger="click"] .epp-hotspot-point.epp-hs-active .epp-hotspot-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ── Tooltip text ── */
.epp-hotspot-tooltip__title {
    margin: 0 0 4px;
    font-weight: 700;
    font-size: 0.875rem;
    color: #fff;
    line-height: 1.3;
}

.epp-hotspot-tooltip__desc {
    margin: 0 0 8px;
    font-size: 0.8rem;
    color: rgba(255,255,255,.8);
    line-height: 1.5;
}

.epp-hotspot-tooltip__desc:last-child,
.epp-hotspot-tooltip__title:last-child {
    margin-bottom: 0;
}

.epp-hotspot-tooltip__link {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #93c5fd;
    text-decoration: none;
    margin-top: 4px;
}

.epp-hotspot-tooltip__link:hover {
    text-decoration: underline;
}
