/* css/tutorial.css — Estilos do tour de onboarding */

/* ── Overlay ─────────────────────────────────────────────────────────────────── */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: transparent; /* o escurecimento vem do spotlight (box-shadow) */
    cursor: default;         /* clique no fundo não fecha o tour */
    animation: tutorial-fade-in 0.3s ease;
}

@keyframes tutorial-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Spotlight (recorte iluminado no overlay) ────────────────────────────────── */
.tutorial-spotlight {
    position: absolute;
    z-index: 9001;
    border-radius: 14px;
    box-shadow: 0 0 0 9999px rgba(5, 8, 22, 0.82);
    pointer-events: none;
    opacity: 0;
    transition:
        top    0.38s cubic-bezier(0.16, 1, 0.3, 1),
        left   0.38s cubic-bezier(0.16, 1, 0.3, 1),
        width  0.38s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.25s;
    outline: 2px solid rgba(142, 231, 221, 0.55);
    outline-offset: 3px;
    animation: tutorial-pulse 2.2s ease-in-out infinite;
}

@keyframes tutorial-pulse {
    0%, 100% { outline-color: rgba(142, 231, 221, 0.55); }
    50%      { outline-color: rgba(155, 107, 255, 0.55); }
}

/* ── Tooltip ─────────────────────────────────────────────────────────────────── */
.tutorial-tooltip {
    position: absolute;
    z-index: 9002;
    width: 340px;
    max-width: calc(100vw - 32px);
    background: #0E1430;
    border: 1px solid #1E2745;
    border-radius: 18px;
    padding: 22px 22px 20px;
    overflow: hidden;
    box-shadow:
        0 32px 90px rgba(0, 0, 0, 0.72),
        0 0 0 1px rgba(142, 231, 221, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition:
        top  0.38s cubic-bezier(0.16, 1, 0.3, 1),
        left 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
}

/* Animação de entrada do tooltip a cada passo */
.tutorial-tooltip-in {
    animation: tutorial-pop-in 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes tutorial-pop-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Passo central: só fade, preservando o translate(-50%,-50%) inline */
.tutorial-tooltip-in-center {
    animation: tutorial-fade-in 0.3s ease;
}

/* ── Barra de progresso (topo do tooltip) ────────────────────────────────────── */
.tutorial-progress-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
}
.tutorial-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #9B6BFF 0%, #8EE7DD 100%);
    border-radius: 0 3px 3px 0;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Cabeçalho ───────────────────────────────────────────────────────────────── */
.tutorial-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.tutorial-step-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #8EE7DD;
}

.tutorial-skip-btn {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 9px;
    border-radius: 7px;
    transition: color 0.15s, background 0.15s;
    font-family: inherit;
}
.tutorial-skip-btn:hover {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
}

/* ── Título + chip de ícone ──────────────────────────────────────────────────── */
.tutorial-titlewrap {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 10px;
}

.tutorial-icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font-size: 16px;
    color: #050816;
    background: linear-gradient(135deg, #9B6BFF 0%, #8EE7DD 100%);
    box-shadow: 0 6px 18px rgba(155, 107, 255, 0.35);
}

.tutorial-title {
    font-size: 17px;
    font-weight: 800;
    color: #f1f5f9;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.tutorial-text {
    font-size: 13.5px;
    color: #9aa6bd;
    line-height: 1.65;
    margin: 0 0 20px 0;
}
.tutorial-text strong {
    color: #e8edf7;
    font-weight: 700;
}

/* ── Rodapé ──────────────────────────────────────────────────────────────────── */
.tutorial-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.tut-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s, transform 0.15s, border-color 0.15s, color 0.15s;
    font-family: inherit;
    white-space: nowrap;
}
.tut-btn i { font-size: 11px; }

/* "Voltar" fica à esquerda; o botão principal permanece à direita */
.tut-btn-ghost {
    margin-right: auto;
    background: transparent;
    color: #64748b;
    border: 1px solid #1E2745;
}
.tut-btn-ghost:hover {
    color: #cbd5e1;
    border-color: #2a365c;
}

.tut-btn-primary {
    background: linear-gradient(135deg, #9B6BFF 0%, #8EE7DD 100%);
    color: #050816;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(155, 107, 255, 0.30);
}
.tut-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(155, 107, 255, 0.42);
}

/* ── Modo claro ──────────────────────────────────────────────────────────────── */
body.light .tutorial-spotlight {
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55);
}
body.light .tutorial-tooltip {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
body.light .tutorial-progress-track { background: rgba(0, 0, 0, 0.07); }
body.light .tutorial-title  { color: #0f172a; }
body.light .tutorial-text   { color: #475569; }
body.light .tutorial-text strong { color: #1e293b; }
body.light .tutorial-step-label  { color: #0e9968; }
body.light .tutorial-skip-btn    { color: #94a3b8; }
body.light .tutorial-skip-btn:hover { color: #334155; background: rgba(0, 0, 0, 0.05); }
body.light .tut-btn-ghost {
    color: #64748b;
    border-color: #e2e8f0;
}
body.light .tut-btn-ghost:hover { color: #334155; border-color: #cbd5e1; }
