- User messages appear instantly with 'sending' state (dimmed, clock icon) - Transitions to 'sent' (checkmark) when server acknowledges - Shows error state (alert icon, retry visible) if send fails - Applied to both primary and secondary sessions
273 lines
6.3 KiB
CSS
273 lines
6.3 KiB
CSS
@import "tailwindcss";
|
|
@import "highlight.js/styles/base16/material-palenight.min.css";
|
|
|
|
@theme {
|
|
/* Theme-aware colors mapped to CSS custom properties */
|
|
--color-pc-base: var(--pc-bg-base);
|
|
--color-pc-surface: var(--pc-bg-surface);
|
|
--color-pc-elevated: var(--pc-bg-elevated);
|
|
--color-pc-input: var(--pc-bg-input);
|
|
--color-pc-code: var(--pc-bg-code);
|
|
--color-pc-border: var(--pc-border);
|
|
--color-pc-border-strong: var(--pc-border-strong);
|
|
--color-pc-text: var(--pc-text-primary);
|
|
--color-pc-text-secondary: var(--pc-text-secondary);
|
|
--color-pc-text-muted: var(--pc-text-muted);
|
|
--color-pc-text-faint: var(--pc-text-faint);
|
|
--color-pc-accent: var(--pc-accent);
|
|
--color-pc-accent-light: var(--pc-accent-light);
|
|
}
|
|
|
|
:root {
|
|
--pc-bg-base: #1e1e24;
|
|
--pc-bg-surface: #232329;
|
|
--pc-bg-elevated: #27272a;
|
|
--pc-bg-input: #1a1a20;
|
|
--pc-bg-sidebar: rgba(30,30,36,0.95);
|
|
--pc-bg-code: #1a1a20;
|
|
--pc-border: rgba(255,255,255,0.08);
|
|
--pc-border-strong: rgba(255,255,255,0.1);
|
|
--pc-text-primary: #d4d4d8;
|
|
--pc-text-secondary: #a1a1aa;
|
|
--pc-text-muted: #71717a;
|
|
--pc-text-faint: #52525b;
|
|
--pc-scrollbar-thumb: #52525b;
|
|
--pc-scrollbar-track: #27272a;
|
|
--pc-scrollbar-thumb-hover: #71717a;
|
|
--pc-accent: #22d3ee;
|
|
--pc-accent-light: #67e8f9;
|
|
--pc-accent-dim: rgba(34,211,238,0.3);
|
|
--pc-accent-glow: rgba(34,211,238,0.1);
|
|
--pc-accent-rgb: 34,211,238;
|
|
--pc-hover: rgba(255,255,255,0.05);
|
|
--pc-hover-strong: rgba(255,255,255,0.08);
|
|
--pc-separator: rgba(255,255,255,0.05);
|
|
}
|
|
|
|
* {
|
|
scrollbar-width: thin;
|
|
scrollbar-color: var(--pc-scrollbar-thumb) var(--pc-scrollbar-track);
|
|
}
|
|
|
|
/* WebKit scrollbar styling (Chrome, Safari, Edge) */
|
|
::-webkit-scrollbar {
|
|
width: 6px;
|
|
height: 6px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: var(--pc-scrollbar-thumb);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: var(--pc-scrollbar-thumb-hover);
|
|
}
|
|
|
|
/* Textarea-specific: even thinner scrollbar, no horizontal scroll */
|
|
textarea::-webkit-scrollbar {
|
|
width: 4px;
|
|
height: 0;
|
|
}
|
|
|
|
textarea::-webkit-scrollbar:horizontal {
|
|
display: none;
|
|
}
|
|
|
|
textarea::-webkit-scrollbar-thumb {
|
|
background: var(--pc-scrollbar-thumb);
|
|
border-radius: 2px;
|
|
}
|
|
|
|
textarea::-webkit-scrollbar-thumb:hover {
|
|
background: var(--pc-scrollbar-thumb-hover);
|
|
}
|
|
|
|
textarea {
|
|
overflow-x: hidden;
|
|
overflow-y: auto;
|
|
overflow-wrap: break-word;
|
|
word-break: break-word;
|
|
}
|
|
|
|
html, body {
|
|
margin: 0;
|
|
background: var(--pc-bg-base);
|
|
color: var(--pc-text-primary);
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
overflow-x: hidden;
|
|
max-width: 100vw;
|
|
}
|
|
|
|
@keyframes fade-in {
|
|
from { opacity: 0; transform: translateY(8px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
@keyframes pulse-dot {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.4; }
|
|
}
|
|
|
|
@keyframes bounce-dot {
|
|
0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
|
|
40% { transform: translateY(-4px); opacity: 1; }
|
|
}
|
|
|
|
.animate-fade-in {
|
|
animation: fade-in 0.3s ease-out;
|
|
}
|
|
|
|
.pulse-dot {
|
|
animation: pulse-dot 2s ease-in-out infinite;
|
|
}
|
|
|
|
.bounce-dot {
|
|
animation: bounce-dot 0.9s infinite ease-in-out;
|
|
}
|
|
.bounce-dot:nth-child(1) { animation-delay: 0s; }
|
|
.bounce-dot:nth-child(2) { animation-delay: 0.12s; }
|
|
.bounce-dot:nth-child(3) { animation-delay: 0.24s; }
|
|
|
|
/* Markdown styles */
|
|
.markdown-body pre {
|
|
background: var(--pc-bg-code) !important;
|
|
border: 1px solid var(--pc-border);
|
|
border-radius: 12px;
|
|
padding: 16px;
|
|
overflow-x: auto;
|
|
margin: 8px 0;
|
|
font-size: 0.82em;
|
|
line-height: 1.6;
|
|
max-width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body pre code {
|
|
white-space: pre;
|
|
word-break: normal;
|
|
overflow-wrap: normal;
|
|
}
|
|
|
|
.markdown-body code {
|
|
background: var(--pc-accent-glow);
|
|
padding: 2px 6px;
|
|
border-radius: 6px;
|
|
font-size: 0.85em;
|
|
}
|
|
|
|
/* Override highlight.js theme bg to match */
|
|
.hljs {
|
|
background: var(--pc-bg-code) !important;
|
|
}
|
|
|
|
.markdown-body p { margin: 4px 0; }
|
|
.markdown-body ul, .markdown-body ol { margin: 4px 0; padding-left: 20px; }
|
|
.markdown-body blockquote { border-left: 3px solid var(--pc-accent-dim); padding-left: 12px; margin: 8px 0; opacity: 0.8; }
|
|
.markdown-body h1, .markdown-body h2, .markdown-body h3 { margin: 12px 0 4px; }
|
|
.markdown-body a { color: var(--pc-accent-light); text-decoration: underline; }
|
|
.markdown-body table { border-collapse: collapse; margin: 8px 0; display: block; overflow-x: auto; max-width: 100%; }
|
|
.markdown-body th, .markdown-body td { border: 1px solid var(--pc-border); padding: 6px 12px; }
|
|
.markdown-body th { background: var(--pc-accent-glow); }
|
|
.markdown-body img { max-width: 100%; border-radius: 8px; }
|
|
|
|
/* Highlighted textarea overlay */
|
|
.ht-container {
|
|
position: relative;
|
|
flex: 1;
|
|
}
|
|
|
|
.ht-backdrop,
|
|
.ht-textarea {
|
|
/* Must share identical text layout */
|
|
font-family: inherit;
|
|
font-size: 0.875rem; /* text-sm */
|
|
line-height: 1.25rem;
|
|
padding: 0.75rem 1rem; /* py-3 px-4 */
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
overflow-wrap: break-word;
|
|
overflow-x: hidden;
|
|
overflow-y: auto;
|
|
margin: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.ht-backdrop {
|
|
position: absolute;
|
|
inset: 0;
|
|
pointer-events: none;
|
|
color: var(--pc-text-primary);
|
|
border: 1px solid transparent;
|
|
border-radius: 1rem; /* rounded-2xl */
|
|
max-height: 200px;
|
|
}
|
|
|
|
.ht-textarea {
|
|
position: relative;
|
|
color: transparent;
|
|
caret-color: var(--pc-text-primary);
|
|
background: transparent !important;
|
|
resize: none;
|
|
z-index: 1;
|
|
}
|
|
|
|
/* Token colors */
|
|
.ht-code-block {
|
|
color: #67e8f9; /* cyan-300 */
|
|
background: var(--pc-accent-glow);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.ht-inline-code {
|
|
color: #67e8f9;
|
|
background: var(--pc-accent-glow);
|
|
border-radius: 3px;
|
|
padding: 0 2px;
|
|
}
|
|
|
|
.ht-bold {
|
|
color: var(--pc-text-primary);
|
|
font-weight: 700;
|
|
}
|
|
|
|
.ht-italic {
|
|
color: var(--pc-text-secondary);
|
|
font-style: italic;
|
|
}
|
|
|
|
.ht-heading {
|
|
color: #a78bfa; /* violet-400 */
|
|
font-weight: 600;
|
|
}
|
|
|
|
.ht-link {
|
|
color: #67e8f9;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* Accessibility: respect reduced-motion preferences */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.animate-fade-in {
|
|
animation: none;
|
|
}
|
|
.pulse-dot {
|
|
animation: none;
|
|
}
|
|
.bounce-dot {
|
|
animation: none;
|
|
opacity: 0.7;
|
|
}
|
|
*,
|
|
*::before,
|
|
*::after {
|
|
transition-duration: 0.01ms !important;
|
|
animation-duration: 0.01ms !important;
|
|
animation-iteration-count: 1 !important;
|
|
}
|
|
}
|