/* ============================================================
   Project PULSE — Tutorial / Guided Tour Stylesheet
   ============================================================ */

/* Overlay */
.tutorial-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99990;
    pointer-events: none;
    transition: opacity .3s;
}
.tutorial-overlay.active { pointer-events: auto; }

/* Spotlight */
.tutorial-spotlight {
    position: fixed; z-index: 99991;
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,.6);
    transition: all .4s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
}
.tutorial-spotlight::after {
    content: '';
    position: absolute; top: -6px; left: -6px; right: -6px; bottom: -6px;
    border: 2px solid rgba(99,102,241,.6);
    border-radius: 14px;
    animation: spotlightPulse 2s ease-in-out infinite;
}
@keyframes spotlightPulse {
    0%, 100% { opacity: .6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

/* Callout card */
.tutorial-callout {
    position: fixed; z-index: 99992;
    width: 340px; max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    overflow: hidden;
    animation: calloutIn .35s ease-out;
}
@keyframes calloutIn {
    from { opacity: 0; transform: translateY(12px) scale(.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.tutorial-callout-header {
    padding: 14px 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: flex; align-items: center; justify-content: space-between;
}

.tutorial-callout-header .step-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .75rem; font-weight: 700;
}

.tutorial-callout-header .step-badge .step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(255,255,255,.2);
    font-size: .7rem; font-weight: 800;
}

.tutorial-callout-body {
    padding: 16px;
    font-size: .85rem; color: #4b5563;
    line-height: 1.6;
}

.tutorial-callout-body h6 {
    font-size: .9rem; font-weight: 700;
    color: #1f2937; margin: 0 0 8px;
}

.tutorial-callout-footer {
    padding: 12px 16px;
    border-top: 1px solid #f3f4f6;
    display: flex; align-items: center; justify-content: space-between;
}

/* Progress dots */
.tutorial-dots {
    display: flex; gap: 5px;
}
.tutorial-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #e5e7eb; transition: all .3s;
}
.tutorial-dot.active { background: #6366f1; transform: scale(1.3); }
.tutorial-dot.done { background: #10b981; }

/* Nav buttons */
.tutorial-btn {
    padding: 6px 14px; border-radius: 8px;
    font-size: .78rem; font-weight: 600;
    border: none; cursor: pointer;
    transition: all .2s;
}
.tutorial-btn-prev {
    background: #f3f4f6; color: #6b7280;
}
.tutorial-btn-prev:hover { background: #e5e7eb; }
.tutorial-btn-next {
    background: #6366f1; color: #fff;
}
.tutorial-btn-next:hover { background: #4f46e5; }
.tutorial-btn-skip {
    background: none; border: none; color: #9ca3af;
    font-size: .72rem; cursor: pointer;
    padding: 4px 8px;
}
.tutorial-btn-skip:hover { color: #6366f1; }

/* Arrow pointer */
.tutorial-arrow {
    position: absolute;
    width: 0; height: 0;
}
.tutorial-arrow.top {
    top: -8px; left: 50%; transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}
.tutorial-arrow.bottom {
    bottom: -8px; left: 50%; transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
}

/* Welcome/Finish modal */
.tutorial-welcome {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99995;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.6);
    animation: fadeIn .3s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.tutorial-welcome-card {
    width: 420px; max-width: calc(100vw - 32px);
    background: #fff; border-radius: 20px;
    padding: 30px; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    animation: calloutIn .4s ease-out;
}

.tutorial-welcome-card h4 {
    font-size: 1.2rem; font-weight: 800;
    color: #1f2937; margin: 12px 0 8px;
}

.tutorial-welcome-card p {
    font-size: .85rem; color: #6b7280;
    line-height: 1.6; margin-bottom: 20px;
}

/* Floating trigger button */
.tutorial-trigger {
    position: fixed; bottom: 20px; right: 20px;
    z-index: 1045;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff; border: none;
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; cursor: pointer;
    box-shadow: 0 4px 16px rgba(99,102,241,.4);
    transition: all .2s;
    animation: bobFloat 3s ease-in-out infinite;
}
.tutorial-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(99,102,241,.5);
}
@keyframes bobFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Don't show checkbox */
.tutorial-noshow {
    display: flex; align-items: center; gap: 6px;
    font-size: .72rem; color: #9ca3af;
    margin-top: 12px; justify-content: center;
}
.tutorial-noshow input { accent-color: #6366f1; }

/* Responsive */
@media (max-width: 479px) {
    .tutorial-callout { width: calc(100vw - 24px); }
    .tutorial-welcome-card { padding: 20px; }
}
