/* ==========================================================================
   Reader Tour — Spotlight overlay + tooltip for first-time readers
   ========================================================================== */

/* ── Spotlight cutout ── */
.tour-spotlight {
    position: fixed;
    z-index: 500;
    border-radius: var(--radius-md);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65);
    pointer-events: none;
    opacity: 0;
    transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
}

.tour-spotlight.active {
    opacity: 1;
}

/* ── Click blocker ── */
.tour-click-blocker {
    position: fixed;
    inset: 0;
    z-index: 501;
    cursor: default;
}

/* ── Tooltip ── */
.tour-tooltip {
    position: fixed;
    z-index: 502;
    width: 320px;
    max-width: calc(100vw - 32px);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.tour-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.tour-tooltip[data-position="above"] {
    transform: translateY(-8px);
}

.tour-tooltip[data-position="above"].visible {
    transform: translateY(0);
}

/* Step label */
.tour-step-label {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: 6px;
}

/* Title */
.tour-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--color-heading);
    margin: 0 0 8px;
    line-height: 1.3;
}

/* Body */
.tour-body {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0 0 16px;
}

/* ── Footer: dots + buttons ── */
.tour-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Progress dots */
.tour-dots {
    display: flex;
    gap: 6px;
}

.tour-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-border);
    transition: background 0.2s ease;
}

.tour-dot.active {
    background: var(--color-primary);
}

/* Buttons */
.tour-buttons {
    display: flex;
    gap: 8px;
}

.tour-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    line-height: 1.4;
}

.tour-btn-skip {
    background: transparent;
    color: var(--color-text-muted);
}

.tour-btn-skip:hover {
    color: var(--color-text);
    background: var(--color-surface-hover);
}

.tour-btn-next {
    background: var(--color-primary);
    color: #fff;
}

.tour-btn-next:hover {
    opacity: 0.9;
}

/* ── Mobile ── */
@media (max-width: 767px) {
    .tour-tooltip {
        width: calc(100vw - 32px);
        left: 16px !important;
        right: 16px;
        padding: 16px;
    }

    .tour-body {
        font-size: var(--text-xs);
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .tour-spotlight {
        transition: opacity 0.01s;
    }

    .tour-tooltip {
        transition: opacity 0.01s;
        transform: none !important;
    }
}
