/* ============================================================================
   Geofirma Admin — Asistente por pasos

   Estilos de la barra de pasos que acompaña a window.adminWizard()
   (public/assets/js/core/wizard.js). Todos los colores salen de los tokens de
   _theme.css: no hay ni un valor de color escrito a mano.
   ============================================================================ */

.wizard-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 2rem;
    list-style: none;
    padding: 0;
}

/* El elemento de la barra es el <li>, no el botón: sin repartir aquí el
   ancho, cada paso ocupa lo que mide su texto y los títulos se amontonan
   en cuanto son cuatro. */
.wizard-steps > li {
    flex: 1 1 0;
    min-width: 0;
}

.wizard-step {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    text-align: center;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: default;
}

/* Sólo los pasos ya superados son pulsables (el JS ignora los siguientes). */
.wizard-step.is-done {
    cursor: pointer;
}

/* La línea que une un paso con el anterior. */
.wizard-step::before {
    content: '';
    position: absolute;
    top: 1.125rem;
    right: 50%;
    width: 100%;
    height: 2px;
    background: var(--color-border);
}

.wizard-step:first-child::before {
    display: none;
}

.wizard-step.is-done::before,
.wizard-step.is-current::before {
    background: var(--color-primary);
}

.wizard-step-number {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    border: 2px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    transition: background-color .2s, border-color .2s, color .2s;
}

.wizard-step.is-current .wizard-step-number {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.wizard-step.is-done .wizard-step-number {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    color: var(--color-primary-text);
}

.wizard-step-title {
    font-size: 0.8125rem;
    line-height: 1.2;
    color: var(--color-text-muted);
    max-width: 12rem;
}

.wizard-step.is-current .wizard-step-title {
    color: var(--color-text-primary);
    font-weight: 600;
}

.wizard-step.is-done .wizard-step-title {
    color: var(--color-text-secondary);
}

.wizard-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

/* Con un solo botón (primer paso) se mantiene alineado a la derecha. */
.wizard-actions > :only-child {
    margin-left: auto;
}

@media (max-width: 640px) {
    .wizard-step-title {
        display: none;
    }

    .wizard-steps {
        gap: 0;
    }
}
