/* Wizard de ruta — 4 pasos */
.ri-wizard {
    --wz-active: #0d6efd;
    --wz-done: #16a34a;
    --wz-muted: #6c757d;
    --wz-borde: #e9ecef;
}

.ri-guiado-card .card-header .wizard-topbar {
    margin-bottom: 0;
}

.ri-guiado-titulo {
    font-size: 1.15rem;
    font-weight: 700;
}

.wizard-paso .alert,
.wizard-paso .card.bg-light {
    border-radius: .65rem;
}

.wizard-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: 1rem;
}
.wizard-topbar .wizard-progress {
    flex: 1 1 12rem;
    margin-bottom: 0;
}
.wizard-topbar #btn-wizard-nueva {
    flex-shrink: 0;
    align-self: center;
}

.wizard-progress {
    display: flex;
    justify-content: space-between;
    gap: .35rem;
    margin-bottom: 1rem;
    padding: 0;
    list-style: none;
}
.wizard-progress .wz-step {
    flex: 1;
    text-align: center;
    font-size: .68rem;
    min-width: 0;
    color: var(--wz-muted);
    position: relative;
}
.wizard-progress .wz-step::before {
    content: attr(data-num);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    margin: 0 auto .35rem;
    border-radius: 50%;
    border: 2px solid var(--wz-borde);
    background: #fff;
    font-weight: 600;
    font-size: .8rem;
    color: var(--wz-muted);
}
.wizard-progress .wz-step.active::before {
    border-color: var(--wz-active);
    background: var(--wz-active);
    color: #fff;
}
.wizard-progress .wz-step.done::before {
    border-color: var(--wz-done);
    background: var(--wz-done);
    color: #fff;
    content: '✓';
}
.wizard-progress .wz-step.active { color: var(--wz-active); font-weight: 600; }
.wizard-progress .wz-step.done { color: var(--wz-done); }
.wizard-progress .wz-step span {
    display: block;
    line-height: 1.15;
    word-break: break-word;
}

.wizard-paso { animation: wz-fade-in .2s ease; }
@keyframes wz-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wizard-breadcrumb {
    font-size: .85rem;
    margin-bottom: .75rem;
}
.wizard-breadcrumb .breadcrumb {
    margin-bottom: 0;
    padding: .5rem .75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.wizard-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}
.wizard-nav .btn { flex: 1 1 auto; min-width: 7rem; }

.wizard-cargando {
    text-align: center;
    padding: 2.5rem 1rem;
}
.wizard-cargando .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
}

.wizard-tiempo {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .95rem;
    color: var(--wz-muted);
    margin-bottom: 0;
}

.wizard-resultado-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .85rem;
    scroll-margin-top: 4.75rem;
}

.wizard-resultado-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529;
}

.instrucciones-titulo {
    font-size: .95rem;
    font-weight: 700;
    color: #198754;
    margin: .85rem 0 .5rem;
}

.wizard-ruta-voz {
    margin: .75rem 0;
}

.wizard-feedback {
    margin-top: 1rem;
    padding-top: .85rem;
    border-top: 1px solid var(--wz-borde);
}

.wizard-resultados-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--wz-borde);
}

@media (max-width: 767.98px) {
    .wizard-topbar { flex-direction: column; align-items: stretch; }
    .wizard-topbar #btn-wizard-nueva { width: 100%; }
    .wizard-progress .wz-step span { display: block; line-height: 1.1; }
    .wizard-nav { flex-direction: column; }
    .wizard-nav .btn { width: 100%; }
    .wizard-resultados-acciones { flex-direction: column; }
    .wizard-resultados-acciones .btn { width: 100%; }

    /* Resultado: menos chrome, más contenido útil */
    body.ri-en-resultado .ri-publico-header,
    #ri-publico-root.ri-en-resultado .ri-publico-header {
        display: none !important;
    }
    body.ri-en-resultado #ri-nav-modos-wrap,
    #ri-publico-root.ri-en-resultado #ri-nav-modos-wrap,
    body.ri-en-resultado #ri-prompt-bar,
    #ri-publico-root.ri-en-resultado #ri-prompt-bar,
    body.ri-en-resultado #ri-prompt-fab,
    #ri-publico-root.ri-en-resultado #ri-prompt-fab {
        display: none !important;
    }
    body.ri-en-resultado .ri-guiado-card > .card-header .wizard-progress,
    #ri-publico-root.ri-en-resultado .ri-guiado-card > .card-header .wizard-progress {
        display: none;
    }
    body.ri-en-resultado .ri-guiado-card > .card-header,
    #ri-publico-root.ri-en-resultado .ri-guiado-card > .card-header {
        padding-top: .65rem;
        padding-bottom: .65rem;
    }
    body.ri-en-resultado .ri-guiado-card > .card-body,
    #ri-publico-root.ri-en-resultado .ri-guiado-card > .card-body {
        padding: 1rem;
    }
    body.ri-en-resultado #interfaz-prompt,
    #ri-publico-root.ri-en-resultado #interfaz-prompt {
        display: none !important;
    }
    body.ri-en-resultado #busqueda-ia-formulario,
    #ri-publico-root.ri-en-resultado #busqueda-ia-formulario {
        display: none !important;
    }
    .container.ri-publico.py-4 {
        padding-top: .75rem !important;
        padding-bottom: 1rem !important;
    }
}
