ISR / demo /styles /chat.css
Zhen Ye
style(demo): elevate chat panel visual design
f14a5fa
/* =========================================
Chat Panel β€” Expandable from Command Bar
========================================= */
.chat-panel {
position: relative;
max-height: 400px;
overflow: hidden;
transition: max-height 0.35s cubic-bezier(.4, 0, .2, 1),
border-color 0.3s ease;
display: flex;
flex-direction: column;
background: linear-gradient(180deg, rgba(2, 6, 23, 0.6) 0%, rgba(2, 6, 23, 0.3) 100%);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border-top: 1px solid rgba(59, 130, 246, 0.08);
}
.chat-panel.collapsed {
max-height: 0;
border-top-color: transparent;
}
/* Chat Toggle Button */
.chat-toggle {
background: none;
border: none;
color: var(--text-tertiary);
font-family: inherit;
font-size: 8px;
font-weight: 600;
letter-spacing: 1.5px;
text-transform: uppercase;
cursor: pointer;
padding: 2px 8px;
position: absolute;
right: 12px;
top: 50%;
transform: translateY(-50%);
transition: color 0.2s ease;
}
.chat-toggle:hover {
color: var(--accent-light);
}
/* ── Context Header ──────────────────────────────────────────── */
.chat-context-header {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
background: linear-gradient(90deg, rgba(59, 130, 246, 0.04) 0%, transparent 100%);
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
flex-wrap: wrap;
flex-shrink: 0;
}
.chat-context-label {
color: var(--accent);
font-size: 9px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 1.2px;
flex-shrink: 0;
opacity: 0.7;
}
.chat-context-chips {
display: flex;
flex-wrap: wrap;
gap: 5px;
}
.chat-context-chip {
display: inline-flex;
align-items: center;
gap: 5px;
background: rgba(59, 130, 246, 0.06);
border: 1px solid rgba(59, 130, 246, 0.15);
color: var(--text-primary);
padding: 3px 10px;
border-radius: 20px;
font-size: 11px;
font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
cursor: default;
transition: all 0.2s ease;
}
.chat-context-chip:hover {
background: rgba(59, 130, 246, 0.12);
border-color: rgba(59, 130, 246, 0.3);
}
.chat-context-chip .chip-label {
color: var(--text-secondary);
font-family: 'Inter', sans-serif;
font-weight: 500;
}
.chat-context-chip .chip-status {
font-size: 8px;
line-height: 1;
}
.chat-context-chip .chip-status.match { color: var(--mission-match); }
.chat-context-chip .chip-status.no-match { color: var(--mission-nomatch); }
.chat-context-chip .chip-status.unassessed { color: var(--text-tertiary); }
/* ── Chip Hover Tooltip (mini track card) ────────────────────── */
.chip-tooltip {
position: absolute;
z-index: 20;
background: rgba(2, 6, 23, 0.96);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid rgba(59, 130, 246, 0.12);
border-radius: 8px;
padding: 10px 12px;
min-width: 200px;
max-width: 300px;
pointer-events: none;
animation: tooltipIn 0.15s ease;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
0 0 1px rgba(59, 130, 246, 0.2);
}
@keyframes tooltipIn {
from { opacity: 0; transform: translateY(-4px); }
to { opacity: 1; transform: translateY(0); }
}
.chip-tooltip .tt-header {
font-size: 12px;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 8px;
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
}
.chip-tooltip .tt-label {
color: var(--text-secondary);
font-weight: 400;
}
.chip-tooltip .tt-badge {
font-size: 9px;
font-weight: 700;
padding: 2px 6px;
border-radius: 4px;
letter-spacing: 0.5px;
}
.chip-tooltip .tt-match {
background: var(--mission-match-bg);
color: var(--mission-match);
border: 1px solid rgba(52, 211, 153, 0.25);
}
.chip-tooltip .tt-nomatch {
background: var(--mission-nomatch-bg);
color: var(--mission-nomatch);
border: 1px solid rgba(248, 113, 113, 0.2);
}
.chip-tooltip .tt-pending {
background: var(--mission-unassessed-bg);
color: var(--mission-unassessed);
border: 1px solid rgba(100, 116, 139, 0.2);
}
.chip-tooltip .tt-metrics {
display: flex;
gap: 12px;
font-size: 10px;
color: var(--text-tertiary);
font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
margin-bottom: 4px;
padding: 4px 0;
}
.chip-tooltip .tt-metrics span {
display: flex;
gap: 3px;
}
.chip-tooltip .tt-reason {
font-size: 11px;
color: var(--text-secondary);
line-height: 1.5;
margin-top: 6px;
border-top: 1px solid rgba(255, 255, 255, 0.04);
padding-top: 6px;
}
/* ── Suggestion Chips ────────────────────────────────────────── */
.chat-suggestions {
display: flex;
gap: 6px;
padding: 8px 16px;
border-bottom: 1px solid rgba(255, 255, 255, 0.03);
flex-wrap: wrap;
flex-shrink: 0;
overflow-x: auto;
}
.chat-suggestion-chip {
background: rgba(59, 130, 246, 0.04);
border: 1px solid rgba(59, 130, 246, 0.12);
color: var(--accent-light);
padding: 5px 14px;
border-radius: 20px;
font-size: 11px;
font-weight: 500;
cursor: pointer;
white-space: nowrap;
transition: all 0.2s ease;
letter-spacing: 0.1px;
}
.chat-suggestion-chip:hover {
background: rgba(59, 130, 246, 0.12);
border-color: rgba(59, 130, 246, 0.35);
color: #fff;
box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}
/* ── Messages Area ───────────────────────────────────────────── */
.chat-messages {
flex: 1;
overflow-y: auto;
padding: 10px 16px;
display: flex;
flex-direction: column;
gap: 8px;
min-height: 0;
}
.chat-msg {
padding: 8px 12px;
border-radius: 8px;
font-size: 12.5px;
line-height: 1.6;
animation: msgSlideIn 0.25s ease;
}
@keyframes msgSlideIn {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
.chat-msg.user {
background: rgba(59, 130, 246, 0.08);
border: 1px solid rgba(59, 130, 246, 0.12);
border-left: 2px solid var(--accent);
margin-left: 20px;
color: var(--text-primary);
}
.chat-msg.assistant {
background: rgba(255, 255, 255, 0.02);
border: 1px solid rgba(255, 255, 255, 0.04);
border-left: 2px solid rgba(139, 92, 246, 0.4);
margin-right: 20px;
color: var(--text-secondary);
}
.chat-msg.marker {
background: none;
border: none;
text-align: center;
color: var(--text-tertiary);
font-size: 10px;
padding: 4px 0;
letter-spacing: 0.3px;
}
.chat-msg .msg-role {
font-size: 9px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.8px;
margin-bottom: 3px;
opacity: 0.5;
}
.chat-msg.user .msg-role { color: var(--accent-light); }
.chat-msg.assistant .msg-role { color: #a78bfa; }
.chat-msg.loading .msg-text::after {
content: "";
display: inline-block;
width: 10px; height: 10px;
border: 2px solid rgba(255,255,255,.08);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.6s linear infinite;
margin-left: 8px;
vertical-align: middle;
}
@keyframes spin {
to { transform: rotate(360deg); }
}