425 lines
8.4 KiB
CSS
425 lines
8.4 KiB
CSS
|
|
:root {
|
|
--bg: #0b1020;
|
|
--panel: #141b34;
|
|
--text: #e6e8ef;
|
|
--muted: #9aa3b2;
|
|
--accent: #6ea8fe;
|
|
--border: #24304f;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
html, body, #root { height: 100%; margin: 0; }
|
|
body { background: var(--bg); color: var(--text); font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial; }
|
|
|
|
.no-select {
|
|
user-select: none;
|
|
cursor: ew-resize !important;
|
|
}
|
|
|
|
.app {
|
|
display: grid;
|
|
grid-template-columns: var(--sidebar-width, 280px) 1fr; /* Sidebar width and main content */
|
|
grid-template-rows: 1fr;
|
|
height: 100%;
|
|
}
|
|
|
|
.sidebar {
|
|
display: grid;
|
|
grid-template-rows: auto 1fr auto;
|
|
background: var(--panel);
|
|
border-right: 1px solid var(--border);
|
|
height: 100vh; /* Use viewport height to prevent window scrolling */
|
|
overflow: hidden; /* Prevent the entire sidebar from scrolling */
|
|
position: relative; /* For resizer positioning */
|
|
}
|
|
|
|
.resizer {
|
|
width: 13px; /* 8px original + 5px to the right */
|
|
cursor: ew-resize;
|
|
background: transparent;
|
|
position: absolute;
|
|
top: 0;
|
|
right: -5px; /* Adjust to center the wider resizer */
|
|
bottom: 0;
|
|
z-index: 1;
|
|
}
|
|
/* Removed .resizer:hover as per user request */
|
|
|
|
.sidebar-header {
|
|
display: flex;
|
|
justify-content: space-around;
|
|
padding: 0; /* Remove padding to allow tabs to fill */
|
|
border-bottom: 1px solid var(--border);
|
|
background: var(--panel);
|
|
}
|
|
|
|
.sidebar-tab {
|
|
flex-grow: 1;
|
|
text-align: center;
|
|
padding: 12px 16px;
|
|
cursor: pointer;
|
|
border-bottom: 3px solid transparent; /* For active indicator */
|
|
transition: background-color 0.2s ease;
|
|
}
|
|
|
|
.sidebar-tab:hover {
|
|
background-color: rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
.sidebar-tab.active {
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
border-bottom-color: var(--accent);
|
|
}
|
|
|
|
.sidebar-content {
|
|
flex-grow: 1;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.db-list, .settings-list {
|
|
padding: 8px 0;
|
|
}
|
|
|
|
.empty-list-message {
|
|
padding: 10px 16px;
|
|
color: var(--muted);
|
|
text-align: center;
|
|
}
|
|
|
|
.settings-item {
|
|
padding: 10px 16px;
|
|
cursor: pointer;
|
|
border-left: 3px solid transparent; /* For active indicator */
|
|
}
|
|
|
|
.settings-item.active {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border-left-color: var(--accent);
|
|
}
|
|
|
|
.settings-item:hover {
|
|
background: rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
.settings-footer-placeholder {
|
|
height: 40px; /* Match button height for alignment */
|
|
padding: 12px 16px;
|
|
border-top: 1px solid var(--border);
|
|
background: var(--panel);
|
|
}
|
|
|
|
.new-db-button {
|
|
width: 100%;
|
|
padding: 10px;
|
|
background: var(--accent);
|
|
border-color: var(--accent);
|
|
color: var(--bg);
|
|
font-weight: bold;
|
|
}
|
|
|
|
.new-db-button:hover {
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.chat-list {
|
|
overflow-y: auto;
|
|
padding: 8px 0;
|
|
}
|
|
|
|
.chat-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 10px 16px;
|
|
cursor: pointer;
|
|
border-left: 3px solid transparent; /* For active indicator */
|
|
/* For truncating text */
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.chat-item span {
|
|
flex-grow: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.chat-item-buttons {
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: center;
|
|
}
|
|
|
|
.unread-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
background-color: red;
|
|
border-radius: 50%;
|
|
margin-right: 4px;
|
|
}
|
|
|
|
.icon-button {
|
|
background: none;
|
|
border: none;
|
|
color: var(--muted);
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
padding: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.icon-button svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
stroke: var(--muted);
|
|
transition: stroke 0.2s ease;
|
|
}
|
|
|
|
.icon-button:hover svg {
|
|
stroke: var(--accent);
|
|
}
|
|
|
|
.icon-button:hover {
|
|
color: var(--accent);
|
|
}
|
|
|
|
.chat-item.active {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border-left-color: var(--accent);
|
|
}
|
|
|
|
.chat-item:hover {
|
|
background: rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
.rename-input {
|
|
background: var(--input-bg);
|
|
border: 1px solid var(--accent);
|
|
color: var(--text);
|
|
border-radius: 10px;
|
|
padding: 8px 12px;
|
|
outline: none;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Scrollbar Styles */
|
|
::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: var(--muted);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: var(--accent);
|
|
}
|
|
|
|
.sidebar-footer {
|
|
padding: 12px 16px;
|
|
border-top: 1px solid var(--border);
|
|
background: var(--panel);
|
|
}
|
|
|
|
.new-chat-button {
|
|
width: 100%;
|
|
padding: 10px;
|
|
background: var(--accent);
|
|
border-color: var(--accent);
|
|
color: var(--bg);
|
|
font-weight: bold;
|
|
}
|
|
|
|
.new-chat-button:hover {
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.main-content {
|
|
display: grid;
|
|
grid-template-rows: auto 1fr auto;
|
|
height: 100vh; /* Use viewport height to prevent window scrolling */
|
|
overflow: hidden; /* Prevent the entire main content from scrolling */
|
|
}
|
|
|
|
.header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--border);
|
|
background: var(--panel);
|
|
}
|
|
|
|
.select, .input, .button {
|
|
background: var(--input-bg);
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
border-radius: 10px;
|
|
padding: 8px 12px;
|
|
outline: none;
|
|
}
|
|
|
|
.footer-content-wrapper .button {
|
|
flex-shrink: 0; /* Prevent the button from shrinking */
|
|
}
|
|
|
|
.select { min-width: 220px; }
|
|
.button { cursor: pointer; }
|
|
.button:hover { border-color: var(--accent); }
|
|
|
|
.chat {
|
|
display: grid;
|
|
grid-template-columns: 1fr minmax(auto, 1000px) 1fr;
|
|
align-content: start;
|
|
gap: 8px;
|
|
padding: 16px;
|
|
overflow: auto;
|
|
}
|
|
|
|
.chat > * {
|
|
grid-column: 2;
|
|
}
|
|
|
|
.msg {
|
|
padding: 12px 14px;
|
|
border-radius: 12px;
|
|
line-height: 1.5;
|
|
white-space: pre-wrap;
|
|
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial; /* Match body font */
|
|
}
|
|
|
|
textarea.input {
|
|
resize: none; /* Disable manual resizing */
|
|
font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial; /* Match body font */
|
|
overflow-y: auto; /* Add scrollbar when content exceeds max-height */
|
|
flex-grow: 1; /* Allow textarea to take up available space */
|
|
}
|
|
|
|
.msg.user {
|
|
background: var(--user-msg-bg);
|
|
margin-left: auto; /* Right-align user messages */
|
|
max-width: 800px;
|
|
border: 1px solid var(--border);
|
|
}
|
|
.msg.assistant {
|
|
background: transparent;
|
|
border: none;
|
|
max-width: none; /* Remove max-width for assistant messages */
|
|
}
|
|
|
|
.footer {
|
|
display: flex; /* Use flexbox for centering content */
|
|
justify-content: center; /* Center the content horizontally */
|
|
padding: 12px 16px;
|
|
border-top: 1px solid var(--border);
|
|
background: var(--panel);
|
|
align-items: flex-end; /* Align items to the bottom */
|
|
}
|
|
|
|
.footer-content-wrapper {
|
|
display: flex; /* Arrange textarea and button side-by-side */
|
|
gap: 8px; /* Space between textarea and button */
|
|
width: 100%; /* Take full width of its parent (footer) */
|
|
max-width: 1000px; /* Max width for the content */
|
|
align-items: flex-end; /* Align items to the bottom */
|
|
}
|
|
|
|
/* Settings Page Styles (removed nested sidebar styles) */
|
|
/* The main .app grid and .sidebar will handle settings navigation */
|
|
|
|
.settings-content-panel {
|
|
padding: 20px;
|
|
overflow-y: auto;
|
|
height: 100%; /* Ensure it takes full height of its parent */
|
|
}
|
|
|
|
.settings-category {
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.settings-category h2 {
|
|
color: var(--accent);
|
|
margin-bottom: 15px;
|
|
font-size: 1.3em;
|
|
}
|
|
|
|
.setting-section {
|
|
margin-bottom: 20px;
|
|
padding: 15px; /* Adjusted padding */
|
|
border-bottom: 1px solid var(--border);
|
|
background-color: var(--panel); /* Background for setting sections */
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.setting-section:last-child {
|
|
border-bottom: none;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.setting-section h3 {
|
|
color: var(--text);
|
|
margin-top: 0;
|
|
margin-bottom: 10px;
|
|
font-size: 1.1em;
|
|
}
|
|
|
|
/* Re-apply general input/select styles for settings components */
|
|
.settings-content-panel .input,
|
|
.settings-content-panel .select {
|
|
width: 100%;
|
|
max-width: 400px;
|
|
padding: 10px 12px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--border);
|
|
background-color: var(--input-bg);
|
|
color: var(--text);
|
|
font-size: 1em;
|
|
}
|
|
|
|
.settings-content-panel .select {
|
|
min-width: unset;
|
|
}
|
|
|
|
/* Markdown Styles */
|
|
.msg h1, .msg h2, .msg h3, .msg h4 {
|
|
margin: 10px 0;
|
|
color: var(--accent);
|
|
}
|
|
|
|
.msg ul {
|
|
padding-left: 20px;
|
|
}
|
|
|
|
.msg li {
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.msg code {
|
|
background-color: var(--input-bg);
|
|
padding: 2px 4px;
|
|
border-radius: 4px;
|
|
font-family: monospace;
|
|
}
|
|
|
|
.msg pre {
|
|
background-color: var(--input-bg);
|
|
padding: 10px;
|
|
border-radius: 8px;
|
|
overflow-x: auto;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
.msg pre code {
|
|
padding: 0;
|
|
background-color: transparent;
|
|
}
|