/* ============================================================================
   tutorial.css — Estilos del motor de mini-tutoriales (coach marks).
   Reutilizable en todas las páginas. El color de acento se toma de
   --tut-accent (por defecto coral del ABC); cada página puede sobreescribirlo.
   ============================================================================ */
/* Contenedor SIN posicionar. El foco/burbuja son position:fixed → se resuelven
   contra el VIEWPORT (igual que getBoundingClientRect), así el foco aterriza
   exacto también en el simulador móvil de Chrome (donde el visual viewport y el
   layout viewport se desfasan y romperían las coordenadas de documento). */
.tut-root {
    position: static;
    font-family: "Nunito", system-ui, sans-serif;
}

/* --- Botón de ayuda "?" reutilizable (abre/repite el tutorial) ------------- */
.tut-help {
    margin-left: auto;          /* empuja el botón al extremo derecho del nav */
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--tut-accent, #8A2BE2);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 14px rgba(20, 5, 6, 0.16),
                inset 0 0 0 1px rgba(138, 43, 226, 0.18);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.tut-help:hover  { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(20, 5, 6, 0.22); }
.tut-help:active { transform: scale(0.94); }

/* Capa que bloquea la interacción con el resto de la página */
.tut-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
    pointer-events: auto;
    z-index: 9998;
}
/* En pasos centrados (sin foco) el fondo se oscurece por completo */
.tut-root.tut--center .tut-backdrop { background: rgba(20, 5, 6, 0.72); }

/* Foco: recuadro transparente con una enorme sombra que oscurece todo lo demás.
   position: fixed → coordenadas del viewport, queda pegado al elemento sin que
   el desfase visual/layout viewport (móvil) lo corra. */
.tut-spotlight {
    position: fixed;
    left: 0; top: 0; width: 0; height: 0;
    border-radius: 14px;
    border: 3px solid var(--tut-accent, #FF5A5F);
    box-shadow: 0 0 0 9999px rgba(20, 5, 6, 0.72);
    pointer-events: none;
    z-index: 9998;
    /* Sin transición de posición: el foco debe quedar EXACTO sobre el elemento. */
    transition: opacity 0.2s ease;
}

/* Burbuja con el texto del paso (también en coordenadas del viewport) */
.tut-bubble {
    position: fixed;
    width: calc(100vw - 24px);
    max-width: 320px;
    box-sizing: border-box;
    background: #fff;
    color: #2a2a2a;
    border-radius: 18px;
    padding: 1rem 1.1rem 0.85rem;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
    pointer-events: auto;
    z-index: 9999;
}
@media (min-width: 480px) { .tut-bubble { width: 320px; } }

.tut-trufa {
    position: absolute;
    top: -46px;
    right: 12px;
    width: 72px;
    height: auto;
    pointer-events: none;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.2));
}

.tut-step {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--tut-accent, #FF5A5F);
    margin-bottom: 0.25rem;
}
.tut-title {
    font-size: 1.05rem;
    font-weight: 900;
    margin: 0 0 0.35rem;
}
.tut-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #555;
    margin: 0 0 0.9rem;
}

.tut-actions { display: flex; align-items: center; gap: 0.5rem; }
.tut-spacer { flex: 1 1 auto; }

.tut-btn {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    border: none;
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.tut-btn:active { transform: scale(0.96); }

.tut-skip { background: transparent; color: #999; padding-left: 0; }
.tut-skip:hover { color: #666; }
.tut-back { background: #f0f0f0; color: #555; }
.tut-back:hover { background: #e6e6e6; }
.tut-next { background: var(--tut-accent, #FF5A5F); color: #fff; }
.tut-next:hover { transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
    .tut-spotlight, .tut-btn { transition: none; }
}
