Spaces:
Sleeping
Sleeping
/* Reset */ | |
* { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
} | |
body { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
height: 100vh; | |
margin: 0; | |
font-family: Arial, sans-serif; | |
background-color: #f4f4f9; | |
} | |
.chat-container { | |
width: 100%; | |
max-width: 450px; | |
height: 90vh; | |
display: flex; | |
flex-direction: column; | |
border-radius: 12px; | |
overflow: hidden; | |
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); | |
background-color: #ffffff; | |
} | |
.chat-header { | |
padding: 16px; | |
background-color: #00796b; | |
color: white; | |
text-align: center; | |
font-weight: bold; | |
font-size: 1.2em; | |
} | |
.chat-box { | |
flex-grow: 1; | |
padding: 20px; | |
overflow-y: auto; | |
display: flex; | |
flex-direction: column; | |
gap: 10px; | |
background-color: #e5e5e5; | |
} | |
.chat-box .user-message, .chat-box .bot-message { | |
max-width: 75%; | |
padding: 12px 16px; | |
border-radius: 12px; | |
line-height: 1.4; | |
display: flex; | |
align-items: center; | |
position: relative; | |
font-size: 0.9em; | |
} | |
.user-message { | |
align-self: flex-end; | |
background-color: #00796b; | |
color: white; | |
border-bottom-right-radius: 2px; | |
border-bottom-left-radius: 12px; | |
} | |
.bot-message { | |
align-self: flex-start; | |
background-color: #f1f0f0; | |
color: #333; | |
border-bottom-left-radius: 2px; | |
border-bottom-right-radius: 12px; | |
} | |
.bot-message span, .user-message span { | |
font-size: 0.75em; | |
color: #999; | |
margin-right: 8px; | |
} | |
#typing-indicator { | |
font-style: italic; | |
color: #777; | |
display: none; | |
} | |
#chat-form { | |
display: flex; | |
gap: 5px; | |
padding: 10px; | |
background-color: #ffffff; | |
border-top: 1px solid #ddd; | |
} | |
#chat-form input { | |
flex: 1; | |
padding: 10px; | |
font-size: 1em; | |
border: 1px solid #ddd; | |
border-radius: 8px; | |
outline: none; | |
transition: border-color 0.2s; | |
} | |
#chat-form input:focus { | |
border-color: #00796b; | |
} | |
#chat-form button { | |
background-color: #00796b; | |
color: white; | |
border: none; | |
padding: 0 15px; | |
font-size: 1em; | |
border-radius: 8px; | |
cursor: pointer; | |
transition: background-color 0.2s; | |
} | |
#chat-form button:hover { | |
background-color: #005b4f; | |
} | |
#chat-form #clear-chat { | |
background-color: #ff5f5f; | |
} | |
#chat-form #clear-chat:hover { | |
background-color: #cc4a4a; | |
} | |