/* Estilos para el Asistente IA con aspecto académico */

/* Contenedor principal */
.assistenteai-container {
    position: fixed;
    z-index: 9999;
    bottom: 20px;
    right: 20px;
    font-family: Arial, Helvetica, sans-serif;
}

/* Botón flotante (contenedor del SVG) */
.assistenteai-button {
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
}

.assistenteai-button:hover {
    transform: scale(1.1);
}

.assistenteai-button svg {
    width: 100%;
    height: 100%;
}

/* Burbuja de diálogo del personaje */
.assistenteai-bubble {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 220px;
    background-color: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    line-height: 1.4;
    display: none;
    pointer-events: none;
    z-index: 10000;
}

.assistenteai-bubble:after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 30px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: white transparent;
}

/* Panel de conversación */
.assistenteai-panel {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 350px;
    height: 450px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Cabecera del panel */
.assistenteai-header {
    background-color: #1177d1;
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.assistenteai-close {
    cursor: pointer;
    font-size: 20px;
}

/* Área de mensajes */
.assistenteai-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Estilo de mensajes */
.message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 15px;
    margin-bottom: 8px;
    word-break: break-word;
}

.user-message {
    background-color: #e3f2fd;
    align-self: flex-end;
}

.assistant-message {
    background-color: #f1f1f1;
    align-self: flex-start;
}

/* Indicador de escritura */
.assistenteai-typing {
    align-self: flex-start;
    background-color: #f1f1f1;
    padding: 8px 12px;
    border-radius: 15px;
    margin: 0 10px 8px 10px;
}

/* Área de entrada */
.assistenteai-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
}

.assistenteai-input input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 8px;
    outline: none;
}

.assistenteai-input button {
    background-color: #1177d1;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
}

.assistenteai-input button:hover {
    background-color: #0d6efd;
}

/* Estilos para el modo evaluación */
.evaluation-container {
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
}

.evaluation-question {
    font-weight: bold;
    margin-bottom: 8px;
}

.evaluation-options {
    margin-bottom: 8px;
}

.evaluation-option {
    display: block;
    padding: 6px 10px;
    margin: 5px 0;
    background-color: #f1f1f1;
    border-radius: 6px;
    cursor: pointer;
}

.evaluation-option:hover {
    background-color: #e3f2fd;
}

.evaluation-option.selected {
    background-color: #e3f2fd;
    border: 1px solid #1177d1;
}

.evaluation-result {
    margin-top: 10px;
    padding: 8px;
    border-radius: 6px;
}

.evaluation-result.correct {
    background-color: #d4edda;
    color: #155724;
}

.evaluation-result.incorrect {
    background-color: #f8d7da;
    color: #721c24;
}

.evaluation-submit {
    background-color: #1177d1;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 15px;
    margin-top: 10px;
    cursor: pointer;
}

.evaluation-submit:hover {
    background-color: #0d6efd;
}

.evaluation-score {
    font-weight: bold;
    margin-top: 10px;
    padding: 8px;
    background-color: #e3f2fd;
    border-radius: 6px;
    text-align: center;
}

/* Estilos responsivos para pantallas pequeñas */
@media (max-width: 576px) {
    .assistenteai-panel {
        width: 90vw;
        right: 5vw;
        bottom: 100px;
    }

    .assistenteai-button {
        width: 60px;
        height: 60px;
    }
}
