Files
nanobot/webui/src/globals.css
T

1497 lines
42 KiB
CSS

@tailwind base;
@tailwind components;
@tailwind utilities;
@supports (content-visibility: auto) {
.apps-catalog-row {
content-visibility: auto;
contain-intrinsic-size: auto 4.25rem;
}
}
/* Design tokens — HSL form, sourced from shadcn/ui's "neutral" palette. */
@layer base {
:root {
color-scheme: light;
--background: 0 0% 100%;
--foreground: 240 3% 12%;
--card: 0 0% 100%;
--card-foreground: 240 3% 12%;
--popover: 0 0% 100%;
--popover-foreground: 240 3% 12%;
--primary: 240 4% 16%;
--primary-foreground: 0 0% 98%;
--secondary: 0 0% 96.1%;
--secondary-foreground: 0 0% 9%;
--muted: 0 0% 96.1%;
--muted-foreground: 0 0% 45.1%;
--accent: 0 0% 96.1%;
--accent-foreground: 0 0% 9%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 98%;
--border: 40 8% 90.5%;
--input: 40 8% 90.5%;
--ring: 0 0% 3.9%;
--inline-token-highlight: #ef8e30;
--usage-token: 29 86% 56%;
--session-handle-lightness: 0.5;
--session-handle-chroma: 0.12;
--temporary-control-active: #ef8e30;
--temporary-foreground: 17 88% 32%;
--radius: 0.4375rem;
/* Shared shape scale: marks, compact content, controls, and progressively larger surfaces. */
--radius-mark: 0.25rem;
--radius-compact: 0.5rem;
--radius-control: 0.75rem;
--radius-floating: 1.125rem;
--radius-panel: 1.375rem;
--radius-modal: 1.375rem;
--radius-prominent: 1.75rem;
--radius-pill: 9999px;
--content-column-width: 49.5rem;
--sidebar: 40 8% 96.8%;
--sidebar-foreground: 0 0% 3.9%;
--sidebar-content: 240 3% 30%;
--sidebar-muted-foreground: 240 2% 44%;
--sidebar-selected: 40 1% 89.4%;
--sidebar-accent: 0 0% 95.8%;
--sidebar-accent-foreground: 0 0% 9%;
--sidebar-border: 40 8% 90.5%;
--settings-canvas: var(--background);
--settings-surface: 60 6% 96.7%;
--automation-view-track: hsl(0 0% 91%);
--scrollbar-thumb: hsl(var(--muted-foreground) / 0.26);
--scrollbar-thumb-hover: hsl(var(--muted-foreground) / 0.42);
}
.dark {
color-scheme: dark;
--background: 0 0% 19%;
--foreground: 240 4% 96%;
--card: 0 0% 22%;
--card-foreground: 240 4% 96%;
--popover: var(--card);
--popover-foreground: 240 4% 96%;
--primary: 240 5% 98%;
--primary-foreground: 0 0% 9%;
--secondary: var(--card);
--secondary-foreground: 0 0% 98%;
--muted: var(--card);
--muted-foreground: 0 0% 65%;
--accent: 0 0% 25%;
--accent-foreground: 0 0% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 0% 98%;
--border: 0 0% 28%;
--input: var(--border);
--ring: 0 0% 83.1%;
--inline-token-highlight: #ef8e30;
--session-handle-lightness: 0.75;
--session-handle-chroma: 0.11;
--temporary-control-active: #ef8e30;
--temporary-foreground: 32 98% 73%;
--sidebar: var(--card);
--sidebar-foreground: 0 0% 98%;
--sidebar-content: 240 3% 84%;
--sidebar-muted-foreground: 240 2% 70%;
--sidebar-selected: 0 0% 29.8%;
--sidebar-accent: var(--background);
--sidebar-accent-foreground: 0 0% 98%;
--sidebar-border: var(--border);
--settings-canvas: var(--background);
--settings-surface: var(--card);
--automation-view-track: hsl(var(--muted) / 0.65);
--scrollbar-thumb: hsl(var(--muted-foreground) / 0.28);
--scrollbar-thumb-hover: hsl(var(--muted-foreground) / 0.44);
}
}
@layer base {
* {
@apply border-border;
}
html,
body,
#root {
@apply h-full;
}
body {
@apply bg-background text-foreground font-sans antialiased;
overflow: hidden;
}
#root.visual-viewport {
position: fixed;
top: var(--app-viewport-top);
left: 0;
width: 100%;
height: var(--app-viewport-height);
}
/* A landscape keyboard can leave less room than the composer needs. Keep
navigation reachable and scroll the composer instead of overlapping it. */
#root.visual-viewport .workbench-body {
min-height: 2.75rem;
}
#root.short-visual-viewport .workbench-composer-footer {
max-height: max(0px, calc(var(--app-viewport-height) - 2.75rem));
overflow-y: auto;
}
/* Body portals share the viewport owner's short-frame state. A landscape
keyboard needs input and results beside each other, not stacked. */
@media (min-width: 640px) {
body:has(> #root.short-visual-viewport) .session-search-dialog {
flex-direction: row;
}
body:has(> #root.short-visual-viewport) .session-search-input {
width: 40%;
height: auto;
border-bottom-width: 0;
border-right-width: 1px;
}
body:has(> #root.short-visual-viewport) .session-search-label {
@apply sr-only;
}
}
* {
scrollbar-color: var(--scrollbar-thumb) transparent;
scrollbar-width: thin;
}
*::-webkit-scrollbar {
width: 8px;
height: 8px;
}
*::-webkit-scrollbar-track {
background: transparent;
}
*::-webkit-scrollbar-thumb {
background-color: var(--scrollbar-thumb);
border-radius: var(--radius-pill);
}
*::-webkit-scrollbar-thumb:hover {
background-color: var(--scrollbar-thumb-hover);
}
*::-webkit-scrollbar-corner {
background: transparent;
}
::selection {
@apply bg-primary/15;
}
}
@layer utilities {
.composer-model-badge {
position: relative;
isolation: isolate;
overflow: hidden;
}
.kv-cache-not-reused {
background: hsl(var(--usage-token) / 0.84);
}
.kv-cache-reused {
background-color: hsl(var(--usage-token) / 0.1);
background-image: repeating-linear-gradient(
135deg,
hsl(var(--usage-token) / 0.46) 0,
hsl(var(--usage-token) / 0.46) 1px,
transparent 1px,
transparent 4px
);
}
.dark .kv-cache-not-reused {
background: hsl(var(--usage-token) / 0.92);
}
.dark .kv-cache-reused {
background-color: hsl(var(--usage-token) / 0.15);
background-image: repeating-linear-gradient(
135deg,
hsl(var(--usage-token) / 0.58) 0,
hsl(var(--usage-token) / 0.58) 1px,
transparent 1px,
transparent 4px
);
}
.composer-model-badge::before {
content: "";
position: absolute;
inset: 0;
z-index: 0;
pointer-events: none;
background-color: rgb(236 141 49);
opacity: 0;
transition: opacity 180ms ease-out;
}
.composer-model-badge[data-fallback="true"] {
border-color: rgb(236 141 49 / 0.38);
}
.composer-model-badge[data-fallback="true"]::before {
opacity: 0.1;
}
.dark .composer-model-badge[data-fallback="true"]::before {
opacity: 0.15;
}
.composer-model-badge > * {
position: relative;
z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
.composer-model-badge::before {
transition-duration: 150ms;
}
}
.host-drag-region {
-webkit-app-region: drag;
}
.host-no-drag {
-webkit-app-region: no-drag;
}
html.native-host,
html.native-host body,
html.native-host #root {
background: transparent;
}
html.native-host body {
overflow: hidden;
}
.host-window-shell,
.host-sidebar-glass {
--host-glass-spot: hsl(var(--background) / 0.42);
--host-glass-start: hsl(var(--sidebar) / 0.5);
--host-glass-end: hsl(var(--sidebar) / 0.3);
background:
radial-gradient(
circle at 18% 0%,
var(--host-glass-spot),
transparent 34rem
),
linear-gradient(
180deg,
var(--host-glass-start),
var(--host-glass-end)
);
background-attachment: fixed, fixed;
-webkit-backdrop-filter: saturate(185%) blur(34px);
backdrop-filter: saturate(185%) blur(34px);
}
.host-sidebar-glass {
background: hsl(var(--sidebar) / 0.94);
-webkit-backdrop-filter: saturate(145%) blur(18px);
backdrop-filter: saturate(145%) blur(18px);
box-shadow: 14px 0 32px -30px rgb(0 0 0 / 0.12);
}
.dark .host-window-shell,
.dark .host-sidebar-glass {
--host-glass-spot: hsl(var(--foreground) / 0.06);
--host-glass-start: hsl(var(--sidebar) / 0.48);
--host-glass-end: hsl(var(--sidebar) / 0.3);
}
.dark .host-sidebar-glass {
background: hsl(var(--sidebar) / 0.96);
box-shadow: 14px 0 34px -30px rgb(0 0 0 / 0.34);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
.host-sidebar-glass {
background: hsl(var(--sidebar) / 0.92);
}
}
html.native-host * {
scrollbar-width: none;
scrollbar-gutter: auto !important;
}
html.native-host *::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
}
/* Keep the outer document rhythm clean at message boundaries. */
.markdown-content > :first-child {
@apply mt-0;
}
.markdown-content > :last-child {
@apply mb-0;
}
/* Override Tailwind Typography's built-in colors with our design tokens
so assistant messages use the same --foreground as user messages. */
.markdown-content {
--tw-prose-body: hsl(var(--foreground));
--tw-prose-headings: hsl(var(--foreground));
--tw-prose-bold: hsl(var(--foreground));
--tw-prose-lead: hsl(var(--foreground));
line-height: var(--cjk-line-height);
}
.markdown-content .contains-task-list {
@apply list-none pl-0;
}
.markdown-content .task-list-item {
@apply list-none pl-0;
}
/* CJK-friendly line-height: prose paragraphs default to 1.625 which is
tight for Chinese/Japanese/Korean characters. Bump to 1.8 for better
readability when the browser detects a CJK primary font. */
:lang(zh),
:lang(zh-CN),
:lang(zh-TW),
:lang(zh-HK),
:lang(ja),
:lang(ko) {
--cjk-line-height: 1.8;
}
:root {
--cjk-line-height: 1.625;
}
/* L→R sheen clipped to live activity labels. The highlight lives inside
the glyphs, not in the row background, so dark mode stays quiet. */
@keyframes streaming-text-sheen-ltr {
0% {
background-position: 140% 50%;
}
100% {
background-position: -40% 50%;
}
}
.streaming-text-sheen {
position: relative;
color: hsl(var(--muted-foreground));
}
.file-reference-sheen {
color: inherit;
}
.streaming-text-sheen::after {
content: attr(data-sheen-text);
position: absolute;
inset: 0;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
pointer-events: none;
color: transparent;
background: linear-gradient(
90deg,
transparent 0%,
transparent 38%,
hsl(var(--foreground) / 0.98) 50%,
transparent 62%,
transparent 100%
);
background-size: 260% 100%;
background-position: 140% 50%;
background-repeat: no-repeat;
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: streaming-text-sheen-ltr 2.8s ease-in-out infinite;
}
.dark .streaming-text-sheen::after {
background-image: linear-gradient(
90deg,
transparent 0%,
transparent 38%,
hsl(var(--foreground) / 0.98) 50%,
transparent 62%,
transparent 100%
);
}
@media (prefers-reduced-motion: reduce) {
.streaming-text-sheen::after {
animation: none;
content: "";
}
.streaming-text-fallback::after {
animation: none;
}
}
/**
* The composer is one persistent grid item in both landing and thread
* layouts. On desktop, the landing's trailing flexible row holds it at the
* visual center; collapsing only that row lets the same element dock at the
* bottom without a remount or a transform clone.
*/
.thread-layout {
--thread-composer-fade-height: 2.25rem;
grid-template-rows: minmax(min-content, 1fr) auto 0fr;
transition: grid-template-rows 220ms ease-out;
}
.thread-layout[data-layout="thread"] {
grid-template-rows: minmax(0, 1fr) auto 0fr;
}
.thread-layout[data-layout="external"] {
grid-template-rows: minmax(0, 1fr);
}
@media (min-width: 640px) {
.thread-layout[data-layout="hero"] {
grid-template-rows: minmax(min-content, 1fr) auto 1fr;
}
}
/**
* Keep the transcript and composer visually continuous. The scrollport owns
* the fade because overflow clips its contents before an adjacent overlay
* can soften the edge. The matching in-flow gap keeps the last line fully
* visible once the user reaches the bottom.
*/
.thread-message-viewport {
-webkit-mask-image: linear-gradient(
to bottom,
#000 0,
#000 calc(100% - var(--thread-composer-fade-height)),
transparent 100%
);
mask-image: linear-gradient(
to bottom,
#000 0,
#000 calc(100% - var(--thread-composer-fade-height)),
transparent 100%
);
}
.thread-message-end-gap {
height: var(--thread-composer-fade-height);
}
.thread-composer-dock {
background: hsl(var(--background));
}
@keyframes composer-status-strip-enter {
0% {
max-height: 0;
opacity: 0;
transform: translateY(10px) scale(0.985);
}
72% {
max-height: var(--composer-strip-max-height, 46px);
opacity: 1;
transform: translateY(-1px) scale(1.004);
}
100% {
max-height: var(--composer-strip-max-height, 46px);
opacity: 1;
transform: translateY(0) scale(1);
}
}
@keyframes composer-status-strip-exit {
0% {
max-height: var(--composer-strip-max-height, 46px);
opacity: 1;
transform: translateY(0) scale(1);
}
100% {
max-height: 0;
opacity: 0;
transform: translateY(8px) scale(0.99);
}
}
.composer-status-strip {
transform-origin: bottom center;
will-change: max-height, opacity, transform;
}
.composer-status-strip[data-state="enter"] {
animation: composer-status-strip-enter 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.composer-status-strip[data-state="exit"] {
animation: composer-status-strip-exit 180ms ease-in both;
}
.composer-status-drawer {
--composer-status-drawer-duration: 220ms;
--composer-status-drawer-easing: ease-out;
display: grid;
grid-template-rows: 0fr;
pointer-events: none;
transition:
grid-template-rows var(--composer-status-drawer-duration)
var(--composer-status-drawer-easing);
}
.composer-status-drawer[data-state="open"] {
grid-template-rows: 1fr;
pointer-events: auto;
}
.composer-status-drawer-clip {
min-height: 0;
overflow: hidden;
}
.composer-status-drawer-content {
opacity: 0;
transform: translateY(8px);
transform-origin: bottom center;
transition:
opacity var(--composer-status-drawer-duration)
var(--composer-status-drawer-easing),
transform var(--composer-status-drawer-duration)
var(--composer-status-drawer-easing);
}
.composer-status-drawer[data-state="open"] .composer-status-drawer-content {
opacity: 1;
transform: translateY(0);
}
/* Shared in-flow disclosure: animate intrinsic height without measuring it. */
.inline-disclosure {
--inline-disclosure-duration: 220ms;
display: grid;
grid-template-rows: 0fr;
opacity: 0;
pointer-events: none;
}
.inline-disclosure[data-state="open"] {
--inline-disclosure-duration: 240ms;
grid-template-rows: 1fr;
opacity: 1;
pointer-events: auto;
}
.inline-disclosure-clip {
min-height: 0;
overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
.expandable-text {
transition: height 240ms cubic-bezier(0.4, 0, 0.2, 1);
}
.inline-disclosure {
transition:
grid-template-rows var(--inline-disclosure-duration)
cubic-bezier(0.4, 0, 0.2, 1),
opacity var(--inline-disclosure-duration) ease-in-out;
}
.inline-disclosure-content {
transform: translateY(-6px);
transition: transform var(--inline-disclosure-duration)
cubic-bezier(0.4, 0, 0.2, 1);
}
.inline-disclosure[data-state="open"] .inline-disclosure-content {
transform: translateY(0);
}
}
@keyframes queued-prompt-row-enter {
0% {
opacity: 0;
transform: translateY(6px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
.queued-prompt-row {
animation: queued-prompt-row-enter 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@media (prefers-reduced-motion: reduce) {
.composer-status-strip {
will-change: auto;
}
.composer-status-strip[data-state] {
animation: none;
}
.composer-status-drawer {
transition-duration: 0.01ms;
}
.composer-status-drawer-content {
transform: none;
transition-duration: 120ms, 0.01ms;
}
.thread-layout {
transition-duration: 0.01ms;
}
.queued-prompt-row {
animation: none;
}
}
.thread-workspace {
container: thread-workspace / inline-size;
}
.thread-preview-layout {
container: thread-preview-layout / inline-size;
}
/* A split needs 420px for the conversation plus 360px for the preview.
Narrow workbench panes use the same contained overlay as a phone. */
@container thread-preview-layout (min-width: 780px) {
.file-preview-pane {
position: relative;
z-index: auto;
width: var(--file-preview-slot-width);
min-width: 0;
flex-shrink: 0;
}
.file-preview-content {
width: var(--file-preview-width);
padding-bottom: 0;
}
.file-preview-resize {
display: flex;
}
}
@container thread-preview-layout (width < 780px) {
/* Covered conversation controls must not remain in the keyboard/AT order. */
.thread-preview-layout[data-preview-open] > .thread-conversation {
visibility: hidden;
}
}
/* Split content leaves no margin for floating conversation controls. */
.thread-workspace:has([data-file-preview-panel]) > * {
--thread-header-position: relative;
}
/* Keep room for the 49.5rem message column and controls in the side margin. */
@container thread-workspace (max-width: 72rem) {
.thread-workspace > * {
--thread-header-position: relative;
}
}
.workbench-pane {
transform-origin: top left;
}
/** Goal halo: pale sky blue (not ``--primary``, which often reads as neutral gray). */
@keyframes goal-shell-glow-breathe {
0%,
100% {
filter: drop-shadow(0 0 10px hsl(204 72% 52% / 0.22))
drop-shadow(0 0 24px hsl(199 80% 58% / 0.14));
}
50% {
filter: drop-shadow(0 0 17px hsl(204 78% 48% / 0.32))
drop-shadow(0 0 38px hsl(199 85% 55% / 0.2));
}
}
.goal-shell-glow {
animation: goal-shell-glow-breathe 4.8s ease-in-out infinite;
}
@keyframes goal-shell-glow-breathe-dark {
0%,
100% {
filter: drop-shadow(0 0 12px hsl(198 90% 72% / 0.28))
drop-shadow(0 0 28px hsl(195 95% 65% / 0.16));
}
50% {
filter: drop-shadow(0 0 20px hsl(198 95% 78% / 0.42))
drop-shadow(0 0 42px hsl(195 100% 70% / 0.24));
}
}
.dark .goal-shell-glow {
animation-name: goal-shell-glow-breathe-dark;
}
@media (prefers-reduced-motion: reduce) {
.goal-shell-glow {
animation: none;
filter: drop-shadow(0 0 14px hsl(204 70% 50% / 0.24));
}
.dark .goal-shell-glow {
filter: drop-shadow(0 0 14px hsl(198 88% 70% / 0.32));
}
}
/* Subtle scrollbar that doesn't fight the dark background. */
.scrollbar-thin {
scrollbar-width: thin;
scrollbar-color: hsl(var(--muted-foreground) / 0.4) transparent;
}
.scrollbar-thin::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
background-color: hsl(var(--muted-foreground) / 0.4);
border-radius: var(--radius-pill);
}
.scrollbar-track-transparent {
scrollbar-gutter: stable;
}
.scrollbar-track-transparent::-webkit-scrollbar-track {
background: transparent;
}
/*
* Mobile responsive safety net — keep the chat viewport + composer inside a
* narrow viewport (see #4693). These are containment rules: long markdown
* (URLs, branch names, file paths, code, tables) wraps or scrolls inside its
* own box instead of forcing the whole column — and thus the page — wider
* than 100vw. Desktop layout is unchanged; the rules only engage when content
* would otherwise overflow. Fenced code blocks keep their own internal
* horizontal scroll (CodeBlock and the markdown <pre> wrappers already set
* overflow-x: auto), so clipping the thread column horizontally is safe.
*/
/* Prose container: allow it to shrink within its column and break long words
so long URLs / paths never stretch the conversation wider than 100vw. */
.markdown-content {
min-width: 0;
max-width: 100%;
overflow-wrap: anywhere;
word-wrap: break-word;
}
/* Long links and inline code break rather than stretch the column. */
.markdown-content a,
.markdown-content code {
overflow-wrap: anywhere;
word-wrap: break-word;
}
/* Fenced / pre blocks scroll inside their own box, never the page. */
.markdown-content pre,
.not-prose pre {
max-width: 100%;
overflow-x: auto;
}
/* Prism's Markdown table tokens must not pick up Tailwind's table layout. */
.not-prose pre .token.table {
display: inline;
}
/* Markdown tables wrap cell text to fit the conversation column. The
renderer's overflow-x:auto wrapper remains a fallback for content that
cannot shrink. */
/* Clip any residual horizontal bleed at the thread column edge. Vertical
scrolling and internal code-block scroll are unaffected. */
.thread-viewport-scrollbar {
overflow-x: hidden;
}
.thread-viewport {
container-name: thread-viewport;
container-type: inline-size;
}
@supports (content-visibility: auto) {
.thread-render-unit {
content-visibility: auto;
contain-intrinsic-size: auto 12rem;
}
}
.thread-prompt-rail {
display: none;
left: 1.75rem;
}
@media (min-width: 768px) {
.thread-prompt-rail {
display: block;
}
}
@container thread-viewport (max-width: 59rem) {
.thread-prompt-rail {
display: none;
}
}
}
.thread-message-row,
.message-block-menu-trigger,
[data-message-block-menu] {
--message-block-control-size: 1.75rem;
--message-block-action-width: 1.75rem;
--message-block-trigger-offset: 2rem;
}
.thread-message-row {
padding-inline-start: max(
calc(var(--message-block-trigger-offset) + 0.75rem),
calc((100% - var(--content-column-width)) / 2)
);
padding-inline-end: max(0.75rem, calc((100% - var(--content-column-width)) / 2));
}
.message-block-menu-trigger,
.message-block-hover-time {
pointer-events: none;
opacity: 0;
}
[data-user-text-bubble] > .message-block-menu-trigger {
/* The first text line is 28px tall, with py-2 around the bubble. */
top: calc((1rem + 28px - var(--message-block-control-size)) / 2);
}
[data-user-text-bubble] > .message-block-hover-time {
top: calc((1rem + 28px + var(--message-block-control-size)) / 2);
}
[data-context-block-active] .message-block-menu-trigger,
[data-message-context-menu-open] .message-block-menu-trigger,
.message-block-menu-trigger:focus-visible,
[data-context-block-active] .message-block-hover-time,
[data-message-context-menu-open] .message-block-hover-time,
.message-block-hover-time:focus-visible {
pointer-events: auto;
opacity: 1;
}
[data-block-context-rail] {
pointer-events: none;
opacity: 0;
transition: opacity 120ms ease-out;
}
[data-context-block-active] [data-block-context-rail],
[data-block-context-rail][data-block-context-expanded] {
pointer-events: auto;
opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
.message-block-menu-trigger {
transition: none;
}
[data-block-context-rail] {
transition: none;
}
}
@media (pointer: coarse) {
/* Readable form text avoids Safari's focus zoom without disabling the user's
pinch zoom. Keep this after utilities so compact desktop overrides cannot
shrink shared form fields on touch devices. Larger chat/search text stays
on its own typography; this is not a blanket rule for every input. */
.touch-text-input {
font-size: max(16px, 1rem);
}
.thread-message-row,
.message-block-menu-trigger,
[data-message-block-menu] {
--message-block-control-size: 2.75rem;
--message-block-action-width: 2rem;
--message-block-trigger-offset: 3rem;
}
.touch-target {
min-width: 2.75rem;
min-height: 2.75rem;
}
.touch-target.preview-tab-close {
opacity: 1;
}
/* Touch users cannot hover a sidebar row to discover its actions. */
.sidebar-action-trigger {
opacity: 1;
}
}
/* On phones, actions follow the message instead of taking a separate gutter. */
@media (max-width: 767px) {
.thread-message-row {
padding-inline: 1rem;
}
[data-message-mobile-actions],
[data-message-mobile-sheet] {
--message-block-control-size: 2.75rem;
--message-block-action-width: 2.75rem;
}
}
/*
* Composer controls adapt to their actual container, not just the viewport.
* Narrow layouts move access and usage into a separate metadata row.
*/
.thread-composer-surface {
container-name: thread-composer;
container-type: inline-size;
}
.thread-composer-footer-actions {
flex: 0 1 auto;
max-width: 58%;
}
.thread-composer-model-badge {
flex-shrink: 1;
}
.thread-composer-model-label-fade {
-webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 0.75rem), transparent);
mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 0.75rem), transparent);
}
.thread-composer-model-badge:not([data-switching="true"]):active > .composer-model-pill {
transform: scale(0.98);
}
.composer-model-pill-setup {
border-color: hsl(var(--border) / 0.72);
box-shadow:
inset 0 1px 0 rgb(255 255 255 / 0.62),
0 1px 2px hsl(var(--foreground) / 0.035);
transition-property: color, background-color, border-color, box-shadow, transform;
transition-duration: 180ms;
transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dark .composer-model-pill-setup {
box-shadow:
inset 0 1px 0 rgb(255 255 255 / 0.045),
0 1px 2px rgb(0 0 0 / 0.12);
}
.thread-composer-model-badge:hover > .composer-model-pill-setup {
border-color: hsl(var(--border));
background-color: hsl(var(--accent) / 0.7);
box-shadow:
inset 0 1px 0 rgb(255 255 255 / 0.72),
0 2px 5px hsl(var(--foreground) / 0.06);
}
.dark .thread-composer-model-badge:hover > .composer-model-pill-setup {
box-shadow:
inset 0 1px 0 rgb(255 255 255 / 0.07),
0 2px 5px rgb(0 0 0 / 0.16);
}
@keyframes composer-model-pill-setup-attention {
0%,
100% {
transform: translateX(0);
}
22% {
transform: translateX(-3px);
}
46% {
transform: translateX(3px);
}
68% {
transform: translateX(-2px);
}
86% {
transform: translateX(1px);
}
}
.composer-model-pill-setup-attention {
animation: composer-model-pill-setup-attention 280ms cubic-bezier(0.22, 0.8, 0.32, 1);
}
@keyframes composer-model-pill-viewport-enter {
from {
transform: scale(0.9074);
}
to {
transform: scale(1);
}
}
.composer-model-pill-viewport {
transform-origin: right center;
animation: composer-model-pill-viewport-enter 210ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
-webkit-mask-image: linear-gradient(to bottom, transparent, #000 4px, #000 calc(100% - 4px), transparent);
mask-image: linear-gradient(to bottom, transparent, #000 4px, #000 calc(100% - 4px), transparent);
}
.composer-model-pill-dock {
transform-origin: right center;
transition-property: none;
will-change: transform;
}
.composer-model-pill-track[data-settling="true"],
.composer-model-pill-track[data-settling="true"] .composer-model-pill-dock {
transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes settings-restart-breathe {
0%, 100% { opacity: 1; }
50% { opacity: 0.55; }
}
@media (prefers-reduced-motion: no-preference) {
.settings-restart-pending { animation: settings-restart-breathe 3s ease-in-out infinite; }
.settings-restart-pending:hover, .settings-restart-pending:focus-visible { animation: none; }
}
@keyframes preset-name-shake {
0%,
100% {
transform: translateX(0);
}
35% {
transform: translateX(-2px);
}
70% {
transform: translateX(2px);
}
}
@media (prefers-reduced-motion: reduce) {
.thread-composer-model-badge:not([data-switching="true"]):active > .composer-model-pill {
transform: none !important;
}
.composer-model-pill-setup {
transition: none;
}
.composer-model-pill-setup-attention {
animation: none;
}
.composer-model-pill-track[data-settling="true"],
.composer-model-pill-dock {
transition: none;
will-change: auto;
}
.composer-model-pill-viewport {
animation: none;
}
}
/* Narrow composers separate message actions from permissions and usage instead
* of shrinking touch targets or hiding the active model and access state. */
[data-compact-controls] .thread-composer-footer {
column-gap: 0.25rem;
padding: 0 0.5rem 0.5rem;
}
[data-compact-controls] .thread-composer-footer-primary,
[data-compact-controls] .thread-composer-footer-actions {
gap: 0.25rem;
}
[data-compact-controls] .thread-composer-footer-actions {
flex: none;
max-width: none;
}
[data-compact-controls] .thread-composer-action.touch-target {
flex: none;
width: 2.75rem;
height: 2.75rem;
min-width: 2.75rem;
min-height: 2.75rem;
}
[data-compact-controls] .thread-composer-model-badge {
max-width: 100%;
min-height: 2.75rem;
align-items: center;
}
/* Keep a 44px hit area around the quieter 36px attachment/send circles.
* The transparent pseudo-element belongs to the button, including its disabled
* state; margins reserve its space so adjacent controls never overlap it. */
[data-compact-controls] .thread-composer-round-action.touch-target {
position: relative;
width: 2.25rem;
height: 2.25rem;
min-width: 2.25rem;
min-height: 2.25rem;
margin: 0.25rem;
}
[data-compact-controls] .thread-composer-round-action::before {
content: "";
position: absolute;
inset: -0.3125rem;
border-radius: inherit;
}
[data-compact-controls] .composer-model-pill {
height: 2.25rem;
}
.thread-composer-meta .touch-target {
min-height: 2.75rem;
min-width: 2.75rem;
}
.thread-composer-meta .thread-composer-access {
max-width: 100%;
padding-inline: 0.5rem;
}
@media (forced-colors: active) {
[data-workbench-move-handle]:focus-visible {
outline: 2px solid CanvasText;
outline-offset: 2px;
}
}
@layer components {
@media (prefers-reduced-motion: no-preference) {
.segmented-control-indicator[data-animate="true"] {
transition-property: transform, width;
transition-duration: 220ms, 160ms;
transition-timing-function:
cubic-bezier(0.2, 0.95, 0.25, 1.08),
cubic-bezier(0.2, 0, 0, 1);
}
}
}
/* Settings grid: 4px baseline; 720px frame; 12 columns / 24px gutter on
desktop, 4 columns / 16px gutter on mobile. Rows share the same tracks. */
@layer components {
.settings-grid {
--settings-columns: 4;
--settings-gutter: 16px;
--settings-margin: 16px;
--settings-inset: 16px;
--settings-module-gap: 20px;
container-type: inline-size;
max-inline-size: 720px;
padding-inline: var(--settings-margin);
}
.settings-grid.settings-feature-page {
--settings-margin: 0.75rem;
max-inline-size: calc(var(--content-column-width) + 2 * var(--settings-margin));
}
.settings-grid.settings-feature-page.settings-automations-grid {
max-inline-size: calc(60rem + 2 * var(--settings-margin));
}
/* Stack a task's status below its title when the content column is narrow. */
.automations-page {
--settings-inset: 1rem;
container: automations / inline-size;
}
.automation-create-composer .thread-composer-surface {
max-inline-size: none;
}
.automation-create-composer .thread-composer-input textarea {
padding-inline: var(--settings-inset);
}
.automation-view-switch .segmented-control button {
padding-inline: calc(var(--settings-inset) - 0.5rem);
}
.automation-panel-toolbar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.5rem 1rem;
min-block-size: 4rem;
padding-block: 0.75rem;
padding-inline: 0.75rem 0.25rem;
}
.automation-create-composer .thread-composer-collapsible-layout {
padding-block-start: 0;
}
/* Match the main sidebar's lg visibility; its collapsed rail has no labels. */
@media (min-width: 1024px) {
.settings-feature-page[data-main-navigation-expanded="true"] .settings-feature-header {
margin-block-end: 0;
}
.settings-feature-page[data-main-navigation-expanded="true"] .settings-feature-header h1 {
@apply sr-only;
}
}
.automation-run-at-picker {
container: automation-run-at / inline-size;
}
@container automation-run-at (min-width: 18rem) {
.automation-run-at-fields { grid-template-columns: minmax(0, 1fr) 7rem; }
}
.automation-panel-filters {
margin-inline-start: auto;
}
.thread-composer-collapsible-layout {
container: composer-layout / inline-size;
}
.thread-composer-collapsible .thread-composer-input textarea:placeholder-shown {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.thread-composer-collapsible[data-compact] .thread-composer-input textarea {
display: block;
block-size: 3.125rem !important;
}
@container composer-layout (min-width: 40rem) {
.thread-composer-collapsible .thread-composer-input {
inline-size: 100%;
}
.thread-composer-collapsible .thread-composer-input textarea {
display: block;
min-block-size: 3.5rem;
padding-block: 1.125rem;
}
.thread-composer-collapsible[data-compact] .thread-composer-input {
inline-size: max(0px, calc(100% - var(--composer-compact-controls-width, 15rem) - 1.5rem));
}
.thread-composer-collapsible[data-compact] .thread-composer-input textarea {
display: block;
block-size: 3.5rem !important;
min-block-size: 3.5rem;
padding-block: 1.125rem;
}
.thread-composer-collapsible .thread-composer-footer {
min-block-size: 3.5rem;
margin-block-start: 0;
padding: 0.5rem;
pointer-events: none;
}
.thread-composer-collapsible[data-compact] .thread-composer-footer {
margin-block-start: -3.5rem;
}
.thread-composer-collapsible .thread-composer-footer-primary {
flex: 1 0 auto;
margin-inline-start: auto;
pointer-events: auto;
}
.thread-composer-collapsible[data-compact] .thread-composer-footer-primary {
flex-grow: 0;
}
.thread-composer-collapsible .thread-composer-footer-actions {
max-inline-size: none;
margin-inline-start: 0;
pointer-events: auto;
}
@media (prefers-reduced-motion: no-preference) {
.thread-composer-collapsible .thread-composer-input {
transition: inline-size 220ms ease-out;
}
.thread-composer-collapsible .thread-composer-footer {
transition: margin-block-start 220ms ease-out;
}
.thread-composer-collapsible .thread-composer-footer-primary {
transition: flex-grow 220ms ease-out;
}
}
}
.automation-calendar-grid { display: none; }
.automation-calendar-agenda { display: block; }
@container automations (min-width: 44rem) {
.automation-calendar-grid { display: block; }
.automation-calendar-agenda { display: none; }
.automation-calendar-weekdays {
display: grid;
grid-template-columns: repeat(7, minmax(0, 1fr));
}
.automation-calendar-weekdays > div {
padding: 8px 10px;
color: hsl(var(--muted-foreground));
font-size: 10px;
line-height: 16px;
text-align: end;
}
.automation-calendar-month {
display: grid;
grid-template-columns: repeat(7, minmax(0, 1fr));
}
.automation-calendar-day {
min-block-size: 112px;
min-inline-size: 0;
border-inline-end: 1px solid hsl(var(--border) / 0.55);
border-block-end: 1px solid hsl(var(--border) / 0.55);
}
.automation-calendar-day:nth-child(7n) { border-inline-end: 0; }
.automation-calendar-day:nth-last-child(-n + 7) { border-block-end: 0; }
}
.settings-stack > :not([hidden]) ~ :not([hidden]) {
margin-block-start: var(--settings-module-gap, 20px);
}
.settings-section-title {
margin-block-end: 20px;
padding-inline: var(--settings-inset, 16px);
line-height: 20px;
}
.settings-section-heading {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 8px 24px;
padding-inline: var(--settings-inset, 16px);
}
.settings-section-heading > .settings-section-title { margin: 0; padding: 0; }
.settings-stack > .settings-section-heading + :not([hidden]) { margin-block-start: 20px; }
.settings-row, .settings-footer {
display: grid;
grid-template-columns: repeat(var(--settings-columns, 4), minmax(0, 1fr));
column-gap: var(--settings-gutter, 16px);
row-gap: 12px;
align-items: center;
padding: 12px var(--settings-inset, 16px);
min-block-size: 60px;
}
.settings-row > *, .settings-footer > * { grid-column: 1 / -1; min-inline-size: 0; }
.settings-control { display: flex; align-items: center; max-inline-size: 100%; }
.settings-control > * { max-inline-size: 100%; }
.settings-control input, .settings-control textarea { max-inline-size: 100%; text-align: start; }
.settings-control input[type="number"] { font-variant-numeric: tabular-nums; }
.settings-footer { min-block-size: 60px; }
.settings-footer-auto { min-block-size: 40px; padding-block: 8px; row-gap: 0; }
.settings-footer-auto > :first-child { grid-column: 1 / -1; font-size: 12px; }
.settings-footer-auto > :nth-child(2):empty { display: none; }
.settings-row:has(> .settings-control > [role="switch"]) {
grid-template-columns: minmax(0, 1fr) auto;
column-gap: 24px;
}
.settings-row:has(> .settings-control > [role="switch"]) > :first-child { grid-column: 1; }
.settings-row:has(> .settings-control > [role="switch"]) > :nth-child(2) { grid-column: 2; }
.settings-disclosure > summary {
cursor: pointer;
padding: 12px var(--settings-inset, 16px);
border-radius: var(--radius-control, 12px);
font-size: 13px;
font-weight: 500;
line-height: 20px;
color: hsl(var(--muted-foreground));
}
.settings-disclosure > summary:hover { color: hsl(var(--foreground)); }
.settings-disclosure > summary:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.settings-disclosure[open] > summary { margin-block-end: 8px; }
.settings-list-row, .settings-list-inset { padding-inline: var(--settings-inset, 16px); }
.settings-list-row { min-block-size: 60px; border-radius: 12px; }
.sidebar-action-label:lang(zh) {
display: inline-block;
min-inline-size: var(--sidebar-label-width, 3em);
text-align: justify;
text-align-last: justify;
}
@media (hover: hover) {
.settings-hover:hover { background-color: hsl(var(--sidebar-foreground) / 0.055); }
.dark .settings-hover:hover { background-color: rgb(255 255 255 / 0.07); }
}
.settings-editor { padding: 16px var(--settings-inset, 16px); }
@media (min-width: 640px) {
.settings-grid { --settings-margin: 32px; }
.settings-grid.settings-feature-page { --settings-margin: 1rem; }
}
@container (min-width: 640px) {
.settings-grid .settings-row, .settings-grid .settings-footer {
--settings-columns: 12;
--settings-gutter: 24px;
}
.settings-grid .settings-control { justify-content: flex-end; }
.settings-grid .settings-row > :first-child,
.settings-grid .settings-footer > :first-child { grid-column: 1 / 8; }
.settings-grid .settings-row > :nth-child(2),
.settings-grid .settings-footer > :nth-child(2) { grid-column: 8 / -1; }
.settings-grid .settings-footer-auto > :first-child { grid-column: 1 / -1; }
.settings-grid .settings-row:has(.segmented-control) > :first-child { grid-column: 1 / 7; }
.settings-grid .settings-row:has(.segmented-control) > :nth-child(2) { grid-column: 7 / -1; }
}
@media (min-width: 768px) {
.settings-grid { --settings-inset: 24px; }
}
}
.sidebar-scroll-fade {
--sidebar-fade-top: 0px;
--sidebar-fade-bottom: 0px;
-webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--sidebar-fade-top), #000 calc(100% - var(--sidebar-fade-bottom)), transparent);
mask-image: linear-gradient(to bottom, transparent, #000 var(--sidebar-fade-top), #000 calc(100% - var(--sidebar-fade-bottom)), transparent);
}
.sidebar-child-list {
position: relative;
}
.sidebar-child-list::before {
content: "";
position: absolute;
inset-block: 4px;
inset-inline-start: -5px;
width: 1px;
background: hsl(var(--sidebar-foreground) / 0.12);
pointer-events: none;
}
.sidebar-scrollbar {
scrollbar-width: thin;
scrollbar-color: transparent transparent;
}
.sidebar-scrollbar:is(:hover, :has(:focus-visible), [data-scrolling="true"]) {
scrollbar-color: hsl(var(--sidebar-foreground) / 0.2) transparent;
}
@supports selector(::-webkit-scrollbar) {
.sidebar-scrollbar,
.sidebar-scrollbar:is(:hover, :has(:focus-visible), [data-scrolling="true"]) {
scrollbar-width: auto;
scrollbar-color: auto;
}
.sidebar-scrollbar::-webkit-scrollbar {
width: 10px;
height: 10px;
}
.sidebar-scrollbar::-webkit-scrollbar-button {
display: none;
width: 0;
height: 0;
}
.sidebar-scrollbar::-webkit-scrollbar-track {
background: transparent;
}
.sidebar-scrollbar::-webkit-scrollbar-thumb {
min-height: 32px;
border: 3.5px solid transparent;
border-radius: 999px;
background: transparent;
background-clip: padding-box;
transition: background-color 180ms ease-out;
}
.sidebar-scrollbar:is(:hover, :has(:focus-visible), [data-scrolling="true"])::-webkit-scrollbar-thumb {
background-color: hsl(var(--sidebar-foreground) / 0.2);
}
.sidebar-scrollbar::-webkit-scrollbar-thumb:hover,
.sidebar-scrollbar::-webkit-scrollbar-thumb:active {
background-color: hsl(var(--sidebar-foreground) / 0.38);
}
}
@media (prefers-reduced-motion: reduce) {
.sidebar-scrollbar::-webkit-scrollbar-thumb { transition: none; }
}