/* Recorrido guiado para nuevos usuarios */

.tour-root {
    position: fixed;
    inset: 0;
    z-index: 11000;           /* por encima de modales y del menú */
    touch-action: none;
}

/* Foco: el recuadro deja pasar la vista y oscurece todo lo demás */
.tour-spot {
    position: fixed;
    border-radius: 0.75rem;
    box-shadow: 0 0 0 9999px rgba(15, 15, 35, 0.62);
    outline: 2px solid rgba(255, 255, 255, 0.85);
    pointer-events: none;
    transition: left 0.25s ease, top 0.25s ease, width 0.25s ease,
                height 0.25s ease, opacity 0.2s ease;
}

/* Sin foco (intro / cierre): oscurecer todo */
.tour-root:has(.tour-centered)::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 35, 0.62);
}

.tour-card {
    position: fixed;
    box-sizing: border-box;
    width: calc(100vw - 24px);
    max-width: 360px;
    padding: 1rem 1.1rem 1rem;
    background: var(--color-background, #fff);
    color: var(--color-text-primary, #111827);
    border-radius: 1.1rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
    font-family: var(--font-family, system-ui, sans-serif);
    touch-action: auto;
    outline: none;
    animation: tour-pop 0.18s ease-out;
}

@keyframes tour-pop {
    from { opacity: 0; scale: 0.96; }
    to   { opacity: 1; scale: 1; }
}

.tour-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-secondary, #6b7280);
}

.tour-skip {
    background: none;
    border: none;
    padding: 0.25rem 0.1rem;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.tour-skip:hover { color: var(--color-primary, #4f46e5); }

.tour-title {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary, #4f46e5);
}

.tour-text {
    margin: 0 0 0.9rem;
    font-size: 0.92rem;
    line-height: 1.45;
}

.tour-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
}

.tour-actions .tour-next { margin-left: auto; }

.tour-btn {
    border: 1.5px solid var(--color-border, #e5e7eb);
    background: transparent;
    color: var(--color-primary, #4f46e5);
    font: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.55rem 1.1rem;
    border-radius: 9999px;
    cursor: pointer;
}

.tour-btn[hidden] { display: none; }

.tour-btn.tour-primary {
    background: var(--color-primary, #4f46e5);
    border-color: var(--color-primary, #4f46e5);
    color: #fff;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}

.tour-btn:focus-visible { outline: 2px solid var(--color-primary, #4f46e5); outline-offset: 2px; }

.tour-btn:active { transform: scale(0.97); }

/* Modo oscuro */
body.dark-mode .tour-card {
    background: var(--color-dark-bg, #2a2a3e);
    color: var(--color-dark-text, #e0e0e0);
}

body.dark-mode .tour-title { color: #a5b4fc; }
body.dark-mode .tour-btn { color: #c7d2fe; border-color: var(--color-dark-border, #4a4a5e); }
body.dark-mode .tour-btn.tour-primary { background: #6366f1; border-color: #6366f1; color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .tour-spot, .tour-card { transition: none; animation: none; }
}
