/* EduExercises RAG - Estilos de Ejercicios */

/* 1. OCULTAR METADATA (FUNDAMENTAL) */
.sp-rag-metadata {
    display: none !important;
}

/* 2. ENCABEZADO: TITULO IZQUIERDA / BOTON EXTREMO DERECHO */
.sp-exercise-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 2px solid #093aff;
    padding-bottom: 5px;
    margin-bottom: 12px;
}

.sp-answer-module {
    margin-left: auto;
}

.sp-exercise-number {
    font-weight: 800;
    color: #093aff;
    font-size: 1.05rem;
}

/* Este es el selector para el texto del problema */
.sp-exercise-content p {
    font-size: 0.96rem;
    line-height: 1.6;
    color: #1e293b;
    margin-bottom: 15px;
}

/* 3. OPCIONES: UNA COLUMNA CON ESPACIADO REDUCIDO */
.sp-options-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 12px 0 !important;
}

.sp-options-list li {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 15px !important;
    margin-bottom: 4px !important;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #334155;
    transition: border-color 0.2s;
}

.sp-options-list li:hover {
    border-color: #00bdff;
}

/* RECUPERAR LETRAS (A, B, C...) DEL ATRIBUTO DATA-OPTION */
.sp-options-list li::before {
    content: attr(data-option);
    font-weight: bold;
    color: #828282;
    margin-right: 10px;
}

/* 4. LA CAPSULA DE RESPUESTA (VISIBILIDAD CORREGIDA) */
.sp-answer-interactive-box {
    display: flex !important;
    align-items: center;
    border: 2px solid #00bdff;
    border-radius: 20px;
    overflow: hidden;
    height: 30px;
    background: white;
}

.sp-answer-toggle {
    background: #dc3545 !important;
    color: #fff !important;
    border: none !important;
    padding: 0 15px !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    cursor: pointer;
    text-transform: uppercase;
    height: 100% !important;
    min-width: 100px !important;
    display: flex !important;
    align-items: center !important;
    z-index: 10 !important;
}

/* ESTADO ACTIVO (VERDE #1cd50d) */
.sp-answer-active {
    border-color: #1cd50d !important;
}

.sp-answer-active .sp-answer-toggle {
    background: #1cd50d !important;
}

.sp-answer-content {
    background: #98F095;
    color: #000000 !important;
    font-weight: 900;
    font-size: 0.8rem;
    height: 100%;
    display: flex;
    align-items: center;
    max-width: 0;
    opacity: 0;
    transition: all 0.4s ease;
}

.sp-answer-active .sp-answer-content {
    max-width: 100px;
    padding: 0 15px;
    opacity: 1;
}

/* 5. CONTENEDOR PRINCIPAL DEL EJERCICIO */
.sp-exercise-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 6. ESTILOS PARA LATEX */
.MathJax {
    font-size: 1em !important;
}

/* 7. ESTILOS PARA SMILES CANVAS */
.smiles-canvas {
    display: block;
    margin: 10px auto;
    max-width: 100%;
}

/* 8. MENSAJE DE ERROR */
.error {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #fecaca;
    margin: 10px 0;
}
