249 lines
5.7 KiB
CSS
249 lines
5.7 KiB
CSS
.app-layout {
|
|
display: grid;
|
|
grid-template-columns: 220px 1fr 340px;
|
|
grid-template-rows: 38px calc(100vh - 38px);
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
transition: grid-template-columns 0.25s ease, grid-template-rows 0.25s ease;
|
|
}
|
|
|
|
.app-layout[data-sidebar='closed'] {
|
|
grid-template-columns: 0 1fr 340px;
|
|
}
|
|
|
|
.app-layout[data-chat='closed'] {
|
|
grid-template-columns: 220px 1fr 0;
|
|
}
|
|
|
|
.app-layout[data-sidebar='closed'][data-chat='closed'] {
|
|
grid-template-columns: 0 1fr 0;
|
|
}
|
|
|
|
/* ─── Focus / distraction-free mode ───────────────────────────── */
|
|
/* Declared after sidebar/chat rules so it wins at equal specificity */
|
|
.app-layout[data-focus='on'] {
|
|
grid-template-columns: 0 1fr 0;
|
|
grid-template-rows: 0 100vh;
|
|
}
|
|
|
|
.app-layout[data-focus='on'] .app-titlebar {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 38px;
|
|
overflow: visible;
|
|
border: none;
|
|
border-bottom: 1px solid var(--border);
|
|
z-index: 200;
|
|
transform: translateY(-100%);
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.app-layout[data-focus='on'] .toolbar {
|
|
display: flex;
|
|
position: fixed;
|
|
top: 38px;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 199;
|
|
transform: translateY(-100%);
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.app-layout[data-focus='on'][data-peek='on'] .app-titlebar,
|
|
.app-layout[data-focus='on'][data-peek='on'] .toolbar {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.app-titlebar {
|
|
grid-column: 1 / -1;
|
|
grid-row: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 10px;
|
|
background: var(--sidebar-bg);
|
|
border-bottom: 1px solid var(--border);
|
|
-webkit-app-region: drag;
|
|
user-select: none;
|
|
position: relative;
|
|
}
|
|
|
|
.app-titlebar-title {
|
|
font-size: 12px;
|
|
font-family: var(--font-sans);
|
|
font-weight: 600;
|
|
letter-spacing: 0.08em;
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
/* ─── Three-segment layout toggle ─────────────────────────────── */
|
|
.app-layout-toggle {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
-webkit-app-region: no-drag;
|
|
}
|
|
|
|
.app-layout-toggle-seg {
|
|
width: 16px;
|
|
height: 12px;
|
|
border-radius: 2px;
|
|
border: 1px solid var(--border);
|
|
background: none;
|
|
cursor: pointer;
|
|
padding: 0;
|
|
transition: background 0.15s, border-color 0.15s;
|
|
}
|
|
|
|
.app-layout-toggle-seg:hover {
|
|
border-color: var(--text-muted);
|
|
}
|
|
|
|
.app-layout-toggle-seg.active {
|
|
background: var(--text-muted);
|
|
border-color: var(--text-muted);
|
|
}
|
|
|
|
.app-layout-toggle-seg:disabled {
|
|
opacity: 0.25;
|
|
cursor: default;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Middle segment: wider, non-interactive, always "on" */
|
|
.app-layout-toggle-seg--mid {
|
|
width: 22px;
|
|
cursor: default;
|
|
background: var(--text-muted);
|
|
border-color: var(--text-muted);
|
|
opacity: 0.35;
|
|
}
|
|
|
|
/* ─── Right-side controls cluster ─────────────────────────────── */
|
|
.app-titlebar-right {
|
|
position: absolute;
|
|
right: 12px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
-webkit-app-region: no-drag;
|
|
}
|
|
|
|
/* ─── Theme toggle button ──────────────────────────────────────── */
|
|
.app-titlebar-theme-btn {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-muted);
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
padding: 2px 4px;
|
|
border-radius: 4px;
|
|
line-height: 1;
|
|
-webkit-app-region: no-drag;
|
|
transition: color 0.15s;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.app-titlebar-theme-btn:hover {
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.app-titlebar-theme-btn.active {
|
|
color: var(--accent);
|
|
}
|
|
|
|
.app-titlebar-icon-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
}
|
|
|
|
/* ─── Sidebar ──────────────────────────────────────────────────── */
|
|
.sidebar {
|
|
grid-row: 2;
|
|
background: var(--sidebar-bg);
|
|
border-right: 1px solid var(--border);
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.sidebar-nav {
|
|
display: flex;
|
|
align-items: center;
|
|
border-bottom: 1px solid var(--border);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.sidebar-nav-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 8px 12px;
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-muted);
|
|
cursor: pointer;
|
|
transition: color 0.15s, background 0.15s;
|
|
border-radius: 0;
|
|
}
|
|
|
|
.sidebar-nav-btn:hover {
|
|
color: var(--text-primary);
|
|
background: var(--active-bg);
|
|
}
|
|
|
|
.sidebar-nav-btn.active {
|
|
color: var(--accent);
|
|
}
|
|
|
|
.sidebar-nav-icon {
|
|
font-size: 14px;
|
|
line-height: 1;
|
|
}
|
|
|
|
/* ─── Editor area ──────────────────────────────────────────────── */
|
|
.editor-area {
|
|
grid-row: 2;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: visible;
|
|
background: var(--editor-bg);
|
|
}
|
|
|
|
/* Flex row containing the optional outline panel + the CodeMirror editor */
|
|
.editor-body {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: row;
|
|
overflow: visible;
|
|
min-height: 0;
|
|
position: relative;
|
|
}
|
|
|
|
/* ─── Page backdrop (fixed paper surface, text scrolls over it) ── */
|
|
.page-backdrop {
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
background: var(--page-bg);
|
|
box-shadow: 0 0 24px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.18);
|
|
pointer-events: none;
|
|
z-index: 0;
|
|
}
|
|
|
|
/* ─── Chat area ────────────────────────────────────────────────── */
|
|
.chat-area {
|
|
grid-row: 2;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|