/* ================================
   Diagnóstico Prandiun
================================ */

/* Layout base */
.diagnostic-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 1.25rem;
    /* rounded-4 */
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .06);
}

/* Pregunta */
.diagnostic-q {
    padding: 18px 18px;
    border-radius: 16px;
    background: rgba(0, 0, 0, .02);
    border: 1px solid rgba(0, 0, 0, .06);
}

.diagnostic-q-title {
    color: var(--color-dark);
    font-weight: 600;
    margin-bottom: 10px;
}

/* Opciones tipo “pill button” */
.diagnostic-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Ocultamos el radio real */
.diagnostic-options input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* La “pill” clicable */
.diagnostic-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    transition: all .18s ease;
    border: 1px solid rgba(0, 0, 0, .10);
    background: #fff;
    color: #374151;
    font-weight: 600;
    font-size: .95rem;
}

.diagnostic-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 0, 0, .18);
    box-shadow: 0 .4rem .9rem rgba(0, 0, 0, .08);
}

/* Punto indicador dentro de la pill */
.diagnostic-pill .dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .18);
}

/* Colores por tipo */
.diagnostic-pill.is-no .dot {
    background: rgba(235, 80, 67, .8);
}

/* rojo */
.diagnostic-pill.is-mid .dot {
    background: rgba(250, 195, 46, .9);
}

/* amarillo */
.diagnostic-pill.is-yes .dot {
    background: rgba(18, 113, 65, .9);
}

/* verde */

/* Estado checked */
.diagnostic-options input[type="radio"]:checked+.diagnostic-pill {
    border-color: rgba(0, 72, 70, .45);
    box-shadow: 0 0 0 4px rgba(0, 72, 70, .12);
    background: rgba(0, 72, 70, .06);
    color: var(--color-primary);
}

/* Progreso */
.diagnostic-progress-wrap {
    background: rgba(0, 72, 70, .08);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 18px;
}

.diagnostic-progress-bar {
    height: 10px;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: 999px;
    transition: width .25s ease;
}

/* Resultado */
.diagnostic-result {
    border-radius: 18px;
    padding: 22px;
    border: 1px solid rgba(0, 0, 0, .06);
}

.diagnostic-result h3 {
    margin-bottom: 6px;
}

.diagnostic-result small {
    display: block;
    margin-top: 10px;
    opacity: .8;
}

/* Variantes por nivel */
.diagnostic-result.level-basic {
    background: rgba(235, 80, 67, .08);
    border-color: rgba(235, 80, 67, .22);
}

.diagnostic-result.level-mid {
    background: rgba(250, 195, 46, .10);
    border-color: rgba(250, 195, 46, .30);
}

.diagnostic-result.level-adv {
    background: rgba(18, 113, 65, .10);
    border-color: rgba(18, 113, 65, .25);
}

/* CTA button match */
.btn-prandiun-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.btn-prandiun-primary:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary-light);
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {

    .diagnostic-pill,
    .diagnostic-progress-bar {
        transition: none !important;
    }
}

/* ================================
   Grid de preguntas (responsive)
================================ */

/* Por defecto: 1 columna */
.diagnostic-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

/* Solo en pantallas grandes: 2 columnas */
@media (min-width: 1200px) {
    .diagnostic-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    /* para que las preguntas queden del mismo “alto” visual */
    .diagnostic-q {
        height: 100%;
    }
}

/* Ajuste: que las opciones no se rompan feo */
.diagnostic-options {
    gap: 8px;
}

/* Pills algo más compactas para que quepan mejor en 2 columnas */
@media (min-width: 1200px) {
    .diagnostic-pill {
        padding: 9px 12px;
        font-size: .92rem;
    }
}

/* Forzar alturas iguales y alineación limpia */
.diagnostic-q {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* Opciones siempre alineadas abajo */
.diagnostic-options {
    margin-top: auto;
}

/* Pills estables (evita saltos de línea raros) */
.diagnostic-pill {
    min-width: 96px;
    justify-content: center;
    white-space: nowrap;
}

/* ================================
   Diagnóstico por pasos
================================ */

.diagnostic-step {
    display: none;
    animation: fadeStep .3s ease;
}

.diagnostic-step.is-active {
    display: block;
}

@keyframes fadeStep {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}