/* =========================================== Agent Chat — ported from dashboard-lit =========================================== */ .agent-chat { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; position: relative; } .agent-chat__thread { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 12px 18px; display: flex; flex-direction: column; gap: 4px; } .agent-chat__empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.92rem; } .agent-chat__error { color: color-mix(in srgb, var(--accent) 85%, #fff); font-size: 0.85rem; padding: 6px 10px; margin-top: 4px; background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); } /* ─── Welcome / Empty State ─── */ .agent-chat__welcome { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 40px 24px 32px; text-align: center; position: relative; overflow: hidden; } .agent-chat__welcome-glow { position: absolute; top: 10%; left: 50%; transform: translateX(-50%); width: 280px; height: 180px; border-radius: 50%; background: radial-gradient(ellipse, var(--agent-color, var(--accent)) 0%, transparent 70%); opacity: 0.06; pointer-events: none; filter: blur(40px); } .agent-chat__welcome h2 { font-size: 1.5rem; font-weight: 700; color: var(--text); margin: 8px 0 0; letter-spacing: -0.02em; } .agent-chat__personality { font-size: 0.88rem; color: var(--muted); max-width: 380px; line-height: 1.55; margin: 2px 0 0; } .agent-chat__badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 6px; } .agent-chat__badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.01em; } .agent-chat__badge svg, .agent-chat__badge img { width: 14px; height: 14px; object-fit: contain; vertical-align: -0.15em; } /* ─── Starter Cards ─── */ .agent-chat__starters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; width: 100%; max-width: 420px; } .agent-chat__starter { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); color: var(--text); font-size: 0.82rem; font-weight: 500; text-align: left; cursor: pointer; transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease, box-shadow var(--duration-fast) ease, transform var(--duration-fast) var(--ease-spring); line-height: 1.35; } .agent-chat__starter:hover { border-color: color-mix(in srgb, var(--agent-color, var(--accent)) 45%, transparent); background: color-mix(in srgb, var(--agent-color, var(--accent)) 5%, transparent); box-shadow: 0 2px 12px color-mix(in srgb, var(--agent-color, var(--accent)) 8%, transparent); transform: translateY(-1px); } .agent-chat__starter:active { transform: translateY(0); box-shadow: none; } .agent-chat__starter:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; } .agent-chat__starter-icon { font-size: 1.15rem; line-height: 1; flex-shrink: 0; } .agent-chat__starter-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .agent-chat__starter-arrow { display: flex; align-items: center; color: var(--agent-color, var(--accent)); opacity: 0; transform: translateX(-3px); transition: opacity var(--duration-fast) ease, transform var(--duration-fast) ease; flex-shrink: 0; } .agent-chat__starter-arrow svg { width: 14px; height: 14px; } .agent-chat__starter:hover .agent-chat__starter-arrow { opacity: 0.8; transform: translateX(0); } @media (max-width: 400px) { .agent-chat__starters { grid-template-columns: 1fr; max-width: 280px; } } .agent-chat__hint { font-size: 0.73rem; color: var(--muted); margin-top: 20px; opacity: 0.7; } .agent-chat__hint kbd { display: inline-block; padding: 1px 5px; border: 1px solid var(--border); border-radius: 4px; background: var(--card); font-size: 0.7rem; font-family: inherit; } .agent-chat__suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; max-width: 480px; } .agent-chat__suggestion { padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius-full); background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; transition: background 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out; } .agent-chat__suggestion:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--text); } /* ─── Avatar Circle ─── */ .agent-chat__avatar { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; color: #fff; background: var(--agent-color, var(--accent)); flex-shrink: 0; } .agent-chat__avatar--logo { background: transparent; } .agent-chat__avatar--logo svg, .agent-chat__avatar--logo img { width: 48px; height: 48px; object-fit: contain; } .agent-chat__avatar--sm { width: 24px; height: 24px; font-size: 0.65rem; } /* ─── Chat Bubble ─── */ .chat-bubble { padding: 10px 14px; max-width: 100%; word-wrap: break-word; overflow-wrap: break-word; position: relative; } .chat-bubble--history { opacity: 0.65; } .chat-bubble--user { background: color-mix(in srgb, var(--accent) 6%, var(--card)); border-radius: var(--radius-lg); border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent); margin-left: auto; max-width: 85%; } .chat-bubble--assistant { padding: 10px 14px; } .chat-bubble--tool { padding: 4px 14px; } .chat-bubble__header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; } .chat-bubble__role { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ok); } .chat-bubble--user .chat-bubble__role { color: var(--accent); } .chat-bubble__role--tool { color: var(--warn); display: inline-flex; align-items: center; gap: 4px; } .chat-bubble__role--tool svg { width: 14px; height: 14px; } .chat-bubble__model-tag { font-size: 0.68rem; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--muted); } .chat-bubble__ts { font-size: 0.72rem; color: var(--muted); } .chat-bubble__body { font-size: 0.92rem; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; } .chat-bubble__actions { display: none; gap: 4px; margin-top: 4px; } .chat-bubble:hover .chat-bubble__actions { display: flex; } .chat-bubble__action { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: var(--radius-sm); border: none; background: transparent; color: var(--muted); cursor: pointer; transition: all var(--duration-fast) ease; padding: 0; } .chat-bubble__action svg { width: 14px; height: 14px; } .chat-bubble__action:hover { color: var(--text); background: var(--bg-hover); } /* ─── Chat Divider ─── */ .agent-chat__divider { display: flex; align-items: center; gap: 12px; margin: 10px 0; font-size: 0.72rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; } .agent-chat__divider::before, .agent-chat__divider::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--accent) 30%, transparent); } /* ─── Streaming Indicator ─── */ .agent-chat__streaming { padding: 10px 14px; border-left: 2px solid var(--accent); animation: chat-pulse 1.5s ease-in-out infinite; } .agent-chat__streaming-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .agent-chat__streaming-name { font-size: 0.82rem; font-weight: 600; color: var(--text); } .agent-chat__streaming-dots { display: inline-flex; gap: 3px; align-items: center; } .agent-chat__streaming-dots span { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: chat-pulse 1.2s ease-in-out infinite; } .agent-chat__streaming-dots span:nth-child(2) { animation-delay: 0.2s; } .agent-chat__streaming-dots span:nth-child(3) { animation-delay: 0.4s; } .agent-chat__streaming-label { font-size: 0.75rem; color: var(--muted); font-style: italic; } .agent-chat__streaming-timer { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; } .agent-chat__streaming-content { font-size: 0.92rem; line-height: 1.45; } .agent-chat__cursor { display: inline-block; width: 2px; height: 1em; background: var(--accent); margin-left: 1px; vertical-align: text-bottom; animation: cursor-blink 0.8s step-end infinite; } @keyframes cursor-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } @keyframes chat-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } /* ─── Input Bar (Cursor-style unified container) ─── */ .agent-chat__input { position: relative; display: flex; flex-direction: column; width: 100%; max-width: var(--chat-max-width, 74rem); margin: 0 auto 24px; padding: 0; background: color-mix(in srgb, var(--bg-elevated) 86%, var(--panel)); border: 1px solid color-mix(in srgb, var(--border) 78%, transparent); border-radius: var(--radius-lg); flex-shrink: 0; overflow: hidden; transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease; } .agent-chat__input:focus-within { border-color: color-mix(in srgb, var(--accent) 50%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent); } @supports (backdrop-filter: blur(1px)) { .agent-chat__input { backdrop-filter: blur(16px) saturate(1.8); -webkit-backdrop-filter: blur(16px) saturate(1.8); } } /* Textarea — full width, borderless inside the container */ .agent-chat__input > textarea { width: 100%; min-height: 52px; max-height: 150px; resize: none; padding: 12px 14px 8px; border: none; background: transparent; color: var(--text); font-size: 0.92rem; font-family: inherit; line-height: 1.4; outline: none; box-sizing: border-box; } .agent-chat__input > textarea::placeholder { color: var(--muted); } /* ─── Toolbar (below textarea) ─── */ .agent-chat__toolbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent); } .agent-chat__toolbar-left, .agent-chat__toolbar-right { display: flex; align-items: center; gap: 4px; } /* ─── Toolbar buttons (ghost style) ─── */ .agent-chat__input-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: var(--radius-sm); border: none; background: transparent; color: var(--muted); cursor: pointer; flex-shrink: 0; transition: all var(--duration-fast) ease; padding: 0; } .agent-chat__input-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5px; stroke-linecap: round; stroke-linejoin: round; } .agent-chat__input-btn:hover:not(:disabled) { color: var(--text); background: var(--bg-hover); } .agent-chat__input-btn:disabled { opacity: 0.4; cursor: not-allowed; } .agent-chat__input-btn--active { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); } /* Recording mic pulse */ .agent-chat__input-btn--recording { color: var(--danger, #e53e3e); background: color-mix(in srgb, var(--danger, #e53e3e) 12%, transparent); animation: mic-pulse 1.5s ease-in-out infinite; } @keyframes mic-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } /* STT interim transcript preview */ .agent-chat__stt-interim { font-size: 0.8rem; color: var(--muted); font-style: italic; padding: 4px 12px 0; white-space: pre-wrap; max-height: 3em; overflow-y: auto; } .agent-chat__toolbar .btn-ghost { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: var(--radius-sm); border: none; background: transparent; color: var(--muted); cursor: pointer; padding: 0; transition: all var(--duration-fast) ease; } .agent-chat__toolbar .btn-ghost svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5px; stroke-linecap: round; stroke-linejoin: round; } .agent-chat__toolbar .btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--bg-hover); } .agent-chat__toolbar .btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; } .agent-chat__input-divider { width: 1px; height: 16px; background: var(--border); margin: 0 4px; } .agent-chat__token-count { font-size: 0.7rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; align-self: center; } /* Send / Stop button */ .chat-send-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-md); border: none; background: var(--accent); color: var(--accent-foreground); cursor: pointer; flex-shrink: 0; transition: all var(--duration-fast) ease; padding: 0; } .chat-send-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5px; stroke-linecap: round; stroke-linejoin: round; } .chat-send-btn:hover:not(:disabled) { background: var(--accent-hover); box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 24%, transparent); } .chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; } .chat-send-btn--stop { background: var(--danger); } .chat-send-btn--stop:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 85%, #fff); } /* ─── Search Bar ─── */ .agent-chat__search-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--card); } .agent-chat__search-bar svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; } .agent-chat__search-bar input { flex: 1; border: none; background: transparent; color: var(--text); font-size: 0.88rem; outline: none; } .agent-chat__search-bar input::placeholder { color: var(--muted); } /* ─── Pinned Messages ─── */ .agent-chat__pinned { border-bottom: 1px solid var(--border); padding: 6px 14px; } .agent-chat__pinned-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: var(--radius-sm); border: none; background: transparent; color: var(--accent); font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: background var(--duration-fast) ease; } .agent-chat__pinned-toggle svg { width: 14px; height: 14px; } .agent-chat__pinned-toggle:hover { background: var(--bg-hover); } .agent-chat__pinned-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; padding-left: 8px; } .agent-chat__pinned-item { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: var(--radius-sm); font-size: 0.82rem; } .agent-chat__pinned-role { font-weight: 600; font-size: 0.72rem; text-transform: uppercase; color: var(--muted); flex-shrink: 0; } .agent-chat__pinned-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); } /* ─── Scroll Pill ─── */ .agent-chat__scroll-pill { position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--accent); font-size: 0.78rem; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-md); z-index: 20; transition: all var(--duration-fast) ease; } .agent-chat__scroll-pill svg { width: 14px; height: 14px; } .agent-chat__scroll-pill:hover { background: color-mix(in srgb, var(--accent) 10%, var(--card)); } /* ─── Slash Command Menu ─── */ .slash-menu { position: absolute; bottom: 100%; left: 0; right: 0; max-height: 360px; overflow-y: auto; background: var(--popover); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); z-index: 30; margin-bottom: 4px; padding: 6px; scrollbar-width: thin; animation: slash-menu-enter 120ms ease-out; } @keyframes slash-menu-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } } .slash-menu-group + .slash-menu-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent); } .slash-menu-group__label { padding: 4px 10px 2px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); opacity: 0.7; } .slash-menu-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--radius-sm); cursor: pointer; transition: background var(--duration-fast) ease, color var(--duration-fast) ease; } .slash-menu-item:hover, .slash-menu-item--active { background: color-mix(in srgb, var(--accent) 10%, var(--bg-hover)); } .slash-menu-icon { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); opacity: 0.7; } .slash-menu-icon svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5px; stroke-linecap: round; stroke-linejoin: round; } .slash-menu-item--active .slash-menu-icon, .slash-menu-item:hover .slash-menu-icon { opacity: 1; } .slash-menu-name { font-size: 0.82rem; font-weight: 600; font-family: var(--mono); color: var(--accent); white-space: nowrap; } .slash-menu-args { font-size: 0.75rem; color: var(--muted); font-family: var(--mono); opacity: 0.65; } .slash-menu-desc { font-size: 0.75rem; color: var(--muted); flex: 1; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .slash-menu-badge { font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 1px 5px; border-radius: 3px; flex-shrink: 0; line-height: 1.4; } .slash-menu-item--active .slash-menu-name { color: var(--accent-hover); } .slash-menu-item--active .slash-menu-desc { color: var(--text); } .slash-menu-item--active .slash-menu-badge { background: color-mix(in srgb, var(--accent) 20%, transparent); } .slash-menu-footer { display: flex; align-items: center; gap: 12px; padding: 6px 10px 4px; margin-top: 4px; border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent); font-size: 0.65rem; color: var(--muted); opacity: 0.7; } .slash-menu-footer kbd { display: inline-block; font-family: var(--mono); font-size: 0.6rem; background: color-mix(in srgb, var(--text) 8%, transparent); border: 1px solid color-mix(in srgb, var(--border) 60%, transparent); border-radius: 3px; padding: 0 3px; line-height: 1.5; margin-right: 2px; } /* ─── Attachment Previews ─── */ .chat-attachments-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; } .chat-attachment-thumb { position: relative; width: 60px; height: 60px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); } .chat-attachment-thumb img { width: 100%; height: 100%; object-fit: cover; } .chat-attachment-remove { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: none; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; } .chat-attachment-file { display: flex; align-items: center; gap: 4px; font-size: 0.72rem; color: var(--muted); padding: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* ─── Reasoning Block ─── */ .reasoning-block { margin: 4px 0; } .reasoning-block__toggle { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-hover); color: var(--muted); font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all var(--duration-fast) ease; } .reasoning-block__toggle:hover { color: var(--text); border-color: var(--border-strong); } .reasoning-block__content { display: none; margin-top: 6px; padding: 8px 12px; font-size: 0.82rem; line-height: 1.5; color: var(--muted); font-style: italic; white-space: pre-wrap; word-wrap: break-word; border-left: 2px solid var(--border); } .reasoning-block--open .reasoning-block__content { display: block; } .reasoning-block--streaming .reasoning-block__toggle { animation: chat-pulse 1.5s ease-in-out infinite; } /* ─── Tool Block ─── */ .tool-block { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg); overflow: hidden; margin: 4px 0; } .tool-block__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 0.82rem; font-weight: 600; color: var(--text); transition: background var(--duration-fast) ease; } .tool-block__header:hover { background: var(--bg-hover); } .tool-block__name { display: inline-flex; align-items: center; gap: 6px; } .tool-block__name svg { width: 14px; height: 14px; } .tool-block__body { display: none; padding: 0 12px 10px; } .tool-block--open .tool-block__body { display: block; } .tool-block__output { margin: 0; font-family: var(--mono); font-size: 0.78rem; line-height: 1.5; color: var(--muted); white-space: pre-wrap; word-wrap: break-word; max-height: 300px; overflow: auto; padding: 8px; border-radius: var(--radius-sm); background: var(--bg-accent); border: 1px solid var(--border); } .tool-block__chevron { transition: transform var(--duration-fast) ease; } .tool-block__chevron svg { width: 14px; height: 14px; } .tool-block--open .tool-block__chevron { transform: rotate(180deg); } /* ─── File Input (hidden) ─── */ .agent-chat__file-input { display: none; } /* ─── Danger ghost button ─── */ .btn-ghost--danger:hover { color: var(--danger) !important; } .btn-ghost--sm { padding: 4px; } .btn-ghost--sm svg { width: 14px; height: 14px; } /* ─── Agent Bar ─── */ .chat-agent-bar { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px; border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent); flex-shrink: 0; gap: 4px; min-height: 28px; } .chat-agent-bar__left { display: flex; align-items: center; gap: 8px; min-width: 0; } .chat-agent-bar__right { display: flex; align-items: center; gap: 2px; flex-shrink: 0; } .chat-agent-bar__name { font-size: 11px; font-weight: 600; color: var(--text); } .chat-agent-select { background: transparent; border: none; color: var(--text); font-size: 11px; font-weight: 600; padding: 0 14px 0 0; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 24 24' fill='none' stroke='%237d8590' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0 center; } .chat-agent-select:hover { color: var(--accent); } .chat-agent-select:focus { outline: none; }