/* ============================================================
   Correcciones UI/UX (auditoría ui-ux-pro-max)
   Se carga DESPUÉS de app.css para sobrescribir los defectos.
   ============================================================ */

/* 1) Foco visible en todos los controles interactivos (teclado + programa) */
:focus-visible {
    outline: 2px solid #27ae60;
    outline-offset: 2px;
}
.action-button:focus,
.action-button:focus-visible {
    outline: 2px solid #27ae60;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, .4);
}

/* 2) Tamaño mínimo de toque (44px) en móvil */
.action-button,
.input {
    min-height: 44px;
}

/* 3) Barra de progreso visible sobre la tarjeta blanca
      (antes: texto #fff sobre fondo #fff = pasos invisibles) */
#progressbar li {
    color: #2c3e50;
}
#progressbar li:before {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #2c3e50;
}
#progressbar li:after {
    background: #d1d5db;
}
#progressbar li.active:before {
    color: #fff;
    background: #27ae60;
    border-color: #27ae60;
}
#progressbar li.active:after {
    background: #27ae60;
}

/* 4) Contraste de texto secundario (gris más oscuro) */
.fs-subtitle,
.field small {
    color: #475569;
}

/* 5) Centrar los botones de acción de cada paso */
.acciones {
    text-align: center;
}

/* 6) Tarjetas de opciones con foto referencial
      (para que el cliente entienda qué está eligiendo) */
.opciones-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 8px;
}
.opcion-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.opcion-card:hover { border-color: #94a3b8; }
.opcion-card.activa {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, .18);
}
/* El radio queda accesible por teclado, pero invisible */
.opcion-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}
.opcion-card input[type="radio"]:focus-visible + .opcion-foto {
    outline: 3px solid #27ae60;
    outline-offset: -3px;
}
.opcion-foto {
    display: block;
    aspect-ratio: 3 / 2;   /* igual que las fotos (3:2) para que no se recorten */
    background: #f1f5f9;
    overflow: hidden;
}
.opcion-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.opcion-sinfoto {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 30px;
    color: #cbd5e1;
}
.opcion-nombre {
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}
.opcion-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #27ae60;
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: bold;
}
.opcion-card.activa .opcion-check { display: flex; }

/* En celular la tarjeta pasa a horizontal (foto a la izquierda) para no ocupar media pantalla.
   IMPORTANTE: va al final para poder sobreescribir las reglas base de arriba. */
@media (max-width: 640px) {
    .opciones-cards { grid-template-columns: 1fr; gap: 8px; }
    .opcion-card {
        flex-direction: row;
        align-items: stretch;
    }
    .opcion-foto {
        width: 112px;
        flex: 0 0 112px;
        aspect-ratio: 1 / 1;
        border-right: 1px solid #e2e8f0;
    }
    .opcion-nombre {
        flex: 1;
        display: flex;
        align-items: center;
        padding: 10px 34px 10px 12px;
    }
    .opcion-check {
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
    }
}
