/* Animated Hotspots — Public-Viewer DOM-Layer.
   Spiegelt die styles aus
     frontend/src/components/viewer/hotspots-animated/MarkerTextOverlay.tsx (styled-jsx)
   Tokens kommen aus viewer-tokens.css (--vp-hs-*). */

.vp-hs-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 25;
}
.vp-hs-overlay > * { pointer-events: auto; }

/* ── ICON Anchor + Heroicons-i + Hover-Card ──────────────────────── */
.vp-hs-info-anchor {
    --s: var(--vp-hs-scale, 1);
    position: absolute;
    left: 0;
    top: 0;
    width: calc(44px * var(--s));
    height: calc(44px * var(--s));
    pointer-events: auto;
    cursor: pointer;
    will-change: transform, opacity;
}
.vp-hs-info-glyph {
    position: absolute;
    left: 50%;
    top: 50%;
    width: calc(33px * var(--s));
    height: calc(33px * var(--s));
    transform: translate(-50%, -50%);
    color: var(--vp-hs-ink);
    pointer-events: none;
    z-index: 1;
}
.vp-hs-info-card {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 14px);
    transform: translateX(-50%) translateY(8px);
    transform-origin: bottom center;
    width: 236px;
    background: var(--vp-hs-glass-strong);
    -webkit-backdrop-filter: var(--vp-hs-blur);
    backdrop-filter: var(--vp-hs-blur);
    border: 1px solid var(--vp-hs-glass-line);
    border-radius: 14px;
    box-shadow: var(--vp-hs-sh);
    padding: 14px 16px;
    opacity: 0;
    pointer-events: none;
    transition: 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 2;
}
.vp-hs-info-anchor:hover .vp-hs-info-card {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.vp-hs-info-card::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 9px;
    margin-top: -1px;
    background: #171c28;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}
:root.vp-light .vp-hs-info-card::after,
.vp-light .vp-hs-info-card::after,
body.light .vp-hs-info-card::after {
    background: #f7f9fb;
}
.vp-hs-info-card .eye {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--vp-hs-ink-dim);
    margin: 0;
}
.vp-hs-info-card h4 {
    margin: 4px 0 5px;
    font-family: "Onest", system-ui, sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: var(--vp-hs-ink);
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.vp-hs-info-card p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--vp-hs-ink-dim);
}

/* ── Expanded ICON-Card (click-mode, smart-placement) ────────────── */
.vp-hs-info-expanded {
    position: absolute;
    width: 400px;
    background: var(--vp-hs-glass-strong);
    -webkit-backdrop-filter: var(--vp-hs-blur);
    backdrop-filter: var(--vp-hs-blur);
    border: 1px solid var(--vp-hs-glass-line);
    border-radius: 16px;
    box-shadow: var(--vp-hs-sh);
    padding: 18px 20px 20px;
    pointer-events: auto;
    cursor: default;
    z-index: 10;
    color: var(--vp-hs-ink);
    animation: vp-hs-expand-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes vp-hs-expand-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.vp-hs-info-expanded[data-arrow-side="left"]::before {
    content: "";
    position: absolute;
    top: var(--arrow-y, 50%);
    left: 0;
    transform: translate(-100%, -50%);
    width: 11px;
    height: 22px;
    margin-left: 1px;
    background: var(--vp-hs-glass-strong);
    clip-path: polygon(100% 0, 100% 100%, 0 50%);
}
.vp-hs-info-expanded[data-arrow-side="right"]::before {
    content: "";
    position: absolute;
    top: var(--arrow-y, 50%);
    right: 0;
    transform: translate(100%, -50%);
    width: 11px;
    height: 22px;
    margin-right: 1px;
    background: var(--vp-hs-glass-strong);
    clip-path: polygon(0 0, 0 100%, 100% 50%);
}
.vp-hs-info-expanded .close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--vp-hs-glass-line);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--vp-hs-ink);
    transition: background 0.15s;
    padding: 0;
}
:root.vp-light .vp-hs-info-expanded .close,
.vp-light .vp-hs-info-expanded .close,
body.light .vp-hs-info-expanded .close {
    background: rgba(0,0,0,0.04);
}
.vp-hs-info-expanded .close:hover { background: rgba(255,255,255,0.13); }
:root.vp-light .vp-hs-info-expanded .close:hover,
.vp-light .vp-hs-info-expanded .close:hover,
body.light .vp-hs-info-expanded .close:hover { background: rgba(0,0,0,0.08); }
.vp-hs-info-expanded .media {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 14px;
    background: rgba(0,0,0,0.20);
}
.vp-hs-info-expanded video.media { background: #000; }
.vp-hs-info-expanded .eye {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--vp-hs-ink-dim);
    margin: 0;
}
.vp-hs-info-expanded h3 {
    margin: 6px 0 8px;
    font-family: "Onest", system-ui, sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: var(--vp-hs-ink);
    letter-spacing: -0.01em;
    line-height: 1.25;
    padding-right: 36px;
}
.vp-hs-info-expanded p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--vp-hs-ink-dim);
    white-space: pre-wrap;
}

/* ── TAG-Pille (always-on, komplett DOM) ─────────────────────────── */
.vp-hs-tag-pill {
    --s: var(--vp-hs-scale, 1);
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    gap: calc(6px * var(--s));
    padding: calc(6px * var(--s)) calc(12px * var(--s)) calc(6px * var(--s)) calc(8px * var(--s));
    background: var(--vp-hs-glass-strong);
    -webkit-backdrop-filter: var(--vp-hs-blur);
    backdrop-filter: var(--vp-hs-blur);
    border: 1px solid var(--vp-hs-glass-line);
    border-radius: calc(13px * var(--s));
    box-shadow: var(--vp-hs-sh);
    color: var(--vp-hs-ink);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    pointer-events: auto;
    will-change: transform, opacity;
    transform-origin: bottom center;
}
.vp-hs-tag-pill .pin {
    width: calc(22px * var(--s));
    height: calc(22px * var(--s));
    border-radius: calc(6px * var(--s));
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vp-hs-glass);
    border: 1px solid var(--vp-hs-glass-line);
}
.vp-hs-tag-pill .pin svg {
    width: calc(13px * var(--s));
    height: calc(13px * var(--s));
}
.vp-hs-tag-pill .txt {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.vp-hs-tag-pill .eye {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: calc(8px * var(--s));
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--vp-hs-ink-dim);
}
.vp-hs-tag-pill .ttl {
    font-family: "Onest", system-ui, sans-serif;
    font-weight: 600;
    font-size: calc(13px * var(--s));
    margin-top: calc(1px * var(--s));
    letter-spacing: -0.01em;
}
