Files
AI_portal/asistent/static/extra.css
2026-07-07 13:16:26 +02:00

352 lines
8.8 KiB
CSS

/* ── Back link / nav buttons ────────────────────── */
.back-link {
display: inline-flex; align-items: center; gap: 6px;
padding: 6px 12px 6px 10px; border-radius: 8px;
font: inherit;
font-size: 13px; font-weight: 500; color: var(--text-tertiary);
text-decoration: none; border: 0.5px solid var(--border-default);
background: var(--bg-primary); flex-shrink: 0; cursor: pointer;
transition: color .15s, border-color .15s, background .15s;
}
.back-link:hover {
color: var(--primary); border-color: var(--primary);
background: color-mix(in srgb, var(--primary) 6%, var(--bg-primary));
}
.back-link svg { opacity: 0.8; }
.header-right { display: flex; align-items: center; gap: 8px; }
@media (max-width: 640px) {
.back-link span { display: none; }
.back-link { padding: 6px; }
}
/* ── Chat layout ───────────────────────────────── */
.chat-main {
max-width: 880px;
margin: 0 auto;
padding: 28px 16px 96px;
min-height: calc(100vh - 56px);
}
@media (min-width: 640px) {
.chat-main { padding: 36px 32px 96px; }
}
.chat-frame {
display: flex;
flex-direction: column;
gap: 12px;
}
/* ── Welcome card ──────────────────────────────── */
.welcome {
background: var(--card);
border: 1px solid var(--border-default);
border-radius: 14px;
padding: 28px 24px;
box-shadow: var(--shadow-card);
}
.welcome h2 {
font-size: 22px;
font-weight: 600;
margin-bottom: 8px;
color: var(--text-primary);
}
.welcome p {
color: var(--text-secondary);
margin-bottom: 4px;
font-size: 14.5px;
}
.welcome-sub {
margin-top: 16px;
color: var(--text-tertiary);
font-size: 13px;
}
/* ── Message list ──────────────────────────────── */
.chat-log {
display: flex;
flex-direction: column;
gap: 16px;
padding-bottom: 8px;
}
.msg {
display: flex;
flex-direction: column;
gap: 4px;
width: 100%;
}
.msg-author {
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.02em;
text-transform: uppercase;
color: var(--text-tertiary);
}
.msg-avatar {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px; height: 22px;
border-radius: 50%;
background: linear-gradient(135deg, #15b79e 0%, #0e9384 100%);
color: #fff;
font-size: 11px;
font-weight: 700;
letter-spacing: 0;
}
.msg-body {
color: var(--text-primary);
font-size: 14.5px;
line-height: 1.45;
word-wrap: break-word;
}
/* User messages get a subtle highlight so the eye can scan the convo. */
.msg-user .msg-body {
background: color-mix(in srgb, var(--primary) 6%, var(--bg-primary));
border-left: 3px solid var(--primary);
padding: 8px 12px;
border-radius: 0 8px 8px 0;
white-space: pre-wrap;
}
/* Markdown elements inside assistant responses */
.msg-body h1, .msg-body h2, .msg-body h3,
.msg-body h4, .msg-body h5, .msg-body h6 {
font-weight: 600;
margin: 8px 0 1px;
color: var(--text-primary);
line-height: 1.3;
}
.msg-body h1 { font-size: 17px; }
.msg-body h2 { font-size: 15.5px; }
.msg-body h3 { font-size: 14.5px; }
.msg-body h4, .msg-body h5, .msg-body h6 { font-size: 14px; }
.msg-body h1:first-child, .msg-body h2:first-child, .msg-body h3:first-child {
margin-top: 0;
}
.msg-body p { margin: 0 0 4px; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-body ul, .msg-body ol { margin: 0 0 4px 22px; }
.msg-body li { margin-bottom: 1px; }
.msg-body li:last-child { margin-bottom: 0; }
.msg-body li > p:first-child { margin-bottom: 1px; }
.msg-body li > ul, .msg-body li > ol { margin-top: 1px; margin-bottom: 1px; }
.msg-body code {
background: var(--bg-tertiary);
padding: 1px 6px;
border-radius: 4px;
font-size: 0.92em;
font-family: var(--font-mono, ui-monospace, "SFMono-Regular", monospace);
}
.msg-body pre {
background: var(--bg-tertiary);
padding: 10px 12px;
border-radius: 8px;
overflow-x: auto;
margin: 6px 0;
font-size: 13px;
border: 1px solid var(--border-default);
line-height: 1.45;
}
.msg-body pre code {
background: transparent;
padding: 0;
font-size: inherit;
}
.msg-body blockquote {
margin: 6px 0;
padding: 2px 0 2px 12px;
border-left: 3px solid var(--border-strong);
color: var(--text-secondary);
}
.msg-body strong { font-weight: 600; color: var(--text-primary); }
.msg-body em { font-style: italic; }
.msg-body a {
color: var(--primary);
text-decoration: underline;
text-underline-offset: 2px;
}
.msg-body a:hover { color: var(--primary-hover); }
.msg-error { color: #b42318; }
/* Loading dots while waiting for the first token */
.msg-typing .msg-body {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 0;
}
.msg-typing .dot {
width: 6px; height: 6px; border-radius: 50%;
background: var(--text-tertiary);
animation: dot-bounce 1.2s infinite ease-in-out both;
}
.msg-typing .dot:nth-child(2) { animation-delay: 0.16s; }
.msg-typing .dot:nth-child(3) { animation-delay: 0.32s; }
@keyframes dot-bounce {
0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
40% { transform: scale(1.0); opacity: 1; }
}
/* ── Action buttons under assistant messages ──── */
.msg-actions {
margin-top: 10px;
display: flex;
gap: 6px;
}
.action-btn {
display: inline-flex;
align-items: center;
gap: 6px;
background: transparent;
border: 1px solid transparent;
border-radius: 6px;
padding: 4px 8px;
font: inherit;
font-size: 12px;
color: var(--text-tertiary);
cursor: pointer;
transition: color .15s, border-color .15s, background .15s;
}
.action-btn:hover {
color: var(--text-primary);
border-color: var(--border-default);
background: var(--bg-tertiary);
}
.action-btn svg { opacity: 0.7; }
/* ── Sources ───────────────────────────────────── */
.sources {
margin-top: 14px;
padding-top: 12px;
border-top: 1px dashed var(--border-default);
}
.sources-label {
font-size: 11px;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--text-tertiary);
margin-bottom: 6px;
}
.sources-chips {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.source-chip {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
background: var(--bg-tertiary);
border: 1px solid var(--border-default);
border-radius: 999px;
font-size: 12px;
color: var(--text-secondary);
text-decoration: none;
max-width: 100%;
}
.source-chip svg { flex-shrink: 0; opacity: 0.65; }
.source-chip-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* ── Starter chips ─────────────────────────────── */
.starter-list {
list-style: none;
margin: 8px 0 0;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.starter-list li { margin: 0; }
.starter {
font: inherit;
background: var(--bg-tertiary);
color: var(--text-secondary);
border: 1px solid var(--border-default);
border-radius: 999px;
padding: 6px 14px;
font-size: 13px;
cursor: pointer;
transition: background .15s, color .15s, border-color .15s;
}
.starter:hover {
background: color-mix(in srgb, var(--primary) 8%, var(--bg-tertiary));
border-color: color-mix(in srgb, var(--primary) 30%, var(--border-default));
color: var(--text-primary);
}
/* ── Composer ──────────────────────────────────── */
.chat-form {
position: sticky;
bottom: 16px;
display: flex;
gap: 8px;
background: var(--card);
border: 1px solid var(--border-default);
border-radius: 14px;
padding: 8px 8px 8px 16px;
box-shadow: 0 4px 16px rgb(16 24 40 / 0.06);
align-items: flex-end;
margin-top: 16px;
}
.chat-form:focus-within {
border-color: color-mix(in srgb, var(--primary) 40%, var(--border-default));
box-shadow: 0 4px 16px rgb(16 24 40 / 0.08),
0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}
.chat-input {
font: inherit;
flex: 1;
border: none;
outline: none;
background: transparent;
resize: none;
max-height: 200px;
color: var(--text-primary);
padding: 8px 0;
line-height: 1.5;
}
.chat-input::placeholder { color: var(--text-quaternary); }
.chat-send {
width: 36px;
height: 36px;
border-radius: 10px;
border: none;
background: var(--primary);
color: #fff;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
flex-shrink: 0;
transition: background .15s, opacity .15s;
}
.chat-send:hover:not(:disabled) { background: var(--primary-hover); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-hint {
font-size: 12px;
color: var(--text-quaternary);
text-align: center;
margin-top: 4px;
}