/* =========================
   FRONTEND WRAPPER
========================= */
.iiw-frontend {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* =========================
   IMAGE WRAPPER
========================= */
.iiw-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

/* Image */
.iiw-image-inner img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    pointer-events: none;
}

/* =========================
   HOTSPOT LAYER (CHEIA!)
========================= */
.iiw-hotspot-layer {
    position: absolute;
    inset: 0; /* EXACT peste imagine */
    pointer-events: none;
    transform: none !important;
}

/* =========================
   HOTSPOT
========================= */
.iiw-hotspot {
    background-color: transparent;
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1) !important;
    cursor: pointer;
    pointer-events: auto;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}



/* ICON */
.iiw-hotspot-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    line-height: 0;
}

.iiw-hotspot-icon svg {
    display: block;
}

/* =========================
   PULSE EFFECT
========================= */
.iiw-hotspot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    z-index: -1;

    animation: iiw-pulse 1.8s ease-in-out infinite;
    box-shadow: 0 0 0 0 currentColor;
}

@keyframes iiw-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 currentColor;
        opacity: 0.7;
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 25px transparent;
        opacity: 0;
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 transparent;
        opacity: 0;
    }
}

/* =========================
   POPOVER (BASE)
========================= */
.iiw-popover {
    position: absolute;
    z-index: 999;
    width: 160px;

    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);

    opacity: 0;
    pointer-events: none;

    transition:
        opacity .18s ease,
        transform .18s ease;
    transform-origin: center;
}

#iiw-image-canvas .iiw-popover {
    position: absolute;
    width: 150px;
    z-index: 20;
    pointer-events: auto; 
    background-color: #fff;
}

/* ACTIVE */
.iiw-popover.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* =========================
   POSITION-BASED ANIMATION
========================= */
.iiw-popover--top {
    transform: translateY(6px) scale(.96);
}
.iiw-popover--top.is-active {
    transform: translateY(0) scale(1);
}

.iiw-popover--bottom {
    transform: translateY(-6px) scale(.96);
}
.iiw-popover--bottom.is-active {
    transform: translateY(0) scale(1);
}

.iiw-popover--left {
    transform: translateX(6px) scale(.96);
}
.iiw-popover--left.is-active {
    transform: translateX(0) scale(1);
}

.iiw-popover--right {
    transform: translateX(-6px) scale(.96);
}
.iiw-popover--right.is-active {
    transform: translateX(0) scale(1);
}

.iiw-popover {
    transform-origin: center;
}
.iiw-popover--top {
    transform-origin: bottom center;
}
.iiw-popover--bottom {
    transform-origin: top center;
}
.iiw-popover--left {
    transform-origin: center right;
}
.iiw-popover--right {
    transform-origin: center left;
}


/* =========================
   CONTENT
========================= */
.iiw-popover-content {
    overflow: hidden;
}

.iiw-popover-image img {
    width: 100%;
    display: block;
}

.iiw-popover-body {
    padding: 16px;
}

.iiw-popover-title {
    font-size: 14px;
    line-height: 1.2;
    margin: 0 0 10px 0;
    text-align: center;
    font-weight: 600!important;
}

.iiw-popover-button {
    display: inline-block;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}



.iiw-popover-body {
    padding: 16px;
    text-align: center;

    display: flex;
    flex-direction: column;
    align-items: center; 
}

.iiw-hotspot-icon {
    position: absolute;
    top: 50%;
    left: calc(50% + 4px);
    transform: translate(-50%, -50%);
}