106 lines
1.7 KiB
CSS
106 lines
1.7 KiB
CSS
.chat-container {
|
|
position: fixed;
|
|
bottom: 50px;
|
|
left: 0;
|
|
width: 100%;
|
|
background: #fff;
|
|
box-shadow: 0 -2px 5px #fff;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
|
|
.chat-box {
|
|
width: 90%;
|
|
min-height: 20px;
|
|
max-height: 50vh;
|
|
overflow-y: auto;
|
|
background: #f5f5f5;
|
|
margin-bottom: 10px;
|
|
padding: 10px;
|
|
border-radius: 8px;
|
|
position: relative;
|
|
z-index: 10;
|
|
display: none;
|
|
}
|
|
|
|
.chat-box.show {
|
|
animation: slideUp 0.3s ease-out forwards;
|
|
}
|
|
|
|
.chat-box.hide {
|
|
animation: slideDown 0.3s ease-in forwards;
|
|
}
|
|
|
|
.message {
|
|
margin: 5px 0;
|
|
padding: 10px 15px;
|
|
max-width: fit-content;
|
|
border-radius: 12px;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.message.user {
|
|
background-color: #daf1fc;
|
|
align-self: flex-end;
|
|
text-align: left;
|
|
margin-left: auto;
|
|
}
|
|
|
|
.message.bot {
|
|
background-color: #eee;
|
|
align-self: flex-start;
|
|
text-align: left;
|
|
margin-right: auto;
|
|
}
|
|
|
|
.input-row {
|
|
display: flex;
|
|
justify-content: center;
|
|
width: 90%;
|
|
gap: 10px;
|
|
}
|
|
|
|
#userInput {
|
|
flex: 1;
|
|
padding: 10px;
|
|
font-size: 16px;
|
|
border: 1px solid #ccc;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
button {
|
|
padding: 10px 16px;
|
|
font-size: 16px;
|
|
border: none;
|
|
background-color: #007BFF;
|
|
color: white;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
button:hover {
|
|
background-color: #0056b3;
|
|
}
|
|
|
|
@keyframes slideUp {
|
|
from {
|
|
transform: translateY(100%);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes slideDown {
|
|
from {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
transform: translateY(100%);
|
|
opacity: 0;
|
|
}
|
|
} |