/* === CHAT ESTILOS INTEGRADOS === */

/* Cabecera del chat */
.chat-header {
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f97316;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

/* Contenedor del chat */
.chat-body {
    height: 60vh;
    overflow-y: auto;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

/* Estilos de mensajes */
.message {
    display: flex;
    align-items: flex-end;
    margin-bottom: 15px;
}

.message.user-message {
    justify-content: flex-end;
}

.message.bot-message {
    justify-content: flex-start;
}

/* Contenido del mensaje */
.message-content {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
}

.user-message {
    justify-content: flex-end;
    text-align: right;
}
.user-message .message-content {
    background-color: #4a90e2;
    color: #fff;
    border-top-right-radius: 0;
	text-align: right;
}

.bot-message {
    justify-content: flex-start;
    text-align: left;
}
.bot-message .message-content {
    background-color: #f1f1f1;
    color: #333;
    border-top-left-radius: 0;
	text-align: left;
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 10px;
}

/* Input y botón */
.chat-footer {
    background-color: #fff;
    padding: 15px;
    border-top: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-footer input {
    flex: 1;
    border: none;
    padding: 10px 15px;
    font-size: 15px;
    border-radius: 20px;
    outline: none;
    background-color: #f1f1f1;
    color: #333;
    margin-right: 10px;
}

.chat-footer button {
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat-footer button svg {
    width: 20px;
    height: 20px;
}

/* Puntos de carga */
.loading-dots span {
    animation: blink 1.4s infinite both;
    display: inline-block;
    font-size: 24px;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* Responsive ajustes */
@media (max-width: 768px) {
    .message-content {
        font-size: 0.9rem;
        line-height: 1.2;
    }

    #messageInput {
        font-size: 0.9rem;
        line-height: 1.2;
    }
}
