/* ============================================================
   Image Hotspots für WPBakery – Frontend Styles
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.ihw-wrap {
    width: 100%;
    display: block;
}

.ihw-img-wrap {
    position: relative !important; /* Muss gesetzt sein, damit absolute Hotspots korrekt positioniert werden */
    display: block;
    line-height: 0; /* kein Lückenabstand unter dem Bild */
}

/* ── Basisbild ───────────────────────────────────────────── */
.ihw-img-base {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Hotspot-Link ────────────────────────────────────────── */
.ihw-spot {
    position: absolute;
    display: block;
    box-sizing: border-box;
    text-decoration: none;
    /* Standard: unsichtbar, aber klickbar */
    background: transparent;
    border: 2px solid transparent;
    transition: background 0.2s, border-color 0.2s;
}

.ihw-spot:hover,
.ihw-spot:focus {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

/* ── Bereiche sichtbar machen (Option "show_hotspots") ────── */
.ihw-show-areas .ihw-spot {
    border-color: rgba(0, 115, 170, 0.6);
    background: rgba(0, 115, 170, 0.08);
}

.ihw-show-areas .ihw-spot:hover {
    background: rgba(0, 115, 170, 0.22);
}

/* ── Tooltip ─────────────────────────────────────────────── */
.ihw-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.82);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Pfeil */
.ihw-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.82);
}

.ihw-spot:hover .ihw-tooltip,
.ihw-spot:focus .ihw-tooltip {
    display: block;
}

/* Tooltip bleibt im Viewport (JS kann bei Bedarf Klassen setzen) */
.ihw-spot.ihw-tooltip-left .ihw-tooltip {
    left: auto;
    right: 0;
    transform: none;
}
.ihw-spot.ihw-tooltip-left .ihw-tooltip::after {
    left: auto;
    right: 10px;
    transform: none;
}

.ihw-spot.ihw-tooltip-right .ihw-tooltip {
    left: 0;
    transform: none;
}
.ihw-spot.ihw-tooltip-right .ihw-tooltip::after {
    left: 10px;
    transform: none;
}

/* Tooltip unterhalb (wenn Hotspot oben am Rand) */
.ihw-spot.ihw-tooltip-below .ihw-tooltip {
    bottom: auto;
    top: calc(100% + 8px);
}
.ihw-spot.ihw-tooltip-below .ihw-tooltip::after {
    bottom: 100%;
    top: a