/* demo_player.css — reusable step-through "driver's seat" product demo player.
   Storylane screenshot-model: per-step image + hotspot + tooltip + stage progress.
   Token-themed (light/dark), responsive, reduced-motion safe. */

.dp {
    --dp-accent: var(--accent, #0ea371);
    max-width: 1000px;
    margin: 0 auto;
}

/* Stage chips + progress */
.dp__stages {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 auto 18px;
}
.dp__stage {
    font-size: 14px;
    font-weight: 650;
    letter-spacing: .2px;
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    white-space: nowrap;
    transition: all .25s var(--ease-out, ease);
}
.dp__stage.is-current {
    color: #fff;
    background: var(--dp-accent);
    border-color: var(--dp-accent);
}
.dp__stage.is-done { color: var(--dp-accent); border-color: var(--dp-accent); background: var(--accent-dim, rgba(14,163,113,.1)); }

/* The screen frame (browser/device chrome around the captured screen) */
.dp__frame {
    position: relative;
    border-radius: var(--radius-lg, 16px);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lift, 0 12px 40px rgba(0,0,0,.18));
    background: var(--bg-card);
    line-height: 0;
}
.dp__img {
    display: block;
    width: 100%;
    height: auto;
}

/* Pulsing hotspot */
.dp__hotspot {
    position: absolute;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
    box-shadow: 0 0 0 3px var(--dp-accent), 0 0 0 8px rgba(14,163,113,.25);
    animation: dp-pulse 1.6s ease-in-out infinite;
    z-index: 3;
}
.dp__hotspot::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 12px;
}
@keyframes dp-pulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--dp-accent), 0 0 0 6px rgba(14,163,113,.28); }
    50%      { box-shadow: 0 0 0 3px var(--dp-accent), 0 0 0 14px rgba(14,163,113,0); }
}

/* Tooltip */
.dp__tip {
    position: absolute;
    z-index: 4;
    width: min(320px, 78%);
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    box-shadow: var(--shadow-lift, 0 12px 40px rgba(0,0,0,.25));
    padding: 16px 18px;
    line-height: 1.5;
    transition: opacity .3s var(--ease-out, ease), transform .3s var(--ease-out, ease);
}
.dp__tip-title { font-family: var(--font-heading, inherit); font-weight: 700; font-size: 18px; margin: 0 0 6px; color: var(--text-primary); }
.dp__tip-body { font-size: 15.5px; color: var(--text-secondary); margin: 0 0 14px; }
.dp__tip-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dp__tip-count { font-family: var(--font-mono, monospace); font-size: 13px; color: var(--text-muted); }
.dp__btns { display: flex; gap: 8px; }
.dp__btn {
    font-family: inherit; font-size: 14px; font-weight: 650; cursor: pointer;
    border-radius: 999px; padding: 7px 16px; border: 1px solid var(--border);
    background: var(--bg-secondary); color: var(--text-primary);
    transition: all .2s var(--ease-out, ease);
}
.dp__btn:hover { border-color: var(--dp-accent); }
.dp__btn--next { background: var(--dp-accent); border-color: var(--dp-accent); color: #fff; }
.dp__btn--next:hover { background: var(--accent-hover, #0b7f58); }
.dp__btn--back[disabled] { opacity: .4; cursor: default; }

/* Loading / error inside the player */
.dp__loading { text-align: center; padding: 60px 20px; color: var(--text-muted); font-size: 16px; }

/* Responsive: tooltip becomes a bottom sheet on narrow screens */
@media (max-width: 640px) {
    .dp__tip {
        position: fixed;
        left: 12px; right: 12px; bottom: 12px;
        top: auto !important;
        width: auto;
        max-width: none;
    }
    .dp__stage { font-size: 12.5px; padding: 5px 11px; }
}

@media (prefers-reduced-motion: reduce) {
    .dp__hotspot { animation: none; box-shadow: 0 0 0 3px var(--dp-accent), 0 0 0 8px rgba(14,163,113,.22); }
    .dp__tip { transition: none; }
}

/* Volunteer-walkthrough wrapper (event_demo.js renderVolunteer) */
.demo-vol__head { text-align: center; max-width: 720px; margin: 0 auto 22px; }
.demo-vol__lead { font-size: 17px; color: var(--text-secondary); margin: 12px auto 0; max-width: 560px; line-height: 1.6; }
.demo-vol__player { margin: 0 auto; }
.demo-vol__foot { text-align: center; margin-top: 22px; }
