/* Estilos para el chat a pantalla completa */
.chat-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1050;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-fullscreen .chat-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.chat-fullscreen .chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    scroll-behavior: smooth;
}

.chat-fullscreen .chat-input-container {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

/* Estilos para la transición de entrada/salida del modo fullscreen */
.chat-fullscreen.d-none {
    animation: fadeOut 0.2s;
}

.chat-fullscreen:not(.d-none) {
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Estilos para los mensajes del chat */
.message {
    margin-bottom: 1rem;
    max-width: 85%;
    position: relative;
    clear: both;
}

.user-message {
    float: right;
    margin-left: auto;
    margin-right: 10px;
}

.assistant-message {
    float: left;
    margin-right: auto;
    margin-left: 10px;
}

.message-content {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    display: inline-block;
}

.message.user .message-content {
    background-color: #007bff;
    color: #fff;
    border-top-right-radius: 0;
}

.message.assistant .message-content {
    background-color: #f1f3f4;
    color: #202124;
    border-top-left-radius: 0;
}

/* Historial de chats */
.chat-history-container {
    height: 350px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.list-group-item {
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

.list-group-item.active {
    background-color: #e9ecef;
    border-left-color: #007bff;
    color: #212529;
}

.fullscreen-historylist {
    height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Animación para mostrar/ocultar historial */
#chatHistoryCol, #fullscreenHistoryCol {
    transition: all 0.3s ease;
}

#chatHistoryCol:not(.d-none), #fullscreenHistoryCol:not(.d-none) {
    animation: slideIn 0.3s forwards;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.message .timestamp {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.message.user .timestamp {
    text-align: right;
    color: rgba(255, 255, 255, 0.8);
}

.message.assistant .timestamp {
    color: #6c757d;
}

/* Estilos para la sección de estudiantes */
.student-card {
    transition: all 0.2s ease-in-out;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.student-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.student-card .card-body {
    flex: 1 1 auto;
}

/* Estilo para las tarjetas del historial */
.history-card {
    transition: all 0.2s ease;
    height: 100%;
}

.history-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.history-card .card-text {
    height: 3em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Mejoras para la vista de chat */
.chat-container {
    transition: height 0.3s ease;
}

/* Estilos para formularios en menú desplegable */
.dropdown-item-form {
    padding: 0;
    margin: 0;
}

.dropdown-item-form .dropdown-item {
    text-align: left;
    background: none;
    border: none;
    width: 100%;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.dropdown-item-form .dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Estilos para la pantalla de selección de rol */
.role-selector-card {
    transition: all 0.3s ease;
}

.role-selector-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}