/* Souper Hotspot — Frontend Styles v1.3.0 */

/* ── Wrapper ─────────────────────────────────────────────── */
.souper-hs-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    display: block;
    border-radius: 4px;
}

.souper-hs-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Hotspot marker base ─────────────────────────────────── */
.souper-hs-hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 10;
    cursor: pointer;
    outline: none;
}

.souper-hs-marker-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--marker-color, #ff6b35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 2;
}

.souper-hs-hotspot:hover .souper-hs-marker-dot,
.souper-hs-hotspot:focus-visible .souper-hs-marker-dot,
.souper-hs-hotspot.active .souper-hs-marker-dot {
    transform: scale(1.15);
    box-shadow: 0 4px 18px rgba(0,0,0,0.4);
}

/* Focus ring for keyboard users */
.souper-hs-hotspot:focus-visible .souper-hs-marker-dot {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* ── Pulse ring ──────────────────────────────────────────── */
.souper-hs-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--marker-color, #ff6b35);
    opacity: 0.4;
    animation: souper-hs-pulse 2.2s ease-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes souper-hs-pulse {
    0%   { transform: translate(-50%,-50%) scale(1);   opacity: 0.5; }
    70%  { transform: translate(-50%,-50%) scale(2.2); opacity: 0;   }
    100% { transform: translate(-50%,-50%) scale(2.2); opacity: 0;   }
}

/* ── Number style ────────────────────────────────────────── */
.souper-hs-marker-number .souper-hs-marker-dot {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ── Tooltip base ────────────────────────────────────────── */
.souper-hs-tooltip {
    position: absolute;
    min-width: 160px;
    max-width: 260px;
    padding: 10px 14px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100;
    white-space: normal;
    top: 50%;
    transform: translateY(-50%) scale(0.92);
    transform-origin: left center;
}

/* ── Tooltip colour variants ─────────────────────────────── */
.souper-hs-tooltip-dark {
    background: rgba(15,15,15,0.94);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    backdrop-filter: blur(6px);
}

.souper-hs-tooltip-light {
    background: rgba(255,255,255,0.96);
    color: #111;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(6px);
}

.souper-hs-tooltip-orange {
    background: var(--marker-color, #ff6b35);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255,107,53,0.4);
}

.souper-hs-tooltip-transparent {
    background: transparent;
    color: var(--tooltip-text-color, #ffffff);
    box-shadow: none;
    backdrop-filter: none;
}

/* ── Tooltip position: right (default) ───────────────────── */
.souper-hs-tooltip-right {
    left: calc(100% + 12px);
    right: auto;
    transform-origin: left center;
}

/* ── Tooltip position: left ──────────────────────────────── */
.souper-hs-tooltip-left {
    right: calc(100% + 12px);
    left: auto;
    transform-origin: right center;
}

/* ── Tooltip position: top ───────────────────────────────── */
.souper-hs-tooltip-top {
    top: auto;
    bottom: 50%;
}

/* ── Tooltip visible state ───────────────────────────────── */
.souper-hs-hotspot:hover .souper-hs-tooltip,
.souper-hs-hotspot:focus-visible .souper-hs-tooltip,
.souper-hs-hotspot.active .souper-hs-tooltip {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.souper-hs-tooltip-left.souper-hs-tooltip-top,
.souper-hs-tooltip-right.souper-hs-tooltip-top {
    transform: translateY(50%) scale(0.92);
}
.souper-hs-hotspot:hover .souper-hs-tooltip-left.souper-hs-tooltip-top,
.souper-hs-hotspot:hover .souper-hs-tooltip-right.souper-hs-tooltip-top,
.souper-hs-hotspot:focus-visible .souper-hs-tooltip-left.souper-hs-tooltip-top,
.souper-hs-hotspot:focus-visible .souper-hs-tooltip-right.souper-hs-tooltip-top,
.souper-hs-hotspot.active .souper-hs-tooltip-left.souper-hs-tooltip-top,
.souper-hs-hotspot.active .souper-hs-tooltip-right.souper-hs-tooltip-top {
    transform: translateY(50%) scale(1);
}

/* ── Tooltip text ────────────────────────────────────────── */
.souper-hs-tooltip-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.3;
}

.souper-hs-tooltip-desc {
    font-size: 12px;
    line-height: 1.5;
    opacity: 0.85;
}

/* ── Placeholder (editor, no image set) ──────────────────── */
.souper-hs-placeholder {
    background: #f0f0f0;
    border: 2px dashed #ccc;
    padding: 40px;
    text-align: center;
    border-radius: 4px;
    color: #888;
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .souper-hs-pulse-ring {
        animation: none;
    }
    .souper-hs-tooltip,
    .souper-hs-marker-dot {
        transition: none;
    }
}
