chat / public /css /chat.css
incognitolm
CSS Fix
774fd42
Raw
History Blame
9.3 kB
/* ── Main layout ─────────────────────────────────────────────────────────── */
#main {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
position: relative;
}
/* ── Welcome view ────────────────────────────────────────────────────────── */
.welcome-view {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40px 24px;
gap: 32px;
}
.welcome-title {
font-size: clamp(26px, 4vw, 44px);
font-weight: 300;
letter-spacing: -0.03em;
color: var(--text);
text-align: center;
}
.welcome-input-wrap {
width: 100%;
max-width: 760px;
}
/* ── Chat view ───────────────────────────────────────────────────────────── */
.chat-view {
flex: 1;
overflow-y: auto;
padding: 24px 0 8px;
display: flex;
flex-direction: column;
}
.chat-messages {
width: 100%;
max-width: 780px;
margin: 0 auto;
padding: 0 24px;
display: flex;
flex-direction: column;
gap: 4px;
}
/* ── Message bubbles ─────────────────────────────────────────────────────── */
.msg-group {
display: flex;
flex-direction: column;
gap: 2px;
position: relative;
}
/* User bubble */
.msg-user {
align-self: flex-end;
max-width: 78%;
padding: 10px 16px;
background: var(--bg-raised);
border: 1px solid var(--border);
border-radius: 18px 18px 4px 18px;
font-size: 15px;
color: var(--text);
word-break: break-word;
position: relative;
}
/* Assistant bubble - transparent */
.msg-assistant {
align-self: flex-start;
max-width: 92%;
padding: 4px 0 24px;
font-size: 15px;
color: var(--text);
word-break: break-word;
position: relative;
}
.msg-assistant.editing {
background: #1e2028;
border: 1px solid var(--border-bright);
border-radius: var(--radius-lg);
padding: 14px 16px 50px;
}
/* Version navigator */
.msg-version-nav {
position: absolute;
bottom: -4px;
right: 0;
display: flex;
align-items: center;
gap: 4px;
font-size: 12px;
color: var(--text-muted);
opacity: 0;
transition: opacity var(--transition);
}
.msg-group:hover .msg-version-nav { opacity: 1; }
.msg-version-nav button {
display: flex; align-items: center; justify-content: center;
width: 20px; height: 20px; border-radius: 50%;
color: var(--text-muted);
transition: color var(--transition), background var(--transition);
}
.msg-version-nav button:hover { color: var(--text); background: var(--bg-hover); }
/* Message actions */
.msg-actions {
position: absolute;
bottom: 4px;
left: 0;
display: flex;
gap: 3px;
opacity: 0;
transition: opacity var(--transition);
pointer-events: none;
}
.msg-group:hover .msg-actions {
opacity: 1;
pointer-events: auto;
}
.msg-action-btn {
display: flex; align-items: center; justify-content: center;
width: 26px; height: 26px;
border-radius: var(--radius-sm);
color: var(--text-muted);
transition: color var(--transition), background var(--transition);
}
.msg-action-btn:hover { color: var(--text); background: var(--bg-hover); }
/* Edit toolbar in bubble */
.edit-actions {
position: absolute;
bottom: 10px;
right: 12px;
display: flex;
gap: 6px;
}
/* Thinking animation */
.msg-thinking {
display: flex; gap: 4px; align-items: center;
padding: 10px 0;
}
.thinking-dot {
width: 6px; height: 6px; border-radius: 50%;
background: var(--text-muted);
animation: thinkBounce 1.4s infinite ease-in-out;
}
.thinking-dot:nth-child(2) { animation-delay: 0.2s; }
.thinking-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes thinkBounce {
0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
40% { transform: translateY(-6px); opacity: 1; }
}
/* Code blocks */
.code-block {
margin: 10px 0;
border-radius: var(--radius-md);
overflow: hidden;
border: 1px solid var(--border);
background: #0d0e11;
}
[data-theme="light"] .code-block { background: #1a1b20; }
.code-header {
display: flex; align-items: center; justify-content: space-between;
padding: 6px 14px;
background: rgba(255,255,255,0.04);
border-bottom: 1px solid var(--border);
}
.code-lang {
font-size: 12px; font-family: var(--font-mono);
color: var(--text-muted);
}
.code-copy-btn {
font-size: 11px; color: var(--text-muted);
padding: 2px 8px; border-radius: 4px;
transition: color var(--transition), background var(--transition);
}
.code-copy-btn:hover { color: var(--text); background: var(--bg-hover); }
.code-block pre {
padding: 14px 16px;
overflow-x: auto;
font-size: 13px;
font-family: var(--font-mono);
line-height: 1.6;
color: #e2e8f0;
}
.code-block code { background: none; padding: 0; }
/* Inline code */
.msg-assistant code, .msg-user code {
font-family: var(--font-mono);
font-size: 0.88em;
background: var(--bg-active);
padding: 1px 5px;
border-radius: 4px;
}
/* Tables */
.msg-assistant table {
border-collapse: collapse;
width: 100%;
margin: 10px 0;
font-size: 14px;
}
.msg-assistant th, .msg-assistant td {
border: 1px solid var(--border-bright);
padding: 7px 12px;
text-align: left;
}
.msg-assistant th { background: var(--bg-raised); font-weight: 600; }
.msg-assistant tr:nth-child(even) { background: rgba(255,255,255,0.02); }
/* Images/video/audio in chat */
.msg-media {
max-width: 420px;
border-radius: var(--radius-md);
overflow: hidden;
margin: 8px 0;
position: relative;
}
.msg-media img {
display: block; width: 100%;
border-radius: var(--radius-md);
cursor: pointer;
transition: opacity var(--transition);
}
.msg-media img:hover { opacity: 0.9; }
.msg-media video, .msg-media audio {
width: 100%;
border-radius: var(--radius-md);
}
.media-download-btn {
position: absolute; top: 8px; right: 8px;
padding: 4px 10px; border-radius: var(--radius-full);
background: rgba(0,0,0,0.6); color: white; font-size: 11px;
opacity: 0; transition: opacity var(--transition);
}
.msg-media:hover .media-download-btn { opacity: 1; }
/* Tool call bubble */
.msg-tool-call {
display: inline-flex; align-items: center; gap: 6px;
padding: 4px 10px; border-radius: var(--radius-full);
background: var(--bg-raised); border: 1px solid var(--border);
font-size: 12px; color: var(--text-dim);
cursor: pointer; margin: 4px 0;
transition: border-color var(--transition), color var(--transition);
}
.msg-tool-call:hover { border-color: var(--blue-bright); color: var(--text); }
.msg-tool-call svg { color: var(--yellow); }
/* Span colors from AI */
span[data-color="green"] { color: #4ade80; }
span[data-color="blue"] { color: #60a5fa; }
span[data-color="red"] { color: #f87171; }
span[data-color="orange"] { color: #fb923c; }
span[data-color="yellow"] { color: #facc15; }
span[data-color="purple"] { color: #c084fc; }
span[data-color="teal"] { color: #2dd4bf; }
span[data-color="gold"] { color: #e5c846; }
span[data-color="coral"] { color: #f97316; }
span[data-color="pink"] { color: #f472b6; }
/* Pasted content chip */
.pasted-chip {
display: inline-flex; align-items: center; gap: 6px;
padding: 4px 10px; border-radius: var(--radius-full);
background: var(--bg-raised); border: 1px solid var(--border-bright);
font-size: 12px; color: var(--text-dim); cursor: pointer;
margin: 4px 0;
}
.pasted-chip .chip-remove {
width: 14px; height: 14px; border-radius: 50%;
display: flex; align-items: center; justify-content: center;
font-size: 10px; color: var(--text-muted);
transition: background var(--transition);
}
.pasted-chip .chip-remove:hover { background: var(--bg-hover); color: var(--text); }
/* Attached image thumb */
.attach-thumb {
display: inline-block;
width: 48px; height: 48px;
border-radius: var(--radius-sm); overflow: hidden;
position: relative; cursor: pointer;
}
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; }
.attach-thumb .thumb-remove {
position: absolute; top: -4px; right: -4px;
width: 16px; height: 16px; border-radius: 50%;
background: var(--bg); border: 1px solid var(--border-bright);
display: flex; align-items: center; justify-content: center;
font-size: 9px; color: var(--text);
}
/* SVG side panel */
#svg-panel {
position: fixed; right: 0; top: 0; bottom: 0;
width: 320px; background: var(--bg-surface);
border-left: 1px solid var(--border-bright);
z-index: 200; display: flex; flex-direction: column;
animation: slideInRight 0.2s ease;
}
#svg-panel-header {
display: flex; align-items: center; justify-content: space-between;
padding: 12px 16px; border-bottom: 1px solid var(--border);
}
#svg-panel-content { flex: 1; overflow: auto; padding: 16px; }
#svg-panel img { max-width: 100%; border-radius: var(--radius-sm); }
/* Generating animation */
.msg-generating {
animation: generatingGlow 2s ease infinite;
}
@keyframes generatingGlow {
0%, 100% { opacity: 1; }
50% { opacity: 0.75; }
}