/* ── Tutorial Overlay System ── */

.tutorial-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000020;
    transition: opacity 0.3s;
}

.tutorial-highlight {
    position: absolute;
    border-radius: 10px;
    box-shadow: 0 0 0 4px #CE2B37, 0 0 0 9999px rgba(0, 0, 0, 0.5);
    z-index: 10000021;
    pointer-events: none;
    transition: all 0.35s ease;
}

.tutorial-tooltip {
    position: absolute;
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    max-width: 380px;
    width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000022;
    border-top: 4px solid #CE2B37;
    animation: tutorialFadeIn 0.25s ease;
}

@keyframes tutorialFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tutorial-tooltip.tutorial-centered {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tutorial-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tutorial-step-num {
    font-size: 0.75rem;
    font-weight: 600;
    color: #CE2B37;
    background: rgba(206, 43, 55, 0.08);
    padding: 2px 10px;
    border-radius: 10px;
}

.tutorial-skip {
    background: none;
    border: none;
    font-size: 0.78rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    font-family: inherit;
}
.tutorial-skip:hover {
    color: #374151;
    background: #f3f4f6;
}

.tutorial-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.tutorial-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #4b5563;
    margin: 0 0 16px 0;
}

.tutorial-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.tutorial-nav .tutorial-prev {
    font-size: 0.85rem;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    color: #374151;
    font-family: inherit;
    transition: background 0.15s;
}
.tutorial-nav .tutorial-prev:hover { background: #f3f4f6; }

.tutorial-nav .tutorial-next {
    font-size: 0.85rem;
    padding: 6px 18px;
    background: #CE2B37;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: background 0.15s;
}
.tutorial-nav .tutorial-next:hover { background: #b02430; }

/* In-tooltip language toggle */
.tutorial-lang-toggle {
    display: flex;
    gap: 4px;
    margin: 0 auto 0 12px;
}
.tutorial-lang-btn {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 1px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    color: #6b7280;
    font-family: inherit;
    transition: all 0.15s;
}
.tutorial-lang-btn.active {
    background: #CE2B37;
    border-color: #CE2B37;
    color: #fff;
}

/* Mobile: pin tooltip to bottom */
@media (max-width: 768px) {
    .tutorial-tooltip {
        max-width: calc(100vw - 32px);
    }
    .tutorial-tooltip.tutorial-anchored {
        position: fixed !important;
        bottom: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        top: auto !important;
    }
}
