131 lines
2.5 KiB
CSS
131 lines
2.5 KiB
CSS
/* Chat Widget */
|
|
.chat-widget-fab {
|
|
position: fixed;
|
|
bottom: 2rem;
|
|
right: 2rem;
|
|
width: 4rem;
|
|
height: 4rem;
|
|
border-radius: 50%;
|
|
background-color: #0d6efd;
|
|
color: white;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1.75rem;
|
|
cursor: pointer;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
transition: transform 0.2s ease-in-out;
|
|
}
|
|
|
|
.chat-widget-fab:hover {
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.chat-window {
|
|
position: fixed;
|
|
bottom: 7rem;
|
|
right: 2rem;
|
|
width: 370px;
|
|
max-width: 90vw;
|
|
height: 500px;
|
|
background: white;
|
|
border-radius: 0.75rem;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
transform: scale(0.95);
|
|
opacity: 0;
|
|
transition: transform 0.2s ease-out, opacity 0.2s ease-out;
|
|
transform-origin: bottom right;
|
|
display: none; /* Initially hidden */
|
|
}
|
|
|
|
.chat-window.open {
|
|
display: flex; /* Show when open */
|
|
transform: scale(1);
|
|
opacity: 1;
|
|
}
|
|
|
|
.chat-header {
|
|
background: linear-gradient(to right, #0d6efd, #4ea8ff);
|
|
color: white;
|
|
padding: 1rem;
|
|
font-weight: bold;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.chat-header .btn-close {
|
|
filter: invert(1) grayscale(100%) brightness(200%);
|
|
}
|
|
|
|
.chat-body {
|
|
flex-grow: 1;
|
|
padding: 1rem;
|
|
overflow-y: auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.chat-message {
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 1.25rem;
|
|
max-width: 80%;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.chat-message.user {
|
|
background-color: #0d6efd;
|
|
color: white;
|
|
align-self: flex-end;
|
|
border-bottom-right-radius: 0.25rem;
|
|
}
|
|
|
|
.chat-message.bot {
|
|
background-color: #e9ecef;
|
|
color: #333;
|
|
align-self: flex-start;
|
|
border-bottom-left-radius: 0.25rem;
|
|
}
|
|
|
|
.chat-footer {
|
|
padding: 1rem;
|
|
border-top: 1px solid #dee2e6;
|
|
}
|
|
|
|
/* Typing Indicator */
|
|
.typing-indicator {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0.5rem 1rem;
|
|
}
|
|
|
|
.typing-indicator .dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
margin: 0 2px;
|
|
background-color: #adb5bd;
|
|
border-radius: 50%;
|
|
animation: typing 1.4s infinite;
|
|
}
|
|
|
|
.typing-indicator .dot:nth-child(2) {
|
|
animation-delay: 0.2s;
|
|
}
|
|
|
|
.typing-indicator .dot:nth-child(3) {
|
|
animation-delay: 0.4s;
|
|
}
|
|
|
|
@keyframes typing {
|
|
0%, 80%, 100% {
|
|
transform: scale(0);
|
|
}
|
|
40% {
|
|
transform: scale(1.0);
|
|
}
|
|
}
|