/* ══════════════════════════════════════════════════════════════════
   ONBOARDING SPOTLIGHT TOUR
   Adapted from Chronos' wwwroot/css/chronos/21-onboarding-tour.css
   (violet ring -> Hyperion magenta --color-primary).
   ══════════════════════════════════════════════════════════════════ */

.tour-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: transparent; /* the dark mask is normally painted by the spotlight box-shadow */
    cursor: default;
    transition: background-color 0.2s ease;
}

/* Shown between steps, while the next target is still being located — keeps the mask up instead
   of letting the whole screen un-dim and then pop back in once the spotlight reappears. */
.tour-backdrop-dim {
    background: rgba(8, 6, 18, 0.82);
}

/* The cutout. A huge spread box-shadow paints the screen dark everywhere
   except this rect, and the same layer carries the ring + glow. */
.tour-spotlight {
    position: fixed;
    z-index: 2001;
    border-radius: var(--radius-md);
    pointer-events: none;
    box-shadow:
        0 0 0 9999px rgba(8, 6, 18, 0.82),
        0 0 0 2px rgba(157, 36, 153, 0.9),
        0 0 22px 6px rgba(157, 36, 153, 0.55);
    transition:
        top 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        left 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        height 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.tour-tooltip {
    position: fixed;
    z-index: 2002;
    width: 320px;
    max-width: calc(100vw - 32px);
    background: var(--surface-dialog);
    border: 1px solid rgba(157, 36, 153, 0.35);
    border-radius: var(--radius-lg);
    box-shadow: var(--elevation-3);
    color: var(--text-high);
    padding: 16px 18px 14px;
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    animation: tour-pop 0.18s ease-out;
}

@keyframes tour-pop {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tour-arrow {
    position: absolute;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    background: var(--surface-dialog);
    border: 1px solid rgba(157, 36, 153, 0.35);
    transform: rotate(45deg);
}
.tour-place-bottom .tour-arrow { top: -7px; border-right: none; border-bottom: none; }
.tour-place-top .tour-arrow    { bottom: -7px; border-left: none; border-top: none; }

.tour-step-count {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-tertiary);
    margin-bottom: 6px;
}
.tour-title { font-size: 15px; font-weight: 700; color: var(--text-high); margin-bottom: 6px; }
.tour-body  { font-size: 13px; line-height: 1.5; color: var(--text-medium); margin-bottom: 14px; }

.tour-actions { display: flex; align-items: center; gap: 8px; }
.tour-spacer { flex: 1; }

.tour-btn {
    padding: 7px 14px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s, background 0.15s, color 0.15s;
}
.tour-btn:hover { border-color: rgba(255, 255, 255, 0.18); }
.tour-next { background: var(--btn-fill-bg); color: #fff; }
.tour-back {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-medium);
    border-color: var(--border-subtle);
}
.tour-skip { background: transparent; color: var(--text-low); padding-left: 0; }
.tour-skip:hover { color: var(--text-medium); }

@media (prefers-reduced-motion: reduce) {
    .tour-backdrop { transition: none; }
    .tour-spotlight { transition: none; }
    .tour-tooltip { animation: none; }
}
