/* Tutorial overlay styles */

.tutorial-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.tutorial-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    pointer-events: auto;
    transition: opacity 0.3s;
}

/* Highlighted element gets pulled above the backdrop */
.tutorial-highlight {
    position: relative;
    z-index: 10000;
    box-shadow: 0 0 0 4px #2563eb, 0 0 0 6px rgba(37, 99, 235, 0.3);
    border-radius: 12px;
    transition: box-shadow 0.3s;
}

/* Tooltip */
.tutorial-tooltip {
    position: fixed;
    z-index: 10001;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 1.5rem;
    max-width: 400px;
    width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    transition: top 0.3s ease, left 0.3s ease;
    color: #e2e8f0;
}

.tutorial-step-indicator {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}

.tutorial-dot {
    width: 24px;
    height: 4px;
    border-radius: 2px;
    background: #334155;
    transition: background 0.3s;
}

.tutorial-dot.active {
    background: #2563eb;
}

.tutorial-dot.done {
    background: #16a34a;
}

.tutorial-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.5rem;
}

.tutorial-body {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.tutorial-body strong {
    color: #e2e8f0;
}

.tutorial-nav {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.tutorial-btn {
    font-size: 0.85rem !important;
    padding: 0.45rem 0.9rem !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

.tutorial-btn:hover {
    border-color: #64748b !important;
}

#tutorial-btn-skip {
    margin-right: auto;
    color: #94a3b8;
    border-color: #475569;
}

#tutorial-btn-skip:hover {
    color: #e2e8f0;
    border-color: #64748b;
}

/* Welcome screen (step 0) — centred, no highlight */
.tutorial-tooltip.tutorial-welcome {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    max-width: 480px;
    text-align: center;
}

.tutorial-welcome .tutorial-body {
    font-size: 0.95rem;
}

.tutorial-welcome .tutorial-nav {
    justify-content: center;
}

.tutorial-welcome .tutorial-title {
    font-size: 1.4rem;
}

/* Tooltip arrow */
.tutorial-tooltip::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #1e293b;
    border-right: 1px solid #334155;
    border-bottom: 1px solid #334155;
    transform: rotate(45deg);
}

.tutorial-tooltip.arrow-top::after {
    top: -7px;
    left: 2rem;
    transform: rotate(-135deg);
}

.tutorial-tooltip.arrow-bottom::after {
    bottom: -7px;
    left: 2rem;
    transform: rotate(45deg);
}

.tutorial-tooltip.arrow-left::after {
    left: -7px;
    top: 2rem;
    transform: rotate(135deg);
}

.tutorial-tooltip.arrow-right::after {
    right: -7px;
    top: 2rem;
    transform: rotate(-45deg);
}

.tutorial-tooltip.arrow-none::after {
    display: none;
}

/* Fade in */
.tutorial-overlay.visible {
    animation: tutorialFadeIn 0.3s ease-out;
}

@keyframes tutorialFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
