Untitled
unknown
plain_text
8 months ago
4.2 kB
6
Indexable
/* page/chatbot/ChatBot.css */
/*.chatbot-page-container {*/
/* max-width: 900px; !* Giới hạn chiều rộng trang *!*/
/* margin: 2rem auto; !* Căn giữa và tạo khoảng cách trên dưới *!*/
/* padding: 1rem;*/
/*}*/
.chatbot-page-container h1 {
margin-top: 20px;
text-align: center;
margin-bottom: 0.5rem;
font-size: 2em; /* Tăng kích thước chữ (điều chỉnh giá trị nếu cần) */
font-weight: bold; /* In đậm chữ */
color: green; /* Đổi màu chữ thành xanh lá cây */
padding: 10px; /* Thêm padding xung quanh chữ để tạo khoảng cách với đường viền */
border-radius: 5px; /* Bo tròn góc của đường viền (tùy chọn) */
}
.chatbot-page-container p {
text-align: center;
margin-bottom: 1.5rem;
color: #666;
}
/* --- Copy toàn bộ nội dung CSS của component Chatbot từ trước vào đây --- */
.chatbot-container {
width: 100%; /* Chiếm toàn bộ chiều rộng của container cha */
max-width: 700px; /* Giới hạn chiều rộng của box chat */
height: 75vh; /* Chiều cao của box chat */
border: 1px solid #ccc;
border-radius: 8px;
display: flex;
flex-direction: column;
overflow: hidden;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
background-color: #fff;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
margin: 0 auto;
margin-bottom: 100px; /* Thêm khoảng cách với footer */
}
/* Bỏ header nếu không cần */
/* .chatbot-header { ... } */
.chatbot-messages {
flex-grow: 1;
overflow-y: auto;
padding: 15px;
display: flex;
flex-direction: column;
/*gap: 10px;*/
padding-bottom: 0;
background-color: #f9f9f9;
}
/* ... (Rest of the CSS rules for .message, .message-content, .user, .model, .typing-indicator, .chatbot-input-area, input, button, etc. from the previous answer) ... */
/* --- Đảm bảo copy hết các rule CSS còn lại vào đây --- */
/* Ví dụ các rule còn lại */
.message { display: flex; max-width: 75%; margin-bottom: 10px; }
.message-content { padding: 10px 15px; border-radius: 18px; word-wrap: break-word; line-height: 1.4; font-size: 0.95em;}
.message.user { align-self: flex-end; }
.message.user .message-content { background-color: #0084ff; color: white; border-bottom-right-radius: 5px; }
.message.model { align-self: flex-start; }
.message.model .message-content { background-color: #e4e6eb; color: #050505; border-bottom-left-radius: 5px; }
.message.model.error-message .message-content { background-color: #ffebee; color: #c62828; border: 1px solid #ef9a9a; font-weight: 500; }
.typing-indicator { display: inline-block; padding: 10px 0; }
.typing-indicator span { height: 8px; width: 8px; background-color: #999; border-radius: 50%; display: inline-block; margin: 0 2px; animation: bounce 1.3s infinite ease-in-out; }
.typing-indicator span:nth-child(1) { animation-delay: -0.3s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.15s; }
.typing-indicator span:nth-child(3) { animation-delay: 0s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1.0); } }
.chatbot-input-area { display: flex; padding: 10px; border-top: 1px solid #ccc; background-color: #fff; flex-shrink: 0; }
.chatbot-input-area input { flex-grow: 1; padding: 10px 15px; border: 1px solid #ccc; border-radius: 20px; margin-right: 10px; outline: none; font-size: 1em; resize: none; }
.chatbot-input-area input:focus { border-color: #0084ff; }
.chatbot-input-area input:disabled { background-color: #f0f0f0; }
.chatbot-input-area button { padding: 10px 15px; background-color: #0084ff; color: white; border: none; border-radius: 20px; cursor: pointer; font-size: 1em; font-weight: 600; transition: background-color 0.2s ease; flex-shrink: 0; }
.chatbot-input-area button:hover:not(:disabled) { background-color: #0073e6; }
.chatbot-input-area button:disabled { background-color: #a0d2ff; cursor: not-allowed; }Editor is loading...
Leave a Comment