rag-chatbot / frontend /static /css /style.css
Abeshith's picture
RAG Chatbot with LangChain, FastAPI, and service layer architecture
64d7fdf
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background: #f5f5f5;
color: #333;
}
.container {
display: flex;
height: 100vh;
}
.sidebar {
width: 300px;
background: #fff;
border-right: 1px solid #e0e0e0;
display: flex;
flex-direction: column;
}
.sidebar-header {
padding: 20px;
border-bottom: 1px solid #e0e0e0;
}
.sidebar-header h2 {
font-size: 18px;
font-weight: 600;
}
.upload-section {
padding: 20px;
border-bottom: 1px solid #e0e0e0;
}
.btn-upload {
width: 100%;
padding: 12px;
background: #007bff;
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: background 0.2s;
}
.btn-upload:hover {
background: #0056b3;
}
.document-list {
flex: 1;
overflow-y: auto;
padding: 10px;
}
.document-item {
padding: 12px;
margin-bottom: 8px;
background: #f8f9fa;
border-radius: 6px;
display: flex;
justify-content: space-between;
align-items: center;
}
.document-item:hover {
background: #e9ecef;
}
.document-name {
font-size: 14px;
flex: 1;
}
.btn-delete {
padding: 6px 12px;
background: #dc3545;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 12px;
}
.btn-delete:hover {
background: #c82333;
}
.main-content {
flex: 1;
display: flex;
flex-direction: column;
background: #fff;
}
.chat-header {
padding: 20px;
border-bottom: 1px solid #e0e0e0;
display: flex;
justify-content: space-between;
align-items: center;
}
.chat-header h1 {
font-size: 24px;
font-weight: 600;
}
.toggle-rag {
display: flex;
align-items: center;
gap: 8px;
}
.toggle-rag label {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
}
.chat-messages {
flex: 1;
overflow-y: auto;
padding: 20px;
display: flex;
flex-direction: column;
gap: 16px;
}
.message {
max-width: 70%;
padding: 12px 16px;
border-radius: 12px;
line-height: 1.5;
font-size: 14px;
}
.message.user {
align-self: flex-end;
background: #007bff;
color: white;
}
.message.assistant {
align-self: flex-start;
background: #f1f3f4;
color: #333;
}
.message.loading {
align-self: flex-start;
background: #f1f3f4;
color: #666;
font-style: italic;
}
.chat-input {
padding: 20px;
border-top: 1px solid #e0e0e0;
display: flex;
gap: 12px;
}
#messageInput {
flex: 1;
padding: 12px 16px;
border: 1px solid #e0e0e0;
border-radius: 24px;
font-size: 14px;
outline: none;
}
#messageInput:focus {
border-color: #007bff;
}
.btn-send {
padding: 12px 24px;
background: #007bff;
color: white;
border: none;
border-radius: 24px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: background 0.2s;
}
.btn-send:hover {
background: #0056b3;
}
.btn-send:disabled {
background: #ccc;
cursor: not-allowed;
}
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: #888;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #555;
}