Files
Skald-Circle/web/css/copilot.css
T
dguiducci 40663373d4
Nightly Build / build (push) Successful in 7m45s
fix: make the new-chat + menu visible and clickable
The menu opened but never appeared: it was absolutely positioned inside
.copilot-tabs, whose overflow-x: auto clips on both axes, so the dropdown
was cut off inside the tab strip. And once visible, every click would have
landed on the transparent full-screen overlay (z-index 99) above the menu
(z-index 20), closing it instead of choosing an entry.

Anchor the menu to the + button with fixed positioning (the same escape
the model dropdown gets from living outside any clipping container) and
raise it to z-index 100, above the overlay it shares with the other pills.
2026-08-04 23:01:36 +01:00

320 lines
6.8 KiB
CSS

/* ── Copilot panel ─────────────────────────────────────────────────────────── */
app-copilot {
display: flex;
flex-direction: column;
position: relative;
width: var(--copilot-width);
height: 100%;
border-left: 1px solid var(--toolbar-border);
background: var(--copilot-bg);
flex-shrink: 0;
}
app-copilot.collapsed:not([mode="full"]) {
width: 0;
min-width: 0;
border: none;
overflow: hidden;
}
/* ── Full mode (home route): the chat fills the workspace ──────────────────── */
app-copilot[mode="full"] {
flex: 1;
width: auto;
min-width: 0;
border-left: none;
}
/* Center the conversation in a readable column on wide screens. */
app-copilot[mode="full"] .copilot-header,
app-copilot[mode="full"] .copilot-tabs,
app-copilot[mode="full"] .copilot-messages,
app-copilot[mode="full"] .copilot-input-area {
padding-left: max(1.25rem, calc((100% - 860px) / 2));
padding-right: max(1.25rem, calc((100% - 860px) / 2));
}
app-copilot[mode="full"] .copilot-header {
font-size: 1rem;
padding-top: 0.9rem;
padding-bottom: 0.9rem;
}
app-copilot[mode="full"] .copilot-msg {
max-width: 80%;
}
/* ── Welcome hero (empty state, full mode) ─────────────────────────────────── */
.chat-hero {
margin: auto;
text-align: center;
max-width: 560px;
padding: 2rem 1rem;
}
.chat-hero-logo {
width: 88px;
height: 88px;
border-radius: 24px;
box-shadow: var(--card-shadow);
}
.chat-hero-title {
font-size: 1.6rem;
font-weight: 700;
margin: 1.1rem 0 0.3rem;
}
.chat-hero-sub {
color: var(--placeholder-color);
font-size: 1rem;
margin: 0 0 1.75rem;
}
.chat-suggestions {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.6rem;
text-align: left;
}
.chat-suggestion {
display: flex;
align-items: center;
gap: 0.6rem;
border: 1px solid var(--card-border);
background: var(--card-bg);
color: var(--msg-assistant-text);
border-radius: var(--radius-md);
padding: 0.75rem 0.95rem;
font-size: 0.92rem;
cursor: pointer;
transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}
.chat-suggestion i {
color: var(--accent);
font-size: 1rem;
flex-shrink: 0;
}
.chat-suggestion:hover {
border-color: var(--accent);
transform: translateY(-1px);
box-shadow: var(--card-shadow);
}
@media (max-width: 560px) {
.chat-suggestions { grid-template-columns: 1fr; }
}
/* ── Privacy chip (chat header) ────────────────────────────────────────────── */
.chat-privacy {
display: inline-flex;
align-items: center;
gap: 0.3rem;
margin-left: 0.5rem;
font-size: 0.72rem;
font-weight: 600;
padding: 0.18rem 0.6rem;
border-radius: 999px;
background: var(--accent-soft);
color: var(--accent);
cursor: default;
}
.chat-privacy i {
font-size: 0.68rem;
}
.copilot-resize-handle {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 5px;
cursor: col-resize;
z-index: 20;
transition: background 0.15s;
}
.copilot-resize-handle:hover,
.copilot-resize-handle:active {
background: rgba(var(--accent-rgb), 0.35);
}
.copilot-expand-btn {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
flex: 1;
background: transparent;
border: none;
cursor: pointer;
color: var(--accent);
font-size: 1.1rem;
writing-mode: vertical-rl;
padding: 1rem 0;
}
.copilot-expand-btn:hover {
background: var(--sidebar-hover);
}
.copilot-collapse-btn {
flex-shrink: 0;
padding: 0.2rem 0.4rem;
line-height: 1;
}
.copilot-header {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.7rem 1rem;
border-bottom: 1px solid var(--toolbar-border);
font-weight: 600;
font-size: 0.875rem;
flex-shrink: 0;
}
.copilot-header i {
font-size: 1rem;
color: var(--accent);
}
/* ── Tabs (General + project chats) ─────────────────────────────────────────── */
.copilot-tabs {
display: flex;
align-items: stretch;
gap: 2px;
padding: 0 0.5rem;
border-bottom: 1px solid var(--toolbar-border);
overflow-x: auto;
flex-shrink: 0;
}
.copilot-tab {
display: flex;
align-items: center;
gap: 0.35rem;
max-width: 160px;
padding: 0.4rem 0.6rem;
font-size: 0.78rem;
cursor: pointer;
border-bottom: 2px solid transparent;
color: var(--bs-secondary-color, #6c757d);
white-space: nowrap;
}
.copilot-tab:hover {
background: var(--toolbar-border);
}
.copilot-tab--active {
color: var(--bs-body-color, inherit);
border-bottom-color: var(--accent);
font-weight: 600;
}
.copilot-tab-label {
overflow: hidden;
text-overflow: ellipsis;
}
.copilot-tab-close {
border: none;
background: none;
padding: 0;
line-height: 1;
cursor: pointer;
color: inherit;
opacity: 0.6;
flex-shrink: 0;
}
.copilot-tab-close:hover {
opacity: 1;
}
/* Inline rename: sits in the tab's own box so the bar doesn't reflow while
typing. Sized off the label so a long name still scrolls within its tab. */
.copilot-tab-rename {
width: 100%;
min-width: 80px;
border: none;
border-radius: var(--radius-sm);
padding: 0 0.2rem;
font: inherit;
color: var(--bs-body-color, inherit);
background: var(--bs-body-bg, #fff);
outline: 2px solid var(--accent);
}
/* ── New-chat menu ──────────────────────────────────────────────────────────── */
.copilot-tab-new {
position: relative;
display: flex;
align-items: center;
flex-shrink: 0;
}
.copilot-tab-add {
border: none;
background: none;
padding: 0.2rem 0.4rem;
line-height: 1;
cursor: pointer;
color: var(--bs-secondary-color, #6c757d);
border-radius: var(--radius-sm);
}
.copilot-tab-add:hover {
background: var(--toolbar-border);
color: var(--bs-body-color, inherit);
}
.copilot-tab-menu {
position: fixed;
z-index: 100;
min-width: 180px;
max-height: 260px;
overflow-y: auto;
padding: 0.25rem;
border: 1px solid var(--toolbar-border);
border-radius: var(--radius-md);
background: var(--bs-body-bg, #fff);
box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}
.copilot-tab-menu-item {
display: block;
width: 100%;
border: none;
background: none;
padding: 0.4rem 0.6rem;
border-radius: var(--radius-sm);
font-size: 0.82rem;
text-align: left;
cursor: pointer;
color: inherit;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.copilot-tab-menu-item:hover {
background: var(--toolbar-border);
}
.copilot-tab-menu-empty {
padding: 0.4rem 0.6rem;
font-size: 0.82rem;
color: var(--bs-secondary-color, #6c757d);
}