openclaw/ui/src/styles/chat/layout.css
Val Alexander e697ec273a
UI: polish dashboard — agents overview, chat toolbar, debug & login UX (#23553)
* UI: polish dashboard — agents overview, chat toolbar, debug simplification, login UX

* fix(ui): restore chat draft ordering, remove extra toolbar buttons

* UI: replace agent avatar fallback with lobster emoji

* style(ui): update layout styles for sidebar and shell, adjusting navigation widths for improved responsiveness

* feat(ui): implement sidebar resizing functionality and enhance navigation with new search and sorting features for sessions

* fix(ui): update references from ClawDash to OpenClaw in checklist and dashboard header

* style(ui): adjust sidebar minimum width and add responsive behavior for narrow states

* UI: minimal chat agent bar — remove sessions panel, strip chrome

* style(ui): update light theme colors and add ambient gradient for Luxe Cream & Coral

* UI: replace sparkle with OpenClaw lobster logo in chat

* style(ui): rename theme toggle to theme select and update related styles; adjust layout and spacing for agents and chat components

* style(ui): enhance agents panel layout with grid system, update toolbar styles, and refine usage chart presentation

* style(ui): adjust sessions table column width and refine agent model fields layout for better responsiveness

* style(ui): refine component styles for improved layout and responsiveness; adjust gradients, spacing, and element alignment across chat and agent interfaces

* ui: align chat-controls session container

* ui: enlarge agent controls for better touch targets

* ui: pass basePath to avatar renderer in grouped chat

* ui: formatting fixups from pre-commit hooks

* style(ui): update layout and spacing for chat controls; enhance select component styles and improve responsiveness

* UI: tighten chat header spacing and icon sizes

* UI: widen chat attachment gap

* style(ui): refine chat header layout and adjust icon sizes for improved visual consistency

* style(ui): enhance component styles and layout; introduce new inline field styles, update overview card design, and improve session filters for better usability

* style(ui): improve CSS formatting and consistency across components; adjust gradients, spacing, and layout for better readability and visual appeal

* fix(ui): correct rendering of empty state in overview cards by replacing 'nothing' with an empty string
2026-02-22 07:56:17 -06:00

435 lines
8.6 KiB
CSS

/* =============================================
CHAT CARD LAYOUT - Flex container with sticky compose
============================================= */
/* Main chat card - flex column layout, transparent background */
.chat {
position: relative;
display: flex;
flex-direction: column;
flex: 1 1 0;
height: 100%;
min-height: 0;
/* Allow flex shrinking */
overflow: hidden;
background: transparent !important;
border: none !important;
box-shadow: none !important;
}
/* Chat header - fixed at top, transparent */
.chat-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
flex-wrap: nowrap;
flex-shrink: 0;
padding-bottom: 4px;
margin-bottom: 4px;
background: transparent;
}
.chat-header__left {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
min-width: 0;
}
.chat-header__right {
display: flex;
align-items: center;
gap: 6px;
}
.chat-session {
min-width: 140px;
}
/* Chat thread - scrollable middle section, transparent */
.chat-thread {
flex: 1 1 0;
/* Grow, shrink, and use 0 base for proper scrolling */
overflow-y: auto;
overflow-x: hidden;
padding: 6px 6px 4px;
margin: 0 -4px;
min-height: 0;
/* Allow shrinking for flex scroll behavior */
border-radius: var(--radius-lg);
background: linear-gradient(
180deg,
color-mix(in srgb, var(--panel) 72%, transparent),
transparent
);
}
/* Focus mode exit button */
.chat-focus-exit {
position: absolute;
top: 12px;
right: 12px;
z-index: 100;
width: 32px;
height: 32px;
border-radius: 50%;
border: 1px solid var(--border);
background: var(--panel);
color: var(--muted);
font-size: 20px;
line-height: 1;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition:
background 150ms ease-out,
color 150ms ease-out,
border-color 150ms ease-out;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.chat-focus-exit:hover {
background: var(--panel-strong);
color: var(--text);
border-color: var(--accent);
}
.chat-focus-exit svg {
width: 16px;
height: 16px;
stroke: currentColor;
fill: none;
stroke-width: 2px;
stroke-linecap: round;
stroke-linejoin: round;
}
/* New messages indicator - floating pill above compose */
.chat-new-messages {
align-self: center;
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 14px;
margin: 8px auto;
font-size: 13px;
font-family: var(--font-body);
color: var(--text);
background: color-mix(in srgb, var(--panel-strong) 92%, transparent);
border: 1px solid color-mix(in srgb, var(--border) 86%, transparent);
border-radius: 999px;
cursor: pointer;
white-space: nowrap;
z-index: 10;
transition:
background 150ms ease-out,
border-color 150ms ease-out,
box-shadow 150ms ease-out;
}
.chat-new-messages:hover {
background: var(--panel);
border-color: color-mix(in srgb, var(--accent) 36%, transparent);
box-shadow: var(--shadow-sm);
}
.chat-new-messages svg {
width: 16px;
height: 16px;
stroke: currentColor;
fill: none;
stroke-width: 1.5px;
stroke-linecap: round;
stroke-linejoin: round;
flex-shrink: 0;
}
/* Chat compose - sticky at bottom */
.chat-compose {
position: sticky;
bottom: 0;
flex-shrink: 0;
display: flex;
flex-direction: column;
gap: 8px;
margin-top: auto;
/* Push to bottom of flex container */
padding: 6px 6px 6px;
background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg) 94%, black) 22%);
backdrop-filter: blur(4px);
z-index: 10;
}
/* Image attachments preview */
.chat-attachments {
display: inline-flex;
flex-wrap: wrap;
gap: 8px;
padding: 8px;
background: var(--panel);
border-radius: 8px;
border: 1px solid var(--border);
width: fit-content;
max-width: 100%;
align-self: flex-start;
/* Don't stretch in flex column parent */
}
.chat-attachment {
position: relative;
width: 80px;
height: 80px;
border-radius: 6px;
overflow: hidden;
border: 1px solid var(--border);
background: var(--bg);
}
.chat-attachment__img {
width: 100%;
height: 100%;
object-fit: contain;
}
.chat-attachment__remove {
position: absolute;
top: 4px;
right: 4px;
width: 20px;
height: 20px;
border-radius: 50%;
border: none;
background: rgba(0, 0, 0, 0.7);
color: #fff;
font-size: 12px;
line-height: 1;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 150ms ease-out;
}
.chat-attachment:hover .chat-attachment__remove {
opacity: 1;
}
.chat-attachment__remove:hover {
background: rgba(220, 38, 38, 0.9);
}
.chat-attachment__remove svg {
width: 12px;
height: 12px;
stroke: currentColor;
fill: none;
stroke-width: 2px;
}
/* Message images (sent images displayed in chat) */
.chat-message-images {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 8px;
}
.chat-message-image {
max-width: 300px;
max-height: 200px;
border-radius: 8px;
object-fit: contain;
cursor: pointer;
transition: transform 150ms ease-out;
}
.chat-message-image:hover {
transform: scale(1.02);
}
/* User message images align right */
.chat-group.user .chat-message-images {
justify-content: flex-end;
}
/* Compose input row - horizontal layout */
.chat-compose__row {
display: flex;
align-items: stretch;
gap: 12px;
flex: 1;
}
.chat-compose__field {
flex: 1 1 auto;
min-width: 0;
display: flex;
align-items: stretch;
}
/* Hide the "Message" label - keep textarea only */
.chat-compose__field > span {
display: none;
}
/* Override .field textarea min-height (180px) from components.css */
.chat-compose .chat-compose__field textarea {
width: 100%;
height: 40px;
min-height: 40px;
max-height: 150px;
padding: 9px 12px;
border-radius: var(--radius-md);
overflow-y: auto;
resize: none;
white-space: pre-wrap;
font-family: var(--font-body);
font-size: 14px;
line-height: 1.45;
border: 1px solid color-mix(in srgb, var(--input) 92%, transparent);
background: color-mix(in srgb, var(--card) 98%, transparent);
box-shadow: inset 0 1px 0 var(--card-highlight);
}
.chat-compose__field textarea:disabled {
opacity: 0.7;
cursor: not-allowed;
}
.chat-compose__actions {
flex-shrink: 0;
display: flex;
align-items: stretch;
gap: 8px;
}
.chat-compose .chat-compose__actions .btn {
padding: 0 16px;
font-size: 13px;
height: 40px;
min-height: 40px;
max-height: 40px;
line-height: 1;
white-space: nowrap;
box-sizing: border-box;
}
/* Chat controls - moved to content-header area, left aligned */
.chat-controls {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 8px;
flex-wrap: wrap;
}
.chat-controls__session {
min-width: 120px;
max-width: 220px;
}
.chat-controls__thinking {
display: flex;
align-items: center;
gap: 6px;
font-size: 13px;
}
/* Icon button style */
.btn--icon {
padding: 0 !important;
min-width: 32px;
height: 32px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
background: color-mix(in srgb, var(--secondary) 85%, transparent);
border-radius: var(--radius-md);
}
/* Controls separator — renders as a thin vertical divider */
.chat-controls__separator {
width: 1px;
height: 32px;
background: var(--border);
font-size: 0;
color: transparent;
overflow: hidden;
align-self: center;
flex-shrink: 0;
margin: 0 4px;
}
.btn--icon:hover {
background: var(--bg-hover);
border-color: var(--border-strong);
}
/* Ensure chat toolbar toggles have a clearly visible active state. */
.chat-controls .btn--icon.active {
border-color: var(--accent);
background: var(--accent-subtle);
color: var(--accent);
}
.btn--icon svg {
display: block;
width: 16px;
height: 16px;
flex-shrink: 0;
stroke: currentColor;
fill: none;
stroke-width: 1.5px;
stroke-linecap: round;
stroke-linejoin: round;
}
.chat-controls__session select {
padding: 0 28px 0 10px;
font-size: 13px;
max-width: 220px;
overflow: hidden;
text-overflow: ellipsis;
}
.chat-controls__thinking {
display: flex;
align-items: center;
gap: 4px;
font-size: 12px;
padding: 0 10px;
height: 32px;
background: color-mix(in srgb, var(--secondary) 90%, transparent);
border-radius: var(--radius-md);
border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
}
@media (max-width: 640px) {
.chat-session {
min-width: 80px;
}
.chat-compose {
grid-template-columns: 1fr;
}
.chat-controls {
flex-wrap: wrap;
gap: 3px;
}
.chat-controls__session {
min-width: 80px;
max-width: 160px;
}
.chat-controls__separator {
display: none;
}
}