07e0705380
- AgentChat-Widget mit SSE-Streaming, Quick-Actions, Multiple-Choice - /api/agent/chat + /api/agent/insight Routen - Expertenblick-Panel im TipModal (lazy load) - Günther-Icon
467 lines
9.2 KiB
CSS
467 lines
9.2 KiB
CSS
/* ============================================================
|
||
AgentChat – Fußball-Experte Chat-Widget
|
||
Stadium Elite Design
|
||
============================================================ */
|
||
|
||
/* ---- Floating Button ---- */
|
||
.trigger {
|
||
position: fixed;
|
||
bottom: 28px;
|
||
right: 28px;
|
||
z-index: 500;
|
||
width: 60px;
|
||
height: 60px;
|
||
border-radius: 50%;
|
||
border: none;
|
||
background: transparent;
|
||
box-shadow: none;
|
||
cursor: pointer;
|
||
overflow: hidden;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 32px;
|
||
line-height: 1;
|
||
transition: transform 0.2s;
|
||
color: #fff;
|
||
padding: 0;
|
||
}
|
||
|
||
.trigger.open {
|
||
background: rgba(28, 38, 64, 0.9);
|
||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
|
||
}
|
||
|
||
.trigger:hover {
|
||
transform: scale(1.08);
|
||
box-shadow: 0 6px 28px rgba(75, 183, 248, 0.6);
|
||
}
|
||
|
||
.trigger.open {
|
||
background: linear-gradient(135deg, #1C2640 0%, #111827 100%);
|
||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
|
||
}
|
||
|
||
/* Puls-Ring wenn geschlossen */
|
||
.trigger:not(.open)::after {
|
||
content: '';
|
||
position: absolute;
|
||
inset: -4px;
|
||
border-radius: 50%;
|
||
border: 2px solid rgba(75, 183, 248, 0.4);
|
||
animation: pulse 2.5s ease-in-out infinite;
|
||
}
|
||
|
||
@keyframes pulse {
|
||
0%, 100% { transform: scale(1); opacity: 0.8; }
|
||
50% { transform: scale(1.15); opacity: 0; }
|
||
}
|
||
|
||
/* ---- Panel ---- */
|
||
.panel {
|
||
position: fixed;
|
||
bottom: 100px;
|
||
right: 28px;
|
||
z-index: 499;
|
||
width: 380px;
|
||
max-height: 560px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
background: var(--surface-mid);
|
||
border-radius: var(--radius-lg);
|
||
border: 1px solid rgba(75, 183, 248, 0.15);
|
||
box-shadow:
|
||
0 20px 60px rgba(0, 0, 0, 0.5),
|
||
0 0 0 1px rgba(255, 255, 255, 0.04),
|
||
inset 0 1px 0 rgba(255, 255, 255, 0.07);
|
||
overflow: hidden;
|
||
animation: slideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||
}
|
||
|
||
@keyframes slideUp {
|
||
from { opacity: 0; transform: translateY(16px) scale(0.97); }
|
||
to { opacity: 1; transform: translateY(0) scale(1); }
|
||
}
|
||
|
||
/* ---- Header ---- */
|
||
.header {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
padding: 14px 16px;
|
||
background: linear-gradient(135deg, rgba(75, 183, 248, 0.1) 0%, rgba(33, 150, 243, 0.05) 100%);
|
||
border-bottom: 1px solid rgba(75, 183, 248, 0.12);
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.headerIcon {
|
||
font-size: 22px;
|
||
line-height: 1;
|
||
}
|
||
|
||
.headerTitle {
|
||
font-family: 'Plus Jakarta Sans', sans-serif;
|
||
font-weight: 700;
|
||
font-size: 15px;
|
||
color: var(--text-primary);
|
||
flex: 1;
|
||
}
|
||
|
||
.headerSub {
|
||
font-size: 11px;
|
||
color: var(--text-secondary);
|
||
margin-top: 1px;
|
||
}
|
||
|
||
.headerOnline {
|
||
width: 8px;
|
||
height: 8px;
|
||
border-radius: 50%;
|
||
background: var(--success);
|
||
box-shadow: 0 0 6px var(--success);
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
/* ---- Messages Area ---- */
|
||
.messages {
|
||
flex: 1;
|
||
overflow-y: auto;
|
||
padding: 16px 14px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 12px;
|
||
}
|
||
|
||
/* ---- Quick Action Chips ---- */
|
||
.quickActions {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8px;
|
||
padding: 0 14px 14px;
|
||
}
|
||
|
||
.quickActionsLabel {
|
||
font-size: 11px;
|
||
color: var(--text-muted);
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.07em;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.quickChips {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 6px;
|
||
}
|
||
|
||
.chip {
|
||
padding: 6px 12px;
|
||
border-radius: 20px;
|
||
border: 1px solid rgba(75, 183, 248, 0.25);
|
||
background: rgba(75, 183, 248, 0.07);
|
||
color: var(--primary);
|
||
font-size: 12px;
|
||
font-weight: 500;
|
||
cursor: pointer;
|
||
transition: all 0.15s;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.chip:hover {
|
||
background: rgba(75, 183, 248, 0.15);
|
||
border-color: rgba(75, 183, 248, 0.4);
|
||
transform: translateY(-1px);
|
||
}
|
||
|
||
/* ---- Message Bubbles ---- */
|
||
.message {
|
||
display: flex;
|
||
flex-direction: column;
|
||
max-width: 88%;
|
||
}
|
||
|
||
.message.user {
|
||
align-self: flex-end;
|
||
align-items: flex-end;
|
||
}
|
||
|
||
.message.assistant {
|
||
align-self: flex-start;
|
||
align-items: flex-start;
|
||
}
|
||
|
||
.bubble {
|
||
padding: 10px 14px;
|
||
border-radius: var(--radius-md);
|
||
font-size: 14px;
|
||
line-height: 1.55;
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
}
|
||
|
||
.message.user .bubble {
|
||
background: linear-gradient(135deg, var(--primary) 0%, #2196f3 100%);
|
||
color: #fff;
|
||
border-bottom-right-radius: 4px;
|
||
}
|
||
|
||
.message.assistant .bubble {
|
||
background: var(--surface-high);
|
||
color: var(--text-primary);
|
||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||
border-bottom-left-radius: 4px;
|
||
}
|
||
|
||
/* Markdown-Inhalt in Assistenten-Bubbles */
|
||
.markdownBody {
|
||
font-size: 13.5px;
|
||
line-height: 1.6;
|
||
}
|
||
|
||
.markdownBody strong {
|
||
color: var(--text-primary);
|
||
font-weight: 700;
|
||
}
|
||
|
||
.markdownBody em {
|
||
color: var(--text-secondary);
|
||
font-style: italic;
|
||
}
|
||
|
||
.markdownBody ul {
|
||
padding-left: 1.2em;
|
||
margin: 4px 0;
|
||
}
|
||
|
||
.markdownBody li {
|
||
margin-bottom: 3px;
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.messageTime {
|
||
font-size: 10px;
|
||
color: var(--text-muted);
|
||
margin-top: 4px;
|
||
padding: 0 4px;
|
||
}
|
||
|
||
/* ---- Typing Indicator ---- */
|
||
.typing {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
padding: 10px 14px;
|
||
background: var(--surface-high);
|
||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||
border-radius: var(--radius-md);
|
||
border-bottom-left-radius: 4px;
|
||
width: fit-content;
|
||
}
|
||
|
||
.dot {
|
||
width: 6px;
|
||
height: 6px;
|
||
border-radius: 50%;
|
||
background: var(--text-secondary);
|
||
animation: bounce 1.2s ease-in-out infinite;
|
||
}
|
||
.dot:nth-child(2) { animation-delay: 0.2s; }
|
||
.dot:nth-child(3) { animation-delay: 0.4s; }
|
||
|
||
@keyframes bounce {
|
||
0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
|
||
30% { transform: translateY(-5px); opacity: 1; }
|
||
}
|
||
|
||
/* ---- Input Area ---- */
|
||
.inputArea {
|
||
display: flex;
|
||
align-items: flex-end;
|
||
gap: 8px;
|
||
padding: 12px 14px;
|
||
border-top: 1px solid rgba(255, 255, 255, 0.06);
|
||
background: var(--surface-low);
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.input {
|
||
flex: 1;
|
||
background: var(--surface-mid);
|
||
border: 1px solid rgba(75, 183, 248, 0.2);
|
||
border-radius: var(--radius-sm);
|
||
padding: 10px 13px;
|
||
color: var(--text-primary);
|
||
font-size: 14px;
|
||
font-family: 'Inter', sans-serif;
|
||
resize: none;
|
||
min-height: 42px;
|
||
max-height: 120px;
|
||
outline: none;
|
||
transition: border-color 0.15s;
|
||
line-height: 1.4;
|
||
}
|
||
|
||
.input::placeholder { color: var(--text-muted); }
|
||
|
||
.input:focus {
|
||
border-color: rgba(75, 183, 248, 0.5);
|
||
box-shadow: 0 0 0 2px rgba(75, 183, 248, 0.1);
|
||
}
|
||
|
||
.sendBtn {
|
||
width: 40px;
|
||
height: 40px;
|
||
border-radius: var(--radius-sm);
|
||
border: none;
|
||
background: linear-gradient(135deg, var(--primary) 0%, #2196f3 100%);
|
||
color: #fff;
|
||
cursor: pointer;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
flex-shrink: 0;
|
||
transition: opacity 0.15s, transform 0.1s;
|
||
box-shadow: 0 2px 10px rgba(75, 183, 248, 0.3);
|
||
}
|
||
|
||
.sendBtn:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
|
||
.sendBtn:disabled { opacity: 0.4; cursor: not-allowed; }
|
||
|
||
/* ---- Choice Selector ---- */
|
||
.choiceSelector {
|
||
margin-top: 10px;
|
||
border-top: 1px solid rgba(75, 183, 248, 0.12);
|
||
padding-top: 10px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8px;
|
||
}
|
||
|
||
.choiceList {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 5px;
|
||
}
|
||
|
||
.choiceItem {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 9px;
|
||
padding: 8px 12px;
|
||
border-radius: var(--radius-sm);
|
||
border: 1px solid rgba(75, 183, 248, 0.18);
|
||
background: rgba(75, 183, 248, 0.05);
|
||
color: var(--text-primary);
|
||
font-size: 13px;
|
||
font-family: 'Inter', sans-serif;
|
||
cursor: pointer;
|
||
text-align: left;
|
||
transition: all 0.15s;
|
||
}
|
||
|
||
.choiceItem:hover:not(:disabled) {
|
||
background: rgba(75, 183, 248, 0.12);
|
||
border-color: rgba(75, 183, 248, 0.35);
|
||
}
|
||
|
||
.choiceItem:disabled {
|
||
opacity: 0.5;
|
||
cursor: not-allowed;
|
||
}
|
||
|
||
.choiceItemSelected {
|
||
background: rgba(75, 183, 248, 0.15);
|
||
border-color: var(--primary);
|
||
color: var(--primary);
|
||
font-weight: 500;
|
||
}
|
||
|
||
.choiceCheckbox {
|
||
width: 16px;
|
||
height: 16px;
|
||
border-radius: 4px;
|
||
border: 1.5px solid rgba(75, 183, 248, 0.4);
|
||
background: transparent;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 11px;
|
||
flex-shrink: 0;
|
||
color: var(--primary);
|
||
font-weight: 700;
|
||
transition: all 0.12s;
|
||
}
|
||
|
||
.choiceItemSelected .choiceCheckbox {
|
||
background: var(--primary);
|
||
border-color: var(--primary);
|
||
color: #fff;
|
||
}
|
||
|
||
.choiceActions {
|
||
display: flex;
|
||
gap: 6px;
|
||
}
|
||
|
||
.choiceConfirm {
|
||
flex: 1;
|
||
padding: 8px 14px;
|
||
border-radius: var(--radius-sm);
|
||
border: none;
|
||
background: linear-gradient(135deg, var(--primary) 0%, #2196f3 100%);
|
||
color: #fff;
|
||
font-size: 13px;
|
||
font-weight: 600;
|
||
font-family: 'Plus Jakarta Sans', sans-serif;
|
||
cursor: pointer;
|
||
transition: opacity 0.15s;
|
||
box-shadow: 0 2px 10px rgba(75, 183, 248, 0.25);
|
||
}
|
||
|
||
.choiceConfirm:disabled {
|
||
opacity: 0.4;
|
||
cursor: not-allowed;
|
||
}
|
||
|
||
.choiceConfirm:hover:not(:disabled) {
|
||
opacity: 0.9;
|
||
}
|
||
|
||
.choiceAll {
|
||
padding: 8px 14px;
|
||
border-radius: var(--radius-sm);
|
||
border: 1px solid rgba(75, 183, 248, 0.25);
|
||
background: transparent;
|
||
color: var(--text-secondary);
|
||
font-size: 13px;
|
||
font-family: 'Inter', sans-serif;
|
||
cursor: pointer;
|
||
transition: all 0.15s;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.choiceAll:hover:not(:disabled) {
|
||
color: var(--text-primary);
|
||
border-color: rgba(75, 183, 248, 0.4);
|
||
background: rgba(75, 183, 248, 0.07);
|
||
}
|
||
|
||
.choiceAll:disabled {
|
||
opacity: 0.4;
|
||
cursor: not-allowed;
|
||
}
|
||
|
||
/* ---- Responsive ---- */
|
||
@media (max-width: 440px) {
|
||
.panel {
|
||
right: 12px;
|
||
left: 12px;
|
||
width: auto;
|
||
bottom: 88px;
|
||
}
|
||
.trigger {
|
||
right: 16px;
|
||
bottom: 20px;
|
||
}
|
||
}
|