/* ==========================================================================
   AUTODIAGNÓSTICO SOFTGRADE — estilos del wizard
   ========================================================================== */

/* Step indicators */
#step-indicators {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 6rem;
    flex-shrink: 0;
}

.step-circle {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
}

.step-indicator.current .step-circle {
    background: #EA6A22;
    color: white;
    border-color: #EA6A22;
    box-shadow: 0 0 0 4px rgba(234, 106, 34, 0.2);
}

.step-indicator.completed .step-circle {
    background: #A0CE4E;
    color: white;
    border-color: #A0CE4E;
}

.step-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    line-height: 1.1;
    max-width: 6.5rem;
}

.step-indicator.current .step-label {
    color: white;
    font-weight: 600;
}

.step-indicator.completed .step-label {
    color: rgba(255, 255, 255, 0.8);
}

.step-connector {
    width: 1.5rem;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    margin-top: -1rem;
}

.step-connector.completed {
    background: #A0CE4E;
}

/* Question card */
.question-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.question-card.unanswered {
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.question-head {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.question-number {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(234, 106, 34, 0.2);
    color: #EA6A22;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.question-text {
    color: white;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
}

.question-help {
    margin-bottom: 1rem;
    margin-left: 2.875rem;
}

.help-toggle {
    background: none;
    border: none;
    padding: 0;
    color: #00B7CD;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.help-toggle:hover {
    color: white;
}

.help-content {
    margin-top: 0.75rem;
    padding: 0.875rem 1rem;
    background: rgba(0, 183, 205, 0.08);
    border: 1px solid rgba(0, 183, 205, 0.25);
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Scale grid */
.scale-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .scale-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .scale-grid {
        grid-template-columns: repeat(7, 1fr);
    }
}

.scale-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.scale-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.scale-option:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(234, 106, 34, 0.4);
}

.scale-option.selected {
    background: rgba(234, 106, 34, 0.15);
    border-color: #EA6A22;
}

.scale-option.na {
    border-color: rgba(255, 255, 255, 0.15);
}

.scale-option.na.selected {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.45);
}

.scale-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.scale-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.15;
}

.scale-option.selected .scale-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Unanswered inline message */
.unanswered-msg {
    margin-top: 0.875rem;
    padding: 0.65rem 0.875rem;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 0.5rem;
    color: #fca5a5;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Validation toast */
.validation-toast {
    position: fixed;
    top: 6rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    background: #dc2626;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 12px 30px -8px rgba(220, 38, 38, 0.5);
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    animation: toastIn 0.25s ease-out;
}

@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -12px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

/* Navigation footer */
.nav-footer {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: rgba(30, 58, 95, 0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 0;
    z-index: 30;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.nav-btn-prev {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
}

.nav-btn-prev:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.14);
}

.nav-btn-prev:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-btn-next {
    background: #EA6A22;
    color: white;
}

.nav-btn-next:hover {
    background: #D45A15;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -4px rgba(234, 106, 34, 0.45);
}

.nav-btn-next.is-final {
    background: #A0CE4E;
}

.nav-btn-next.is-final:hover {
    background: #8AB840;
    box-shadow: 0 8px 20px -4px rgba(160, 206, 78, 0.45);
}

/* Progress bar */
.progress-track {
    width: 100%;
    height: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #EA6A22, #D45A15);
    border-radius: 9999px;
    transition: width 0.25s ease;
    width: 0%;
}

/* Results page utilities */
.bar-track {
    width: 100%;
    height: 0.625rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.35s ease;
}

.bar-fill.low    { background: linear-gradient(90deg, #ef4444, #f97316); }
.bar-fill.mid    { background: linear-gradient(90deg, #f59e0b, #eab308); }
.bar-fill.high   { background: linear-gradient(90deg, #84cc16, #A0CE4E); }
.bar-fill.top    { background: linear-gradient(90deg, #A0CE4E, #10b981); }

.gap-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.level-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
}

.level-pill.lvl-inicial    { background: rgba(239, 68, 68, 0.2);  color: #fca5a5; }
.level-pill.lvl-basico     { background: rgba(249, 115, 22, 0.2); color: #fdba74; }
.level-pill.lvl-intermedio { background: rgba(234, 179, 8, 0.2);  color: #fde68a; }
.level-pill.lvl-avanzado   { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.level-pill.lvl-optimo     { background: rgba(160, 206, 78, 0.22); color: #bef264; }

/* Hide elements until ready */
[hidden] { display: none !important; }
