/* Cuestionarios Web - Frontend CSS */

.cuestionarios-encuesta-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.cuestionario-paso {
    display: none;
}

.cuestionario-paso.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cuestionario-card {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cuestionario-card h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 28px;
}

.cuestionario-card > p {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 15px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

select.form-control {
    cursor: pointer;
}

/* Preguntas Likert */
.pregunta-likert {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 25px;
}

.pregunta-label {
    font-size: 15px;
    line-height: 1.6;
    color: #222;
    margin-bottom: 15px;
}

.opciones-likert {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.opcion-radio {
    flex: 1;
    min-width: 120px;
    margin: 0;
    cursor: pointer;
}

.opcion-radio input[type="radio"] {
    display: none;
}

.opcion-radio span {
    display: block;
    padding: 12px 10px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    transition: all 0.2s;
}

.opcion-radio:hover span {
    border-color: #2271b1;
    background: #f0f6fc;
}

.opcion-radio input[type="radio"]:checked + span {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    font-weight: 600;
}

/* Botones */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-primary {
    background: #2271b1;
    color: #fff;
}

.btn-primary:hover {
    background: #135e96;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    justify-content: flex-end;
}

/* Mensajes */
.mensaje {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    font-size: 15px;
}

.mensaje.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mensaje.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mensaje.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Bienvenida */
#bienvenida-alumno {
    background: #d4edda;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
    border-left: 4px solid #28a745;
}

#bienvenida-alumno h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #155724;
}

#bienvenida-alumno p {
    margin: 5px 0;
    color: #155724;
}

/* Loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .cuestionario-card {
        padding: 25px 20px;
    }
    
    .opciones-likert {
        flex-direction: column;
    }
    
    .opcion-radio {
        min-width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cuestionarios-encuesta-wrapper {
        padding: 0 15px;
        margin: 20px auto;
    }
    
    .cuestionario-card {
        padding: 20px 15px;
    }
    
    .cuestionario-card h2 {
        font-size: 22px;
    }
}
