/**
 * Visum Image Mapper — Effects CSS
 * Stili per spotlight, zoom, parallax, reveal, ripple, magnetic, trail
 */

/* ── Canvas overlay generici ─────────────────────────────────────────────── */

.vim-fx-spotlight-canvas,
.vim-fx-reveal-canvas,
.vim-fx-trail-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ── Ripple ───────────────────────────────────────────────────────────────── */

@keyframes vim-ripple-anim {
    0%   { transform: translate(-50%, -50%) scale(1);   opacity: .8; }
    100% { transform: translate(-50%, -50%) scale(3.5); opacity: 0;  }
}

.vim-ripple {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
}

/* ── Zoom — cursore pointer sull'immagine quando zoom attivo ─────────────── */

.vim-map-wrap.vim-zoom-active .vim-image-container {
    cursor: zoom-in;
}

/* ── Parallax — overflow nascosto per non mostrare bordi ─────────────────── */

.vim-map-wrap.vim-has-parallax .vim-image-container {
    overflow: hidden;
}

.vim-map-wrap.vim-has-parallax .vim-base-image {
    transform: scale(1.04);
    will-change: transform;
}

/* ── Reveal — immagine originale visibile sotto il canvas ────────────────── */

.vim-map-wrap.vim-has-reveal .vim-image-container {
    overflow: hidden;
}

/* ── Spotlight — transizione morbida ────────────────────────────────────── */

.vim-fx-spotlight-canvas {
    transition: opacity .4s ease;
}

/* ── Marker active state con effetti ─────────────────────────────────────── */

.vim-marker.vim-marker-active {
    box-shadow: 0 0 0 4px rgba(var(--vim-marker-bg-rgb, 109, 40, 217), .3),
                0 4px 20px rgba(0,0,0,.35);
}

/* ── Magnetic — usa CSS vars per non sovrascrivere il translate base ─────── */

.vim-marker.vim-magnetic-active {
    transform: translate(calc(-50% + var(--vim-mag-x, 0px)), calc(-50% + var(--vim-mag-y, 0px)));
    transition: transform .1s ease !important;
}

/* Pin style magnetic */
.vim-marker-style-pin.vim-magnetic-active {
    transform: translate(calc(-50% + var(--vim-mag-x, 0px)), calc(-100% + var(--vim-mag-y, 0px))) rotate(-45deg);
}

.vim-map-wrap.vim-has-trail .vim-image-container {
    cursor: none;
}
