chatbot-test-william
Version:
A flexible and customizable React chat component that supports context-aware conversations and document processing
238 lines (204 loc) • 3.99 kB
CSS
@import url(https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap);
body {
font-family: "Poppins", sans-serif;
}
.App {
text-align: center;
display: flex;
}
.App-logo {
height: 40vmin;
pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}
.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
.App-link {
color: #61dafb;
}
@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.message-bubble {
display: flex;
border-radius: 0.25rem;
padding: 0.5rem 1rem;
max-width: 80%;
margin-bottom: 2rem;
}
.message-bubble-user {
background-color: #033E7D;
margin-left: auto;
color: #f7f8fa;
}
.message-bubble-ai {
background-color: white;
margin-right: auto;
color: #000;
}
.message-prefix {
margin-right: 0.5rem;
}
.message-content {
white-space: pre-wrap;
display: flex;
flex-direction: column;
}
.chat-window {
flex: 1;
flex-direction: column;
overflow: hidden;
position: absolute;
bottom: 80px;
right: 20px;
border-radius: 10px;
width: 400px;
}
.chat-window.light-theme {
background-color: #fff;
color: #000;
}
.chat-window.dark-theme {
background-color: #000;
color: #fff;
}
.chat-button {
position: fixed;
bottom: 20px;
right: 20px;
background-color: #033E7D;
border-radius: 50%;
margin: 10px;
border: none;
cursor: pointer;
font-size: 48px;
color: white;
}
.form-container {
display: flex;
flex-direction: column;
background-color: #033E7D;
}
.input-field {
flex: 1;
padding: 8px 12px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 14px;
resize: none;
height: 32px ;
min-height: 32px ;
max-height: 96px;
overflow-y: auto;
line-height: 1.5;
width: 100%;
margin: 0;
}
.input-field:focus {
height: 32px ;
min-height: 32px ;
}
.submit-button {
flex-shrink: 0;
padding: 0.5rem 2rem;
border-radius: 0.25rem;
border: none;
font-weight: 600;
background-color: white;
height: fit-content;
align-self: center;
color: #033E7D;
}
.chat-input {
display: flex;
gap: 8px;
padding: 10px;
align-items: center;
}
.chat-container {
height: 400px;
overflow: auto;
margin: 10px;
display: flex;
flex-direction: column-reverse;
}
.chat-container::-webkit-scrollbar {
display: none;
}
.chat-header {
background-color: #033E7D;
padding: 10px 20px;
color: #fff;
font-weight: bold;
margin-bottom: 20px;
}
.theme-toggle-button {
border: none;
background: none;
padding: 0;
cursor: pointer;
color: #033E7D;
}
.icon-wrapper {
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 50%;
padding: 5px;
background-color: #f0f0f0;
}
.icon-wrapper.dark-mode {
background-color: #000;
color: white;
}
.upload-button {
padding: 4px 8px ;
font-size: 12px ;
cursor: pointer;
}
.upload-button:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.uploaded-file-name {
padding: 4px 8px;
border-radius: 4px;
max-width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.dark-theme .uploaded-file-name {
background-color: #374151;
color: #fff;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
"Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
"Helvetica Neue", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}
/* src/styles/index.css */