Files
pi-webui/client/app.css
T
2026-06-25 17:47:15 +00:00

458 lines
8.7 KiB
CSS

@import "@mariozechner/pi-web-ui/app.css";
@font-face {
font-family: "B612";
src: url("./fonts/B612-Regular.ttf") format("truetype");
font-style: normal;
font-weight: 400;
font-display: swap;
}
@font-face {
font-family: "B612";
src: url("./fonts/B612-Bold.ttf") format("truetype");
font-style: normal;
font-weight: 700;
font-display: swap;
}
:root {
--app-font-family: "B612", sans-serif;
--app-font-size: 14px;
--app-line-height: 1.45;
--app-font-weight-normal: 400;
--app-font-weight-strong: 700;
--app-radius: 8px;
--app-space-1: 4px;
--app-space-2: 8px;
--app-space-3: 12px;
--app-space-4: 16px;
--accent-foreground: oklch(45% 0.18 155);
--sidebar-width: 300px;
font-family: var(--app-font-family);
font-size: var(--app-font-size);
line-height: var(--app-line-height);
}
.dark {
--accent-foreground: oklch(72% 0.19 155);
}
html,
body {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}
body,
button,
input,
select,
textarea,
message-editor,
message-list,
streaming-message-container,
theme-toggle {
font-family: var(--app-font-family) !important;
font-size: var(--app-font-size) !important;
line-height: var(--app-line-height) !important;
}
button,
input,
select,
textarea {
font: inherit;
}
/* Keep the whole UI at one text size even where Tailwind utilities or
component defaults request smaller/larger UI text. */
.text-xs,
.text-sm,
.text-\[10px\],
.session-item-title,
.session-item-preview,
.session-item-meta,
.model-button,
.model-filter,
.thinking-select,
.model-option,
.model-scope-row,
.model-scope-toggle,
.status-pill,
.tool-count,
.empty-state,
.error-banner,
.sidebar-title,
.sidebar-empty,
.sidebar-search-input,
.sidebar-load-more,
.message-load-older {
font-size: var(--app-font-size) !important;
line-height: var(--app-line-height) !important;
}
.font-semibold,
.sidebar-title,
.session-item-title {
font-weight: var(--app-font-weight-strong) !important;
}
#app {
height: 100%;
display: flex;
flex-direction: row;
overflow: hidden;
}
/* ── Sidebar ── */
.sidebar-overlay {
position: fixed;
inset: 0;
z-index: 40;
background: rgba(0, 0, 0, 0.5);
opacity: 0;
pointer-events: none;
transition: opacity 200ms ease;
}
.sidebar-overlay.open {
opacity: 1;
pointer-events: auto;
}
.sidebar-panel {
position: fixed;
top: 0;
left: 0;
bottom: 0;
z-index: 50;
width: var(--sidebar-width);
max-width: 85vw;
transform: translateX(-100%);
transition: transform 200ms ease;
display: flex;
flex-direction: column;
background: var(--card);
border-right: 1px solid var(--border);
box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
}
.sidebar-panel.open {
transform: translateX(0);
}
.sidebar-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--app-space-3) var(--app-space-4);
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.sidebar-title {
color: var(--foreground);
}
.icon-button {
padding: 6px;
border-radius: var(--app-radius);
border: none;
background: transparent;
cursor: pointer;
color: var(--foreground);
display: flex;
}
.icon-button:hover {
background: var(--accent);
}
.sidebar-empty {
display: flex;
align-items: center;
justify-content: center;
padding: 48px 0;
color: var(--muted-foreground);
}
.sidebar-loading-more {
padding: var(--app-space-3) 0;
}
.sidebar-search {
padding: var(--app-space-2) var(--app-space-3);
border-bottom: 1px solid var(--border);
background: var(--card);
}
.sidebar-search-input {
width: 100%;
padding: 7px 9px;
border: 1px solid var(--border);
border-radius: var(--app-radius);
background: var(--background);
color: var(--foreground);
outline: none;
}
.sidebar-search-input:focus {
border-color: var(--ring);
box-shadow: 0 0 0 2px color-mix(in oklab, var(--ring) 22%, transparent);
}
.sidebar-load-more {
display: block;
width: calc(100% - 24px);
margin: var(--app-space-3) auto;
padding: var(--app-space-2);
border: 1px solid var(--border);
border-radius: var(--app-radius);
background: var(--secondary);
color: var(--secondary-foreground);
cursor: pointer;
}
.sidebar-load-more:hover {
background: var(--accent);
}
/* Session items */
.session-item {
display: block;
width: 100%;
text-align: left;
padding: 10px 14px;
border: none;
border-bottom: 1px solid var(--border);
background: transparent;
cursor: pointer;
transition: background-color 150ms ease;
border-left: 3px solid transparent;
}
.session-item:hover {
background: color-mix(in oklab, var(--accent) 40%, transparent);
}
.session-item.active {
background: color-mix(in oklab, var(--accent) 25%, transparent);
border-left-color: oklch(65% 0.2 155);
}
.session-item-title {
color: var(--foreground);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.session-item-preview {
color: var(--muted-foreground);
margin-top: 3px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.session-item-meta {
color: var(--muted-foreground);
margin-top: 4px;
display: flex;
align-items: center;
gap: 8px;
opacity: 0.7;
}
.progressive-tool-card {
border: 1px solid var(--border);
border-radius: 8px;
background: var(--card);
color: var(--card-foreground);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
overflow: hidden;
}
.progressive-tool-header {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
padding: 0.6rem 0.7rem;
border: none;
background: transparent;
color: var(--muted-foreground);
font: inherit;
font-size: 0.875rem;
text-align: left;
cursor: pointer;
}
.progressive-tool-header:hover {
color: var(--foreground);
background: color-mix(in oklab, var(--accent) 35%, transparent);
}
.progressive-tool-title {
display: inline-flex;
align-items: center;
gap: 0.5rem;
min-width: 0;
font-weight: 600;
}
.progressive-tool-title span:last-child {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.progressive-tool-call-summary {
min-width: 0;
color: var(--muted-foreground);
font-weight: 400;
opacity: 0.85;
}
.progressive-tool-call-summary::before {
content: "—";
margin-right: 0.5rem;
opacity: 0.7;
}
.progressive-tool-state {
flex: 0 0 auto;
font-size: 0.75rem;
opacity: 0.75;
}
.progressive-tool-status-dot {
width: 0.55rem;
height: 0.55rem;
border-radius: 999px;
background: var(--muted-foreground);
}
.progressive-tool-card.running .progressive-tool-status-dot,
.progressive-tool-card.waiting .progressive-tool-status-dot {
background: var(--primary, #2563eb);
animation: pulse 1.2s ease-in-out infinite;
}
.progressive-tool-card.complete .progressive-tool-status-dot {
background: #16a34a;
}
.progressive-tool-card.error .progressive-tool-status-dot {
background: var(--destructive, #dc2626);
}
.progressive-tool-body {
display: flex;
flex-direction: column;
gap: 0.65rem;
padding: 0 0.7rem 0.7rem;
}
.progressive-tool-section-label,
.progressive-tool-input-details summary {
margin-bottom: 0.25rem;
color: var(--muted-foreground);
font-size: 0.75rem;
font-weight: 600;
}
.progressive-tool-input-details summary {
cursor: pointer;
}
@keyframes pulse {
0%, 100% { opacity: 0.45; }
50% { opacity: 1; }
}
.model-option-current {
background: color-mix(in oklab, var(--accent) 50%, transparent);
}
.model-scope-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--app-space-2);
margin-bottom: var(--app-space-2);
color: var(--muted-foreground);
}
.model-scope-toggle {
border: 1px solid var(--border);
border-radius: var(--app-radius);
background: transparent;
color: var(--foreground);
cursor: pointer;
padding: 2px 8px;
}
.model-scope-toggle:hover {
background: var(--accent);
}
.message-load-older {
align-self: center;
padding: var(--app-space-2) var(--app-space-3);
border: 1px solid var(--border);
border-radius: 999px;
background: var(--secondary);
color: var(--secondary-foreground);
cursor: pointer;
}
.message-load-older:hover:not(:disabled) {
background: var(--accent);
}
.message-load-older:disabled {
opacity: 0.65;
cursor: default;
}
@media (max-width: 767px) {
.main-content {
width: 100% !important;
flex: none !important;
}
}
@media (min-width: 768px) {
.sidebar-overlay {
display: none;
}
.sidebar-panel {
position: relative;
transform: none;
box-shadow: none;
flex-shrink: 0;
width: 0;
overflow: hidden;
transition: width 200ms ease;
border-right: 1px solid var(--border);
}
.sidebar-panel.open {
width: var(--sidebar-width);
}
.sidebar-panel > .sidebar-inner {
width: var(--sidebar-width);
min-width: var(--sidebar-width);
}
}