chat-assistant-dit
Version:
A lightweight, customizable chat assistant widget for web and React apps.
105 lines (91 loc) • 1.72 kB
CSS
#chat-widget-container {
position: fixed;
bottom: 20px;
right: 20px;
font-family: Arial, sans-serif;
z-index: 10000;
}
/* Chat Bubble */
.chat-button {
background: #007bff;
color: #fff;
width: 56px;
height: 56px;
border-radius: 50%;
font-size: 24px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
transition: background 0.3s ease;
}
.chat-button:hover {
background: #0056b3;
}
/* Chat Window */
.chat-box {
position: absolute;
bottom: 70px;
right: 0;
width: 320px;
height: 420px;
background: white;
border-radius: 12px;
box-shadow: 0 6px 18px rgba(0,0,0,0.3);
display: flex;
flex-direction: column;
overflow: hidden;
transition: all 0.3s ease;
}
.hidden {
display: none;
}
.chat-header {
background: #007bff;
color: white;
padding: 12px;
display: flex;
justify-content: space-between;
align-items: center;
}
.chat-messages {
flex: 1;
padding: 12px;
overflow-y: auto;
background: #f7f7f7;
}
.chat-message {
margin-bottom: 10px;
padding: 8px 10px;
border-radius: 8px;
max-width: 85%;
}
.chat-message.user {
background: #d1e7ff;
align-self: flex-end;
}
.chat-message.bot {
background: #eaeaea;
align-self: flex-start;
}
.chat-form {
display: flex;
border-top: 1px solid #ddd;
}
.chat-form input {
flex: 1;
padding: 10px;
border: none;
font-size: 14px;
}
.chat-form button {
padding: 10px 16px;
border: none;
background: #007bff;
color: white;
cursor: pointer;
}
.chat-form button:hover {
background: #0056b3;
}