Multi-Rag / static /chat.css
VashuTheGreat's picture
Clean commit without images
1f725d8
/* static/chat.css */
.chat-layout {
display: flex;
height: calc(100vh - 70px);
gap: 0;
margin: -2rem -5%;
background: var(--bg-main);
}
/* === Sidebar === */
.chat-sidebar {
width: 300px;
flex-shrink: 0;
background: rgba(255,255,255,0.02);
border-right: 1px solid var(--border-color);
padding: 2rem 1.5rem;
display: flex;
flex-direction: column;
gap: 2rem;
overflow-y: auto;
}
.sidebar-header h2 {
font-size: 1.2rem;
font-weight: 700;
background: linear-gradient(135deg, #6d5dfc, #e92efb);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 0.25rem;
}
.sidebar-sub {
font-size: 0.78rem;
color: var(--text-secondary);
}
/* Connection Panel */
.connection-panel {
display: flex;
flex-direction: column;
gap: 0.9rem;
}
.status-indicator {
display: flex;
align-items: center;
gap: 0.6rem;
font-size: 0.85rem;
font-weight: 500;
}
.status-dot {
width: 9px;
height: 9px;
border-radius: 50%;
flex-shrink: 0;
}
.status-indicator.disconnected { color: var(--text-secondary); }
.status-indicator.disconnected .status-dot { background: #555; }
.status-indicator.connected { color: #4ade80; }
.status-indicator.connected .status-dot {
background: #4ade80;
box-shadow: 0 0 8px #4ade80;
animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
0%, 100% { opacity: 1; }
50% { opacity: 0.3; }
}
.btn-connect {
background: linear-gradient(135deg, #6d5dfc, #e92efb);
color: white;
border: none;
padding: 0.75rem 1rem;
border-radius: 12px;
font-weight: 600;
font-size: 0.88rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
transition: opacity 0.2s, transform 0.2s;
width: 100%;
}
.btn-connect:hover { opacity: 0.85; transform: translateY(-2px); }
.btn-connect:active { transform: scale(0.97); }
.btn-connect.loading { opacity: 0.6; cursor: not-allowed; }
/* Upload Panel */
.upload-panel { display: flex; flex-direction: column; gap: 0.6rem; }
.upload-label {
font-size: 0.85rem;
font-weight: 600;
color: var(--text-primary);
}
.upload-hint {
font-size: 0.75rem;
color: var(--text-secondary);
margin-top: -0.3rem;
}
.upload-zone {
border: 1.5px dashed rgba(109, 93, 252, 0.4);
border-radius: 14px;
padding: 1.5rem;
display: flex;
flex-direction: column;
align-items: center;
gap: 0.75rem;
cursor: pointer;
transition: border-color 0.3s, background 0.3s;
color: var(--text-secondary);
font-size: 0.82rem;
text-align: center;
}
.upload-zone:hover {
border-color: #6d5dfc;
background: rgba(109, 93, 252, 0.06);
color: var(--text-primary);
}
.upload-zone.dragover {
border-color: #6d5dfc;
background: rgba(109, 93, 252, 0.1);
}
.upload-zone.uploaded {
border-color: #4ade80;
background: rgba(74, 222, 128, 0.05);
color: #4ade80;
}
.upload-status {
font-size: 0.78rem;
color: #4ade80;
min-height: 1.2em;
}
.upload-status.error { color: #f87171; }
/* Session Info */
.session-info {
background: rgba(109, 93, 252, 0.06);
border: 1px solid rgba(109, 93, 252, 0.2);
border-radius: 12px;
padding: 1rem;
}
.session-label {
font-size: 0.72rem;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.06em;
margin-bottom: 0.3rem;
}
.session-id {
font-size: 0.75rem;
font-family: 'Courier New', monospace;
color: #a89dff;
word-break: break-all;
margin-bottom: 0.8rem;
}
.btn-reset {
background: transparent;
border: 1px solid var(--border-color);
color: var(--text-secondary);
padding: 0.4rem 0.8rem;
border-radius: 8px;
font-size: 0.78rem;
cursor: pointer;
transition: border-color 0.2s, color 0.2s;
width: 100%;
}
.btn-reset:hover { border-color: #f87171; color: #f87171; }
/* === Chat Main === */
.chat-main {
flex: 1;
display: flex;
flex-direction: column;
position: relative;
overflow: hidden;
}
/* Overlay */
.chat-overlay {
position: absolute;
inset: 0;
background: rgba(10, 11, 16, 0.85);
backdrop-filter: blur(4px);
display: flex;
align-items: center;
justify-content: center;
z-index: 10;
transition: opacity 0.4s ease;
}
.chat-overlay.hidden { opacity: 0; pointer-events: none; }
.overlay-card {
background: rgba(255,255,255,0.04);
border: 1px solid var(--border-color);
border-radius: 24px;
padding: 2.5rem;
max-width: 380px;
text-align: center;
}
.overlay-icon {
width: 70px;
height: 70px;
background: linear-gradient(135deg, rgba(109,93,252,0.2), rgba(233,46,251,0.1));
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 1.5rem;
color: #a89dff;
}
.overlay-card h3 {
font-size: 1.3rem;
margin-bottom: 0.75rem;
}
.overlay-card p {
color: var(--text-secondary);
font-size: 0.9rem;
line-height: 1.7;
}
.overlay-card strong { color: var(--accent); }
/* Messages */
.messages-container {
flex: 1;
overflow-y: auto;
padding: 2rem;
display: flex;
flex-direction: column;
gap: 1.2rem;
scroll-behavior: smooth;
}
.messages-container::-webkit-scrollbar { width: 5px; }
.messages-container::-webkit-scrollbar-track { background: transparent; }
.messages-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.message {
display: flex;
gap: 0.9rem;
animation: msgIn 0.3s ease;
max-width: 85%;
}
@keyframes msgIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.message.user { flex-direction: row-reverse; align-self: flex-end; }
.message.assistant { align-self: flex-start; }
.message-avatar {
width: 34px;
height: 34px;
border-radius: 50%;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.8rem;
font-weight: 700;
font-family: 'Outfit', sans-serif;
}
.message.user .message-avatar {
background: linear-gradient(135deg, #6d5dfc, #e92efb);
color: white;
}
.message.assistant .message-avatar {
background: rgba(255,255,255,0.07);
border: 1px solid var(--border-color);
color: var(--text-secondary);
}
.message-bubble {
background: rgba(255,255,255,0.04);
border: 1px solid var(--border-color);
border-radius: 18px;
padding: 0.85rem 1.1rem;
font-size: 0.9rem;
line-height: 1.65;
color: var(--text-primary);
word-break: break-word;
}
.message.user .message-bubble {
background: linear-gradient(135deg, rgba(109,93,252,0.2), rgba(233,46,251,0.1));
border-color: rgba(109,93,252,0.3);
}
/* Typing indicator */
.typing-indicator .message-bubble {
padding: 1rem 1.1rem;
display: flex;
gap: 4px;
align-items: center;
}
.typing-dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--text-secondary);
animation: typing 1.4s ease infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
30% { transform: translateY(-6px); opacity: 1; }
}
/* Input Area */
.input-area {
padding: 1.25rem 2rem;
border-top: 1px solid var(--border-color);
background: var(--bg-main);
}
.input-wrapper {
display: flex;
gap: 0.75rem;
align-items: flex-end;
background: rgba(255,255,255,0.04);
border: 1px solid var(--border-color);
border-radius: 16px;
padding: 0.75rem 1rem;
transition: border-color 0.2s;
}
.input-wrapper:focus-within { border-color: rgba(109,93,252,0.5); }
.input-wrapper textarea {
flex: 1;
background: transparent;
border: none;
outline: none;
color: var(--text-primary);
font-size: 0.9rem;
resize: none;
max-height: 150px;
line-height: 1.6;
font-family: 'Inter', sans-serif;
}
.input-wrapper textarea::placeholder { color: var(--text-secondary); }
.input-wrapper textarea:disabled { cursor: not-allowed; }
.send-btn {
background: linear-gradient(135deg, #6d5dfc, #e92efb);
border: none;
border-radius: 10px;
width: 38px;
height: 38px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
color: white;
flex-shrink: 0;
transition: opacity 0.2s, transform 0.2s;
}
.send-btn:hover:not(:disabled) { opacity: 0.85; transform: scale(1.05); }
.send-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.input-hint {
font-size: 0.72rem;
color: var(--text-secondary);
margin-top: 0.5rem;
padding: 0 0.25rem;
}
.input-hint kbd {
background: rgba(255,255,255,0.08);
border: 1px solid var(--border-color);
border-radius: 4px;
padding: 0.1rem 0.3rem;
font-size: 0.68rem;
font-family: monospace;
}
/* === Markdown rendering inside AI bubbles === */
.message.assistant .message-bubble h1,
.message.assistant .message-bubble h2,
.message.assistant .message-bubble h3 {
font-family: 'Outfit', sans-serif;
font-weight: 700;
margin: 0.75rem 0 0.4rem;
color: var(--text-primary);
line-height: 1.3;
}
.message.assistant .message-bubble h1 { font-size: 1.1rem; }
.message.assistant .message-bubble h2 { font-size: 1rem; }
.message.assistant .message-bubble h3 { font-size: 0.95rem; }
.message.assistant .message-bubble p { margin: 0.4rem 0; }
.message.assistant .message-bubble ul,
.message.assistant .message-bubble ol {
padding-left: 1.3rem;
margin: 0.4rem 0;
}
.message.assistant .message-bubble li { margin: 0.2rem 0; }
.message.assistant .message-bubble strong { color: #c4b8ff; }
.message.assistant .message-bubble code {
background: rgba(255,255,255,0.08);
border-radius: 4px;
padding: 0.1rem 0.35rem;
font-family: 'Courier New', monospace;
font-size: 0.85em;
color: #e2c4ff;
}
.message.assistant .message-bubble pre {
background: rgba(0,0,0,0.3);
border-radius: 8px;
padding: 0.75rem 1rem;
overflow-x: auto;
margin: 0.6rem 0;
}
.message.assistant .message-bubble pre code {
background: transparent;
padding: 0;
font-size: 0.82rem;
}
@media (max-width: 768px) {
.chat-layout { flex-direction: column; height: auto; }
.chat-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); }
.chat-main { height: 70vh; }
}