- **New app: GenOffice HTML.** Open, edit and generate .html pages: a source pane with a sandboxed live preview, click-to-select elements with a floating toolbar and style panel, device-size preview, image tools and a present mode. AI generates whole pages from a brief with style directions and offers page-wide Restyle, Theme and Summarize. Export to Word runs locally through the built-in html2docx converter (native, editable OOXML; no print-to-PDF detour). - **AI:** separate BYOK providers for web search, image generation and image/video analysis; new Codex App Server provider; Ask AI quotes the selected text and keeps it highlighted while it runs; custom AI panel text size; blocked requests retry through the Chromium network stack. - **App:** global AutoSave setting shared by every editor; AI panel text size and chat spellcheck toggles (genoffice#249); Czech (cs) UI locale (genoffice#259); Save As defaults to the document's folder; PDF export no longer aborts on CJK file paths on Windows. - **Docs:** Export as HTML; comments and replies edit in place from the comments pane; the caret can leave a trailing table (genoffice#266); spellcheck re-marks text as soon as it is re-enabled; AI edits are character-precise on partial selections; zoom keeps the scroll position; pasting a cell from Sheets takes the destination font. - **Sheets:** Find no longer freezes on wide or streamed grids; Replace searches as you type; cached values of external-workbook formulas are kept instead of #ERROR! (genoffice#235); "number stored as text" is a warning, not an error (genoffice#236); paste repeats into the target range like Excel; filter criteria survive save/reopen; saves retry when Windows locks the file; many Excel-fidelity fixes for column widths, row heights, charts, slicers, number formats and CJK fonts. - **Slides:** PDF export works for large presentations (genoffice#264); EMF/WMF picture fonts and East Asian theme fonts resolve correctly; decks with missing layouts or embedded styles still open; outline-only pie slices render. - **PDF:** highlight and underline geometry aligns with the text; Shift+arrows extend the selection instead of paging. - **Markdown:** Find and replace (Ctrl+F / Ctrl+H) (genoffice#253); mermaid code blocks render as diagrams (genoffice#263); better print quality. - Thanks to community contributors @GoodScholar, @aniruddhaadak80 and @Sun8854, and to @hanyscz, @qgzln, @zyp997, @bisslot, @krakotay and @Ben03151 for the reports. Co-authored-by: GenOffice <merrick-2002@users.noreply.github.com>
10702 lines
245 KiB
CSS
10702 lines
245 KiB
CSS
/* Per-app accent (word-blue family) + docs-only tokens.
|
||
* Chrome tokens (surface/text/border/…, AI panel --color-*) come from
|
||
* @genoffice/ui/tokens.css; nothing here may shadow those names. */
|
||
:root {
|
||
--word-blue: #185abd;
|
||
--word-blue-dark: #124a9e;
|
||
--word-heading: #2f5496;
|
||
--accent: var(--word-blue);
|
||
--accent-dark: var(--word-blue-dark);
|
||
--accent-soft: #e8f1fb;
|
||
|
||
--docs-heading-3: #1f3864;
|
||
--docs-accent-ghost: rgb(24 90 189 / 10%);
|
||
--docs-copilot-bg-a: #f5f0ff;
|
||
--docs-copilot-bg-b: #eef6ff;
|
||
--docs-swatch-outline: rgb(0 0 0 / 15%);
|
||
--docs-swatch-outline-strong: rgb(0 0 0 / 25%);
|
||
--docs-swatch-border: #a6a6a6;
|
||
--docs-ins-ink: #166534;
|
||
--docs-ins-bg: rgb(22 101 52 / 6%);
|
||
--docs-del-ink: #b91c1c;
|
||
--docs-del-bg: rgb(185 28 28 / 6%);
|
||
--docs-ai-error: #c62828;
|
||
--docs-ai-error-border: rgb(198 40 40 / 45%);
|
||
--docs-ai-error-bg: rgb(198 40 40 / 8%);
|
||
--docs-ok-ink: #2e7d32;
|
||
--docs-ok-bg: #e6f2e6;
|
||
--docs-ok-border: #a5d6a7;
|
||
--docs-ok-dot: #2e9e44;
|
||
--docs-chip-bg: #f6f8fc;
|
||
--docs-brand-ghost: rgb(15 127 255 / 8%);
|
||
--docs-brand-ghost-weak: rgb(15 127 255 / 6%);
|
||
--docs-brand-ring: rgb(15 127 255 / 40%);
|
||
--docs-focus-ring: rgb(35 36 37 / 20%);
|
||
--docs-focus-ring-blue: rgb(74 141 246 / 30%);
|
||
--docs-input-focus: #0f7fff;
|
||
--docs-input-ring: rgb(15 127 255 / 10%);
|
||
--docs-error-ring: rgb(239 68 68 / 10%);
|
||
--docs-scroll-thumb: rgb(0 0 0 / 25%);
|
||
--docs-tooltip-bg: #232425;
|
||
--docs-tooltip-ink: #ffffff;
|
||
--docs-shimmer-base: #666666;
|
||
--docs-shimmer-hi: #d9d9d9;
|
||
--docs-statusbar-bg: #f3f4f6;
|
||
--docs-statusbar-border: #e1e4e8;
|
||
--docs-statusbar-hover: rgb(0 0 0 / 8%);
|
||
--docs-zoom-slider: #8a8886;
|
||
--docs-ruler-bg: #f3f2f1;
|
||
--docs-ruler-tick: #b9b9b9;
|
||
--docs-ruler-border: #d6d6d6;
|
||
--docs-ruler-ink: #666;
|
||
--docs-ruler-btn-bg: #e0e0e0;
|
||
--docs-ruler-btn-hover: #d0d0d0;
|
||
--docs-ruler-btn-border: #ccc;
|
||
--docs-ruler-btn-ink: #333;
|
||
--docs-ruler-tab-guide: #aaa;
|
||
--docs-ruler-zone: rgb(0 0 0 / 8%);
|
||
--docs-tstyle-border: #b8bcc4;
|
||
--docs-tstyle-header: #7f8b9d;
|
||
--docs-tstyle-row: #eef1f5;
|
||
--docs-gap-cut: #b6c2d2;
|
||
--docs-pv-canvas: #525659;
|
||
--docs-overlay: rgb(0 0 0 / 50%);
|
||
--docs-page-shadow: 0 1px 3px rgb(0 0 0 / 28%), 0 4px 16px rgb(0 0 0 / 10%);
|
||
--docs-gap-inset: inset 0 8px 8px -8px rgb(0 0 0 / 35%), inset 0 -3px 3px -3px rgb(0 0 0 / 18%);
|
||
--docs-shadow-menu: 0 8px 24px rgb(0 0 0 / 18%);
|
||
--docs-shadow-ctx: 0 8px 28px rgb(0 0 0 / 22%);
|
||
--docs-shadow-modal: 0 3px 30px rgb(0 0 0 / 8%);
|
||
--docs-shadow-modal-gs: 0 12px 40px rgb(0 0 0 / 16%);
|
||
--docs-shadow-chip: 0 2px 8px rgb(0 0 0 / 12%);
|
||
--docs-shadow-tooltip: 0 4px 6px rgb(0 0 0 / 10%);
|
||
--docs-shadow-composer: 0 6px 30px rgb(0 0 0 / 8%);
|
||
--docs-shadow-toast: 0 4px 16px rgb(0 0 0 / 18%);
|
||
|
||
/* brand-fixed chrome: identical in both themes */
|
||
--docs-on-accent: #fff;
|
||
--docs-on-accent-dim: rgb(255 255 255 / 75%);
|
||
--docs-comment-accent: #e8a33d;
|
||
--docs-badge-gradient: linear-gradient(135deg, #6a5cff 0%, #2b88f8 55%, #29c3a6 120%);
|
||
--docs-shadow-badge: 0 2px 6px rgb(74 92 255 / 25%);
|
||
--docs-shadow-badge-strong: 0 2px 6px rgb(74 92 255 / 35%);
|
||
--docs-chip-remove-bg: #000;
|
||
--docs-chip-remove-hover: #4b4e51;
|
||
--docs-chip-remove-ink: #fff;
|
||
/* table move handle floats over the always-white page: fixed colors */
|
||
--docs-table-handle-bg: #ffffff;
|
||
--docs-table-handle-hover: #f0f0f0;
|
||
--docs-table-handle-border: #b8bcc4;
|
||
--docs-table-handle-ink: #444444;
|
||
--docs-knob-dot: #fff;
|
||
--docs-toast-bg: rgb(35 35 37 / 92%);
|
||
--docs-toast-error-bg: rgb(196 49 75 / 95%);
|
||
--docs-toast-ink: #fff;
|
||
--docs-toast-ok: #34c759;
|
||
}
|
||
|
||
/* content-side constants: everything painted on the paper (including the AI
|
||
* change highlight). Light values here regardless of the UI theme; the dark
|
||
* page (.page-dark, further down) swaps in their darkPageColor() twins. A
|
||
* filled text box on the dark page re-enters this rule: its text contrasts
|
||
* with the box fill, not the paper, so everything inside it keeps the light
|
||
* values (the box is a light island; see the .page-dark block). */
|
||
:root,
|
||
.page-dark .doc-textbox-filled {
|
||
--ai-highlight: #fff3c4;
|
||
--ai-highlight-border: #f2b900;
|
||
--docs-paper: #ffffff;
|
||
--docs-paper-ink: #000;
|
||
--docs-paper-ink-dim: #333;
|
||
--docs-paper-ink-mid: #555;
|
||
--docs-paper-ink-soft: #777;
|
||
--docs-paper-ink-faint: #888;
|
||
--docs-paper-heading: #2f5496;
|
||
--docs-paper-h3: #1f3864;
|
||
--docs-paper-link: #0563c1;
|
||
--docs-paper-accent: #185abd;
|
||
--docs-paper-mark: #2b7cd3;
|
||
--docs-paper-grid: rgb(43 124 211 / 13%);
|
||
--docs-paper-hf-line: #d0d0d0;
|
||
--docs-paper-chip-bg: #fafafa;
|
||
--docs-paper-select-bg: #e8f1fb;
|
||
--docs-paper-stripe: #f0f0f0;
|
||
--docs-paper-chart-grid: #e0e0e0;
|
||
--docs-paper-chart-border: #d9d9d9;
|
||
--docs-paper-field-bg: rgb(0 0 0 / 7%);
|
||
--docs-paper-watermark: rgb(128 128 128 / 18%);
|
||
--docs-paper-rev-ink: #b91c1c;
|
||
--docs-paper-ins-bg: rgb(22 163 74 / 8%);
|
||
--docs-paper-del-bg: rgb(220 38 38 / 8%);
|
||
--docs-paper-del-line: #dc2626;
|
||
--docs-paper-ppr: #f59e0b;
|
||
--docs-paper-ppr-ink: #b45309;
|
||
--docs-paper-ppr-bg: #fef3c7;
|
||
--docs-paper-ppr-border: #fcd34d;
|
||
--docs-paper-rpr: #c98a00;
|
||
--docs-paper-sdt-border: #a0c0e8;
|
||
--docs-paper-sdt-ink: #5080b0;
|
||
--docs-paper-sdt-bg: #eef4fb;
|
||
/* Word-style comment anchor tint (Word paints #ECFDD7 over white paper) */
|
||
--docs-paper-comment-bg: rgb(179 247 95 / 25%);
|
||
--docs-paper-comment-flash: rgb(130 171 81 / 45%);
|
||
--docs-paper-comment-line: #82ab51;
|
||
/* printed markup is document output, not chrome: fixed values, identical in both themes;
|
||
the balloon fill is the anchor tint composited over white (balloons sit on the gray strip) */
|
||
--docs-print-markup-band: #f2f2f2;
|
||
--docs-print-comment-fill: #ecfdd7;
|
||
--docs-print-comment-ink: #262626;
|
||
--docs-print-rev-line: #b91c1c;
|
||
--docs-print-rev-fill: #ffffff;
|
||
--docs-paper-ai-anchor-bg: rgb(80 128 220 / 14%);
|
||
--docs-paper-ai-anchor-line: #5080dc;
|
||
--docs-paper-xe-ink: #8a6d3b;
|
||
--docs-paper-xe-bg: #fdf6e3;
|
||
--docs-paper-xe-border: #d5c48a;
|
||
--docs-paper-hit-bg: #ffe28a;
|
||
--docs-paper-hit-active-bg: #ff9632;
|
||
--docs-paper-hit-active-ink: #fff;
|
||
}
|
||
|
||
/* Word flips automatic-colour text to white on dark shading (cell / paragraph /
|
||
run fill, table-style fill); document data, identical in both UI themes.
|
||
Explicit colours are inline declarations and win over this inherited ink. */
|
||
[data-ink='light'] {
|
||
--docs-paper-ink: #fff;
|
||
color: var(--docs-paper-ink);
|
||
}
|
||
|
||
/* the nearest fill wins: a light fill inside dark shading takes the paper ink
|
||
back; a light fill on its own touches nothing, so inherited explicit colours stay */
|
||
[data-ink='light'] [data-ink='dark'] {
|
||
--docs-paper-ink: #000;
|
||
color: var(--docs-paper-ink);
|
||
}
|
||
|
||
[data-theme='dark'] {
|
||
--word-blue: #4a9eff;
|
||
--word-blue-dark: #3a8eef;
|
||
--word-heading: #6cabf0;
|
||
--accent-soft: #1e3a5f;
|
||
|
||
--docs-heading-3: #7fa8e0;
|
||
--docs-accent-ghost: rgb(74 158 255 / 18%);
|
||
--docs-copilot-bg-a: #322c46;
|
||
--docs-copilot-bg-b: #253546;
|
||
--docs-swatch-outline: rgb(255 255 255 / 25%);
|
||
--docs-swatch-outline-strong: rgb(255 255 255 / 30%);
|
||
--docs-swatch-border: #666;
|
||
--docs-ins-ink: #6fcf8f;
|
||
--docs-ins-bg: rgb(111 207 143 / 10%);
|
||
--docs-del-ink: #f28b82;
|
||
--docs-del-bg: rgb(242 139 130 / 10%);
|
||
--docs-ai-error: #f28b82;
|
||
--docs-ai-error-border: rgb(242 139 130 / 45%);
|
||
--docs-ai-error-bg: rgb(242 139 130 / 12%);
|
||
--docs-ok-ink: #7bd88a;
|
||
--docs-ok-bg: #16351c;
|
||
--docs-ok-border: #2e5c36;
|
||
--docs-ok-dot: #34c759;
|
||
--docs-chip-bg: #2a2f36;
|
||
--docs-brand-ghost: rgb(74 158 255 / 14%);
|
||
--docs-brand-ghost-weak: rgb(74 158 255 / 10%);
|
||
--docs-brand-ring: rgb(74 158 255 / 45%);
|
||
--docs-focus-ring: rgb(228 228 228 / 25%);
|
||
--docs-focus-ring-blue: rgb(74 158 255 / 40%);
|
||
--docs-input-focus: #4a9eff;
|
||
--docs-input-ring: rgb(74 158 255 / 20%);
|
||
--docs-error-ring: rgb(242 139 130 / 20%);
|
||
--docs-scroll-thumb: rgb(255 255 255 / 28%);
|
||
--docs-tooltip-bg: #e4e4e4;
|
||
--docs-tooltip-ink: #1e1e1e;
|
||
--docs-shimmer-base: #8a8a8a;
|
||
--docs-shimmer-hi: #d0d0d0;
|
||
--docs-statusbar-bg: #252525;
|
||
--docs-statusbar-border: #3a3a3a;
|
||
--docs-statusbar-hover: rgb(255 255 255 / 10%);
|
||
--docs-zoom-slider: #8a8a8a;
|
||
--docs-ruler-bg: #2d2d2d;
|
||
--docs-ruler-tick: #6a6a6a;
|
||
--docs-ruler-border: #444;
|
||
--docs-ruler-ink: #a0a0a0;
|
||
--docs-ruler-btn-bg: #3a3a3a;
|
||
--docs-ruler-btn-hover: #4a4a4a;
|
||
--docs-ruler-btn-border: #555;
|
||
--docs-ruler-btn-ink: #d0d0d0;
|
||
--docs-ruler-tab-guide: #777;
|
||
--docs-ruler-zone: rgb(255 255 255 / 10%);
|
||
--docs-tstyle-border: #5a5f66;
|
||
--docs-tstyle-header: #8a93a3;
|
||
--docs-tstyle-row: #333;
|
||
--docs-gap-cut: #56606c;
|
||
--docs-pv-canvas: #1f1f1f;
|
||
--docs-overlay: rgb(0 0 0 / 55%);
|
||
--docs-page-shadow: 0 1px 3px rgb(0 0 0 / 60%), 0 4px 16px rgb(0 0 0 / 40%);
|
||
--docs-gap-inset: inset 0 8px 8px -8px rgb(0 0 0 / 65%), inset 0 -3px 3px -3px rgb(0 0 0 / 40%);
|
||
--docs-shadow-menu: 0 8px 24px rgb(0 0 0 / 55%);
|
||
--docs-shadow-ctx: 0 8px 28px rgb(0 0 0 / 60%);
|
||
--docs-shadow-modal: 0 20px 50px rgb(0 0 0 / 65%);
|
||
--docs-shadow-modal-gs: 0 20px 50px rgb(0 0 0 / 65%);
|
||
--docs-shadow-chip: 0 2px 8px rgb(0 0 0 / 40%);
|
||
--docs-shadow-tooltip: 0 4px 6px rgb(0 0 0 / 30%);
|
||
--docs-shadow-composer: 0 6px 30px rgb(0 0 0 / 30%);
|
||
--docs-shadow-toast: 0 4px 16px rgb(0 0 0 / 45%);
|
||
}
|
||
|
||
@media (prefers-color-scheme: dark) {
|
||
:root:not([data-theme='light']):not([data-theme='dark']) {
|
||
--word-blue: #4a9eff;
|
||
--word-blue-dark: #3a8eef;
|
||
--word-heading: #6cabf0;
|
||
--accent-soft: #1e3a5f;
|
||
|
||
--docs-heading-3: #7fa8e0;
|
||
--docs-accent-ghost: rgb(74 158 255 / 18%);
|
||
--docs-copilot-bg-a: #322c46;
|
||
--docs-copilot-bg-b: #253546;
|
||
--docs-swatch-outline: rgb(255 255 255 / 25%);
|
||
--docs-swatch-outline-strong: rgb(255 255 255 / 30%);
|
||
--docs-swatch-border: #666;
|
||
--docs-ins-ink: #6fcf8f;
|
||
--docs-ins-bg: rgb(111 207 143 / 10%);
|
||
--docs-del-ink: #f28b82;
|
||
--docs-del-bg: rgb(242 139 130 / 10%);
|
||
--docs-ai-error: #f28b82;
|
||
--docs-ai-error-border: rgb(242 139 130 / 45%);
|
||
--docs-ai-error-bg: rgb(242 139 130 / 12%);
|
||
--docs-ok-ink: #7bd88a;
|
||
--docs-ok-bg: #16351c;
|
||
--docs-ok-border: #2e5c36;
|
||
--docs-ok-dot: #34c759;
|
||
--docs-chip-bg: #2a2f36;
|
||
--docs-brand-ghost: rgb(74 158 255 / 14%);
|
||
--docs-brand-ghost-weak: rgb(74 158 255 / 10%);
|
||
--docs-brand-ring: rgb(74 158 255 / 45%);
|
||
--docs-focus-ring: rgb(228 228 228 / 25%);
|
||
--docs-focus-ring-blue: rgb(74 158 255 / 40%);
|
||
--docs-input-focus: #4a9eff;
|
||
--docs-input-ring: rgb(74 158 255 / 20%);
|
||
--docs-error-ring: rgb(242 139 130 / 20%);
|
||
--docs-scroll-thumb: rgb(255 255 255 / 28%);
|
||
--docs-tooltip-bg: #e4e4e4;
|
||
--docs-tooltip-ink: #1e1e1e;
|
||
--docs-shimmer-base: #8a8a8a;
|
||
--docs-shimmer-hi: #d0d0d0;
|
||
--docs-statusbar-bg: #252525;
|
||
--docs-statusbar-border: #3a3a3a;
|
||
--docs-statusbar-hover: rgb(255 255 255 / 10%);
|
||
--docs-zoom-slider: #8a8a8a;
|
||
--docs-ruler-bg: #2d2d2d;
|
||
--docs-ruler-tick: #6a6a6a;
|
||
--docs-ruler-border: #444;
|
||
--docs-ruler-ink: #a0a0a0;
|
||
--docs-ruler-btn-bg: #3a3a3a;
|
||
--docs-ruler-btn-hover: #4a4a4a;
|
||
--docs-ruler-btn-border: #555;
|
||
--docs-ruler-btn-ink: #d0d0d0;
|
||
--docs-ruler-tab-guide: #777;
|
||
--docs-ruler-zone: rgb(255 255 255 / 10%);
|
||
--docs-tstyle-border: #5a5f66;
|
||
--docs-tstyle-header: #8a93a3;
|
||
--docs-tstyle-row: #333;
|
||
--docs-gap-cut: #56606c;
|
||
--docs-pv-canvas: #1f1f1f;
|
||
--docs-overlay: rgb(0 0 0 / 55%);
|
||
--docs-page-shadow: 0 1px 3px rgb(0 0 0 / 60%), 0 4px 16px rgb(0 0 0 / 40%);
|
||
--docs-gap-inset: inset 0 8px 8px -8px rgb(0 0 0 / 65%), inset 0 -3px 3px -3px rgb(0 0 0 / 40%);
|
||
--docs-shadow-menu: 0 8px 24px rgb(0 0 0 / 55%);
|
||
--docs-shadow-ctx: 0 8px 28px rgb(0 0 0 / 60%);
|
||
--docs-shadow-modal: 0 20px 50px rgb(0 0 0 / 65%);
|
||
--docs-shadow-modal-gs: 0 20px 50px rgb(0 0 0 / 65%);
|
||
--docs-shadow-chip: 0 2px 8px rgb(0 0 0 / 40%);
|
||
--docs-shadow-tooltip: 0 4px 6px rgb(0 0 0 / 30%);
|
||
--docs-shadow-composer: 0 6px 30px rgb(0 0 0 / 30%);
|
||
--docs-shadow-toast: 0 4px 16px rgb(0 0 0 / 45%);
|
||
}
|
||
}
|
||
|
||
* {
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
/* UI CJK fonts per language (documentElement.lang is set at bootstrap and on switch);
|
||
* the zh expansion must keep the historical stack byte-identical */
|
||
:root {
|
||
--ui-cjk: 'PingFang SC', 'Microsoft YaHei';
|
||
}
|
||
|
||
:root:lang(ja) {
|
||
--ui-cjk: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Yu Gothic', 'Meiryo';
|
||
}
|
||
|
||
:root:lang(ko) {
|
||
--ui-cjk: 'Apple SD Gothic Neo', 'Malgun Gothic';
|
||
}
|
||
|
||
:root:lang(zh-TW) {
|
||
--ui-cjk: 'PingFang TC', 'Microsoft JhengHei';
|
||
}
|
||
|
||
html,
|
||
body,
|
||
#root {
|
||
height: 100%;
|
||
margin: 0;
|
||
}
|
||
|
||
body {
|
||
font-family:
|
||
'Segoe UI',
|
||
-apple-system,
|
||
BlinkMacSystemFont,
|
||
var(--ui-cjk),
|
||
sans-serif;
|
||
color: var(--text);
|
||
background: var(--chrome-bg);
|
||
font-size: 13px;
|
||
-webkit-font-smoothing: antialiased;
|
||
/* The document itself never scrolls: a too-wide ribbon (or any other
|
||
overflowing chrome) must scroll inside its own container, not drag the
|
||
whole page sideways. */
|
||
overflow: hidden;
|
||
}
|
||
|
||
.app {
|
||
display: flex;
|
||
flex-direction: column;
|
||
height: 100%;
|
||
}
|
||
|
||
button {
|
||
font-family: inherit;
|
||
}
|
||
|
||
/* ================= title bar (doc name centered) ================= */
|
||
|
||
.qa-btn {
|
||
width: 30px;
|
||
height: 28px;
|
||
border: none;
|
||
background: none;
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
font-size: 13px;
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.qa-btn svg {
|
||
display: block;
|
||
margin: 0 auto;
|
||
}
|
||
|
||
.qa-btn:hover:not(:disabled) {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.qa-btn:disabled {
|
||
color: var(--text-tertiary);
|
||
cursor: default;
|
||
}
|
||
|
||
/* ================= ribbon ================= */
|
||
|
||
.ribbon {
|
||
flex-shrink: 0;
|
||
background: var(--chrome-bg);
|
||
border-bottom: 1px solid var(--border-strong);
|
||
user-select: none;
|
||
/* shared toolbar ink (glyphs, letterforms, labels) — same as sheets/slides */
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.ribbon-tabs {
|
||
display: flex;
|
||
align-items: center;
|
||
/* same tab-row metrics as PowerPoint's ribbon (slides app): 5px top inset,
|
||
no bottom padding — the active tab's underline sits on the row's edge */
|
||
padding: 5px 10px 0;
|
||
gap: 2px;
|
||
/* the title-bar row was removed; the tab row doubles as the frameless-window drag area */
|
||
-webkit-app-region: drag;
|
||
user-select: none;
|
||
}
|
||
|
||
.ribbon-tabs button,
|
||
.ribbon-tabs .file-tab-wrap,
|
||
.ribbon-tabs .autosave-toggle,
|
||
.ribbon-tabs .qa-btn {
|
||
-webkit-app-region: no-drag;
|
||
}
|
||
|
||
/* While a popover is open the row must deliver presses (drag regions swallow
|
||
them), so outside-press dismissal can see presses on the blank band */
|
||
html.genoffice-popover-open .ribbon-tabs {
|
||
-webkit-app-region: no-drag;
|
||
}
|
||
|
||
.ribbon-tabs-mac {
|
||
padding-left: 84px; /* room for traffic lights */
|
||
}
|
||
|
||
.ribbon-tabs-win {
|
||
padding-right: 150px; /* room for windows caption buttons overlay */
|
||
}
|
||
|
||
.ribbon-file {
|
||
max-width: 30%;
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
margin-right: 6px;
|
||
}
|
||
|
||
.ribbon-tab {
|
||
position: relative;
|
||
border: none;
|
||
background: none;
|
||
padding: 7px 9px 6px;
|
||
font-size: 13px;
|
||
/* every tab label is semibold, not just the active one */
|
||
font-weight: 600;
|
||
color: inherit;
|
||
cursor: pointer;
|
||
/* transparent border keeps the row height; the visible underline is the
|
||
* ::after, sized to the label text rather than the padded button */
|
||
border-bottom: 2.5px solid transparent;
|
||
border-radius: 4px 4px 0 0;
|
||
}
|
||
|
||
/* hovering a tab tints the label, it doesn't paint a box */
|
||
.ribbon-tab:hover {
|
||
color: var(--word-blue);
|
||
}
|
||
|
||
.ribbon-tab.active {
|
||
color: var(--word-blue);
|
||
font-weight: 600;
|
||
}
|
||
|
||
/* active underline: exactly the text width (insets = horizontal padding),
|
||
* ends slightly rounded — not a full capsule */
|
||
.ribbon-tab.active::after {
|
||
content: '';
|
||
position: absolute;
|
||
left: 13px;
|
||
right: 13px;
|
||
bottom: -2.5px;
|
||
height: 2.5px;
|
||
border-radius: 1px;
|
||
background: var(--word-blue);
|
||
}
|
||
|
||
.ribbon-tab-file {
|
||
color: var(--docs-on-accent);
|
||
background: var(--word-blue);
|
||
border-radius: 4px;
|
||
padding: 6px 16px;
|
||
margin-right: 6px;
|
||
}
|
||
|
||
.ribbon-tab-file:hover,
|
||
.ribbon-tab-file.open {
|
||
background: var(--word-blue-dark);
|
||
}
|
||
|
||
.file-tab-wrap {
|
||
position: relative;
|
||
}
|
||
|
||
.file-menu {
|
||
position: absolute;
|
||
top: calc(100% + 2px);
|
||
left: 0;
|
||
z-index: 60;
|
||
min-width: 210px;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 6px;
|
||
box-shadow: var(--docs-shadow-menu);
|
||
padding: 5px;
|
||
}
|
||
|
||
.file-menu button {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
width: 100%;
|
||
border: none;
|
||
background: none;
|
||
padding: 8px 12px;
|
||
font-size: 13px;
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
color: var(--text);
|
||
}
|
||
|
||
.file-menu button:hover:not(:disabled) {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.file-menu button:disabled {
|
||
opacity: 0.4;
|
||
cursor: default;
|
||
}
|
||
|
||
.file-menu-key {
|
||
color: var(--text-dim);
|
||
font-size: 12px;
|
||
}
|
||
|
||
.ribbon-tabs-spacer {
|
||
flex: 1;
|
||
}
|
||
|
||
.qa-sep {
|
||
width: 1px;
|
||
height: 16px;
|
||
margin: 0 6px;
|
||
background: var(--border-strong);
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.copilot-btn {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
border: 1px solid var(--border);
|
||
background: linear-gradient(135deg, var(--docs-copilot-bg-a), var(--docs-copilot-bg-b));
|
||
border-radius: 14px;
|
||
padding: 4px 14px;
|
||
font-size: 12.5px;
|
||
cursor: pointer;
|
||
color: var(--text);
|
||
}
|
||
|
||
.copilot-btn:hover,
|
||
.copilot-btn.active {
|
||
border-color: var(--word-blue);
|
||
color: var(--word-blue);
|
||
}
|
||
|
||
/* AI entry points share the app icon (used by the Ribbon AI button and the AI panel title) */
|
||
.app-badge {
|
||
display: block;
|
||
width: 22px;
|
||
height: 22px;
|
||
border-radius: 7px;
|
||
box-shadow: var(--docs-shadow-badge);
|
||
}
|
||
|
||
/* Genspark brand logo (Ribbon AI button and AI panel title) */
|
||
.genspark-badge {
|
||
display: block;
|
||
width: 22px;
|
||
height: 22px;
|
||
border-radius: 50%;
|
||
}
|
||
|
||
.ai-panel-title .genspark-badge {
|
||
width: 18px;
|
||
height: 18px;
|
||
}
|
||
/* ---- ribbon body ---- */
|
||
|
||
.ribbon-body {
|
||
display: flex;
|
||
align-items: stretch;
|
||
/* band metrics shared with the slides ribbon; the 5px scrollbar lane below
|
||
is carved out of the bottom padding so the 80px band stays unchanged */
|
||
padding: 6px 12px 1px;
|
||
/* HARD-fixed height, not min-height: the ribbon height stays constant across
|
||
tabs, so switching tabs or auto-jumping to Table Layout when the cursor
|
||
enters a table never pushes the editing area below. A tab that outgrows this must
|
||
compact its own content instead. */
|
||
height: 80px;
|
||
/* Groups never shrink below content, so a narrow window overflows the row:
|
||
scroll it inside the ribbon instead of stretching the document (matching
|
||
the sheets/slides ribbons). Dropdown panels are NOT clipped by this —
|
||
they escape the scroll container via anchor positioning (see
|
||
.rb-split-wrap). */
|
||
/* `scroll`, not `auto`: styled scrollbars are classic (non-overlay), so
|
||
`scroll` keeps the 5px lane reserved even without overflow and crossing
|
||
the overflow threshold cannot cause a vertical layout jump (same
|
||
reasoning as the sheets ribbon). */
|
||
overflow-x: scroll;
|
||
overflow-y: hidden;
|
||
}
|
||
|
||
/* Slim visible scrollbar so mouse users can reach overflowed groups
|
||
(genspark-ai/genoffice#55 precedent from the sheets ribbon). */
|
||
.ribbon-body::-webkit-scrollbar {
|
||
height: 5px;
|
||
}
|
||
|
||
.ribbon-body::-webkit-scrollbar-track {
|
||
background: transparent;
|
||
}
|
||
|
||
.ribbon-body::-webkit-scrollbar-thumb {
|
||
border-radius: 2.5px;
|
||
background: var(--docs-scroll-thumb);
|
||
}
|
||
|
||
.ribbon-group {
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: center;
|
||
/* never shrink below content — squeezed groups paint over each other */
|
||
flex-shrink: 0;
|
||
padding: 2px 4px;
|
||
}
|
||
|
||
.ribbon-group-items {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 2px;
|
||
flex: 1;
|
||
}
|
||
|
||
/* Word for Mac shows no group captions under the ribbon */
|
||
.ribbon-group-label {
|
||
display: none;
|
||
}
|
||
|
||
.ribbon-sep {
|
||
width: 1px;
|
||
/* the overflowing ribbon row squeezes shrinkable items first — without
|
||
this the 1px separators collapse to 0 and vanish (slides ribbon parity) */
|
||
flex-shrink: 0;
|
||
background: var(--border);
|
||
/* 2px matches the groups' vertical padding, so the line spans exactly the
|
||
tallest group content (the clipboard stack / two-row font block) instead
|
||
of stopping short of it — same inset across all three apps */
|
||
margin: 2px 6px;
|
||
}
|
||
|
||
.ribbon-placeholder {
|
||
align-self: center;
|
||
color: var(--text-dim);
|
||
font-size: 12.5px;
|
||
padding: 0 14px;
|
||
}
|
||
|
||
/* big paste button */
|
||
.rb-big {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 4px;
|
||
border: none;
|
||
background: none;
|
||
border-radius: 4px;
|
||
/* PowerPoint-density: minimal side padding (slides ribbon parity) */
|
||
padding: 4px 7px 6px;
|
||
font-size: 12px;
|
||
/* no tab wrapping: wrapping in narrow windows makes the ribbon taller, causing height jumps when switching tabs */
|
||
white-space: nowrap;
|
||
cursor: pointer;
|
||
color: var(--text);
|
||
}
|
||
|
||
.rb-big-icon {
|
||
min-height: 28px;
|
||
flex: 1;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
/* hover/open paint only the icon row — the label below
|
||
* stays outside the gray. The box spans the whole button width (align-self
|
||
* stretch + horizontal bleed), not just the icon content. Negative margins
|
||
* cancel the bleed so button layout/alignment is unchanged. */
|
||
.rb-big .rb-big-icon {
|
||
align-self: stretch;
|
||
border-radius: 4px;
|
||
padding: 3px 4px;
|
||
margin: 0 -4px;
|
||
}
|
||
|
||
/* the dropdown chevron sits beside the icon (top row), not the label */
|
||
.rb-caret-svg {
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.rb-big-icon .rb-caret-svg {
|
||
display: block;
|
||
margin-left: 3px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.rb-big-icon-colored {
|
||
position: relative;
|
||
}
|
||
|
||
.rb-big-icon-colored .rb-color-bar {
|
||
position: absolute;
|
||
left: 1px;
|
||
right: 1px;
|
||
bottom: -3px;
|
||
width: auto;
|
||
border: 1px solid var(--docs-swatch-outline);
|
||
}
|
||
|
||
/* AI badge marking AI-backed entry points (ribbon buttons and context-menu items), same look as slides */
|
||
.copilot-badge {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 22px;
|
||
height: 22px;
|
||
border-radius: 7px;
|
||
color: var(--docs-on-accent);
|
||
background: var(--docs-badge-gradient);
|
||
box-shadow: var(--docs-shadow-badge-strong);
|
||
}
|
||
|
||
.copilot-badge-menu {
|
||
width: 16px;
|
||
height: 16px;
|
||
border-radius: 5px;
|
||
margin-right: 6px;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.rb-big:hover:not(:disabled) .rb-big-icon {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.rb-big:disabled {
|
||
opacity: 0.4;
|
||
cursor: default;
|
||
}
|
||
|
||
/* Active state paints only the gray icon plate — ink stays the standard #232425 */
|
||
.rb-big.active .rb-big-icon {
|
||
background: var(--active-bg);
|
||
}
|
||
|
||
/* The Genspark AI entry keeps a black label even while the panel is open. */
|
||
.rb-big.ai-entry.active {
|
||
color: var(--text);
|
||
}
|
||
|
||
/* The AI entry buttons read as one piece: hover/press tint the whole button
|
||
(icon + label together), unlike the other tall buttons where only the icon
|
||
row is painted. */
|
||
.rb-big.ai-entry {
|
||
border-radius: 4px;
|
||
}
|
||
|
||
.rb-big.ai-entry:hover:not(:disabled) {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.rb-big.ai-entry.active {
|
||
background: var(--active-bg);
|
||
}
|
||
|
||
.rb-big.ai-entry:hover:not(:disabled) .rb-big-icon,
|
||
.rb-big.ai-entry.active .rb-big-icon {
|
||
background: transparent;
|
||
}
|
||
|
||
.rb-col {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 2px;
|
||
}
|
||
|
||
.rb-small {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
border: none;
|
||
background: none;
|
||
border-radius: 3px;
|
||
padding: 3px 8px;
|
||
font-size: 12px;
|
||
text-align: left;
|
||
white-space: nowrap;
|
||
cursor: pointer;
|
||
color: var(--text);
|
||
}
|
||
|
||
.rb-small svg {
|
||
flex-shrink: 0;
|
||
/* 14px glyphs, matching the slides/sheets clipboard stacks */
|
||
width: 14px;
|
||
height: 14px;
|
||
color: var(--text-primary);
|
||
/* CSS resizes these below their attr size — re-pin the painted stroke
|
||
(1.43 units × 14/16 ≈ 1.25px) */
|
||
stroke-width: 1.43;
|
||
}
|
||
|
||
.rb-small:hover:not(:disabled) {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.rb-small.active {
|
||
background: var(--active-bg);
|
||
}
|
||
|
||
.rb-small:disabled {
|
||
opacity: 0.4;
|
||
cursor: default;
|
||
}
|
||
|
||
.rb-font-group {
|
||
flex-direction: column;
|
||
align-items: stretch;
|
||
gap: 4px;
|
||
justify-content: center;
|
||
}
|
||
|
||
.rb-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 3px;
|
||
}
|
||
|
||
.rb-select {
|
||
height: 28px;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 3px;
|
||
background: var(--surface);
|
||
font-size: 12px;
|
||
padding: 0 4px;
|
||
color: var(--text);
|
||
}
|
||
|
||
.rb-select:disabled {
|
||
opacity: 0.55;
|
||
}
|
||
|
||
.rb-font-family {
|
||
width: 128px;
|
||
}
|
||
|
||
.rb-font-size {
|
||
width: 44px;
|
||
}
|
||
|
||
/* hide the native number spinner: the grow/shrink font buttons next to the
|
||
input already cover stepping */
|
||
.rb-font-size::-webkit-outer-spin-button,
|
||
.rb-font-size::-webkit-inner-spin-button {
|
||
-webkit-appearance: none;
|
||
margin: 0;
|
||
}
|
||
|
||
/* the combobox inputs and their carets render as one bordered control, Word-style */
|
||
.rb-font-size,
|
||
.rb-font-family {
|
||
border-right: none;
|
||
border-radius: 3px 0 0 3px;
|
||
}
|
||
|
||
/* double class beats the base .rb-caret rules defined further down */
|
||
.rb-caret.rb-combo-caret {
|
||
width: 18px;
|
||
height: 28px;
|
||
border: 1px solid var(--border-strong);
|
||
border-left: none;
|
||
border-radius: 0 3px 3px 0;
|
||
background: var(--surface);
|
||
}
|
||
|
||
.rb-caret.rb-combo-caret:hover:not(:disabled) {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.rb-icon {
|
||
min-width: 28px;
|
||
height: 30px;
|
||
border: none;
|
||
background: none;
|
||
border-radius: 3px;
|
||
/* letter glyphs (I/U/ab/Aa/A) share 15px/500: matched to the svg icons'
|
||
1.5px stroke by INTEGRATED ink mass, not run-length — with mac's
|
||
antialiased font smoothing a text stem's peak alpha sits below a
|
||
geometric stroke's, so 450 (same nominal width) still reads thinner while
|
||
500 lands on the svg legs' 1.29–1.38 effective width. <b>B</b> keeps its
|
||
semantic 700 (pinned below — an inherited weight makes "bolder" overshoot) */
|
||
font-size: 15px;
|
||
font-weight: 500;
|
||
cursor: pointer;
|
||
color: var(--text);
|
||
padding: 0 4px;
|
||
/* flex-center the content: buttons whose svg is followed by an inline caret
|
||
(line spacing / shading / borders) otherwise sit on baseline math and land
|
||
a couple px off the plain icon buttons (align left/center/right/justify) */
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.rb-icon b {
|
||
font-weight: 700;
|
||
}
|
||
|
||
.rb-icon:hover:not(:disabled) {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.rb-icon.active {
|
||
background: var(--active-bg);
|
||
}
|
||
|
||
.rb-icon:disabled {
|
||
opacity: 0.35;
|
||
cursor: default;
|
||
}
|
||
|
||
.rb-mini-sep {
|
||
width: 1px;
|
||
height: 20px;
|
||
background: var(--border);
|
||
margin: 0 5px;
|
||
}
|
||
|
||
.rb-icon svg {
|
||
display: block;
|
||
margin: 0 auto;
|
||
}
|
||
|
||
/* split button: main action + caret dropdown */
|
||
.rb-split-wrap {
|
||
position: relative;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
/* Anchor for the dropdown panels (color-palette / layout-menu / …), which are
|
||
position: fixed so they escape the ribbon-body scroll clip while tracking
|
||
their trigger through ribbon scrolling. Every wrap shares the name, so the
|
||
scope is essential: without it a fixed-position panel (laid out after all
|
||
in-flow content) would resolve to the LAST wrap in the document instead of
|
||
its own parent. */
|
||
.rb-split-wrap,
|
||
.rb-color-wrap {
|
||
anchor-name: --rb-drop-wrap;
|
||
anchor-scope: --rb-drop-wrap;
|
||
}
|
||
|
||
.rb-caret {
|
||
width: 13px;
|
||
height: 26px;
|
||
border: none;
|
||
background: none;
|
||
border-radius: 0 3px 3px 0;
|
||
font-size: 8px;
|
||
color: var(--text-dim);
|
||
cursor: pointer;
|
||
padding: 0;
|
||
}
|
||
|
||
.rb-caret:hover:not(:disabled) {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.rb-caret:disabled {
|
||
opacity: 0.35;
|
||
cursor: default;
|
||
}
|
||
|
||
/* True split buttons (icon action + caret dropdown) read as one pill, matching
|
||
the slides rb-split model: hovering either zone washes both edge to edge,
|
||
and the zone under the pointer (or whose dropdown is open) darkens a step.
|
||
:has(> .rb-icon + .rb-caret) keeps the font-family/size comboboxes (input +
|
||
caret) and lone-button wraps out. */
|
||
.rb-split-wrap:has(> .rb-icon + .rb-caret) > .rb-icon {
|
||
border-radius: 3px 0 0 3px;
|
||
}
|
||
|
||
.rb-split-wrap:has(> .rb-icon + .rb-caret) > .rb-caret {
|
||
height: 30px;
|
||
}
|
||
|
||
.rb-split-wrap:has(> .rb-icon + .rb-caret):hover > .rb-icon:not(:disabled),
|
||
.rb-split-wrap:has(> .rb-icon + .rb-caret):hover > .rb-caret:not(:disabled) {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.rb-split-wrap:has(> .rb-icon + .rb-caret) > .rb-icon:hover:not(:disabled),
|
||
.rb-split-wrap:has(> .rb-icon + .rb-caret) > .rb-caret:hover:not(:disabled),
|
||
.rb-split-wrap:has(> .rb-icon + .rb-caret) > .rb-caret.active {
|
||
background: var(--active-bg);
|
||
}
|
||
|
||
/* same footprint as the plain .rb-caret — a wider zone reads as a gap
|
||
between the icon and the chevron */
|
||
.rb-color-caret {
|
||
width: 14px;
|
||
height: 30px;
|
||
}
|
||
|
||
.rb-caret-inline {
|
||
font-size: 8px;
|
||
color: var(--text-dim);
|
||
margin-left: 2px;
|
||
}
|
||
|
||
/* font color button with color bar */
|
||
.rb-color-wrap {
|
||
position: relative;
|
||
}
|
||
|
||
.rb-color-btn {
|
||
/* just the glyph + a whisker: a wider box pushes the caret visually away */
|
||
min-width: 26px;
|
||
height: 30px;
|
||
line-height: 1;
|
||
}
|
||
|
||
/* Color swatches (sheets' pattern): the glyph is the SAME size as its row
|
||
siblings (15px/600 letter / 20px svg) so the cap line stays level, and the
|
||
16×4 bar hangs below it out of flow instead of pushing the stack taller. */
|
||
.rb-color-glyph {
|
||
position: relative;
|
||
display: grid;
|
||
place-items: center;
|
||
line-height: 1;
|
||
font-size: 15px;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.rb-color-bar {
|
||
width: 16px;
|
||
height: 4px;
|
||
margin-top: 1px;
|
||
border-radius: 1px;
|
||
}
|
||
|
||
.rb-color-glyph .rb-color-bar {
|
||
position: absolute;
|
||
top: calc(100% + 1px);
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
margin: 0;
|
||
}
|
||
|
||
/* the svg box carries ~4px of padding below its ink — tuck the bar into it so
|
||
both buttons' bars sit on the same line (20px svg bottom is 1.5px below the
|
||
15px letter's em box + 1px gap) */
|
||
.rb-color-glyph-svg .rb-color-bar {
|
||
top: calc(100% - 1.5px);
|
||
}
|
||
|
||
.color-palette {
|
||
position: fixed;
|
||
position-anchor: --rb-drop-wrap;
|
||
top: calc(anchor(bottom) + 4px);
|
||
left: anchor(left);
|
||
position-try-fallbacks: flip-inline;
|
||
position-visibility: anchors-visible;
|
||
z-index: 60;
|
||
display: grid;
|
||
grid-template-columns: repeat(6, 20px);
|
||
gap: 4px;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 6px;
|
||
padding: 8px;
|
||
box-shadow: var(--docs-shadow-menu);
|
||
}
|
||
|
||
/* Sharp 20px squares with a faint contour, matching the shared gcp picker */
|
||
.color-swatch {
|
||
width: 20px;
|
||
height: 20px;
|
||
border: 1px solid var(--docs-swatch-outline);
|
||
border-radius: 0;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.color-swatch:hover {
|
||
outline: 2px solid var(--accent);
|
||
outline-offset: 1px;
|
||
}
|
||
|
||
/* "No Shading" reset row under the swatch grid */
|
||
.color-clear {
|
||
grid-column: 1 / -1;
|
||
margin-top: 2px;
|
||
border: none;
|
||
background: none;
|
||
border-radius: 4px;
|
||
padding: 5px 6px;
|
||
font-size: 12.5px;
|
||
text-align: left;
|
||
white-space: nowrap;
|
||
color: var(--text);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.color-clear:hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.color-palette-highlight {
|
||
grid-template-columns: none;
|
||
}
|
||
|
||
.color-palette-highlight-word {
|
||
display: block;
|
||
width: auto;
|
||
padding: 10px 12px;
|
||
border-radius: 8px;
|
||
}
|
||
|
||
.color-highlight-title {
|
||
margin: 0 0 8px;
|
||
}
|
||
|
||
.color-highlight-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(5, 20px);
|
||
gap: 4px;
|
||
}
|
||
|
||
.color-highlight-swatch {
|
||
box-sizing: border-box;
|
||
width: 20px;
|
||
height: 20px;
|
||
border: 1px solid color-mix(in srgb, var(--text) 18%, transparent);
|
||
border-radius: 0;
|
||
}
|
||
|
||
.color-highlight-swatch:hover,
|
||
.color-highlight-swatch.selected {
|
||
position: relative;
|
||
z-index: 1;
|
||
outline: 2px solid var(--accent);
|
||
outline-offset: 1px;
|
||
}
|
||
|
||
.color-highlight-none {
|
||
width: 100%;
|
||
margin-top: 10px;
|
||
padding: 5px 0;
|
||
font-size: 12.5px;
|
||
}
|
||
|
||
/* Selected (no highlight applied) is a quiet filled state, matching the
|
||
shared picker's auto row — an accent ring reads as a stray focus outline. */
|
||
.color-highlight-none.selected {
|
||
background: var(--hover);
|
||
}
|
||
|
||
/* Anchor positioning for the shared Word-style color panel (@genoffice/ui
|
||
.gcp-palette draws the chrome; this only places it under its trigger). */
|
||
.docs-color-pop {
|
||
position: fixed;
|
||
position-anchor: --rb-drop-wrap;
|
||
top: calc(anchor(bottom) + 4px);
|
||
left: anchor(left);
|
||
position-try-fallbacks: flip-inline;
|
||
position-visibility: anchors-visible;
|
||
z-index: 60;
|
||
}
|
||
|
||
.color-section-title {
|
||
margin: 12px 0 6px;
|
||
color: var(--text);
|
||
font-size: 12.5px;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.color-none {
|
||
grid-column: 1 / -1;
|
||
border: 1px solid var(--border);
|
||
border-radius: 3px;
|
||
background: var(--surface);
|
||
font-size: 12px;
|
||
padding: 4px 0;
|
||
cursor: pointer;
|
||
color: var(--text);
|
||
}
|
||
|
||
.color-none:hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
/* line spacing dropdown */
|
||
/* Home-tab Genspark AI entry: black circular "+" badge with a dropdown caret,
|
||
brand label below (mirrors the sheets Home ribbon). */
|
||
/* AI feature buttons next to the entry: purple glyphs, label below */
|
||
.ai-feature-icon {
|
||
display: grid;
|
||
place-items: center;
|
||
width: 28px;
|
||
height: 28px;
|
||
color: var(--color-brand-secondary);
|
||
}
|
||
|
||
.ai-feature-icon svg {
|
||
/* 24px renders the 24-unit viewBox 1:1, so the 1.5 stroke paints 1.5px,
|
||
keeping the 1:16 stroke standard */
|
||
width: 24px;
|
||
height: 24px;
|
||
}
|
||
|
||
.spacing-menu {
|
||
position: fixed;
|
||
position-anchor: --rb-drop-wrap;
|
||
top: calc(anchor(bottom) + 4px);
|
||
left: anchor(left);
|
||
position-try-fallbacks: flip-inline;
|
||
position-visibility: anchors-visible;
|
||
z-index: 60;
|
||
min-width: 92px;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 6px;
|
||
box-shadow: var(--docs-shadow-menu);
|
||
padding: 4px;
|
||
}
|
||
|
||
.spacing-menu button {
|
||
display: block;
|
||
width: 100%;
|
||
border: none;
|
||
background: none;
|
||
text-align: left;
|
||
padding: 6px 12px;
|
||
font-size: 13px;
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
color: var(--text);
|
||
}
|
||
|
||
.spacing-menu button:hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.spacing-menu button.active {
|
||
background: var(--active-bg);
|
||
}
|
||
|
||
/* Font size preset list: compact Word-style rows so the whole list fits
|
||
without scrolling (the viewport cap only kicks in on tiny windows), and the
|
||
current size gets a leading check instead of a highlight. Placed after the
|
||
.spacing-menu rules so these overrides win at equal specificity. */
|
||
.rb-font-size-menu {
|
||
min-width: 76px;
|
||
max-height: calc(100vh - 130px);
|
||
overflow-y: auto;
|
||
}
|
||
|
||
.rb-font-size-menu button {
|
||
position: relative;
|
||
padding: 3px 16px 3px 28px;
|
||
font-size: 12.5px;
|
||
}
|
||
|
||
.rb-font-size-menu button.active {
|
||
background: none;
|
||
color: var(--text);
|
||
}
|
||
|
||
.rb-font-size-menu button.active:hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.rb-font-size-menu button.active::before {
|
||
content: '✓';
|
||
position: absolute;
|
||
left: 10px;
|
||
}
|
||
|
||
/* Font family list: each entry renders in its own typeface (inline style);
|
||
long list scrolls like Word's */
|
||
.rb-font-family-menu {
|
||
min-width: 200px;
|
||
max-height: calc(100vh - 130px);
|
||
overflow-y: auto;
|
||
}
|
||
|
||
.rb-font-family-menu button {
|
||
padding: 5px 16px 5px 28px;
|
||
font-size: 14px;
|
||
position: relative;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.rb-font-family-menu button.active {
|
||
background: none;
|
||
color: var(--text);
|
||
}
|
||
|
||
.rb-font-family-menu button.active:hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.rb-font-family-menu button.active::before {
|
||
content: '✓';
|
||
position: absolute;
|
||
left: 10px;
|
||
font-family: system-ui;
|
||
}
|
||
|
||
.rb-menu-group-label {
|
||
padding: 8px 16px 3px;
|
||
font-size: 11px;
|
||
color: var(--text-secondary);
|
||
border-top: 1px solid var(--border);
|
||
margin-top: 4px;
|
||
cursor: default;
|
||
}
|
||
|
||
/* ---- Insert: table size picker ---- */
|
||
|
||
/* Insert → Cover Page gallery */
|
||
.cover-gallery {
|
||
position: fixed;
|
||
position-anchor: --rb-drop-wrap;
|
||
top: calc(anchor(bottom) + 4px);
|
||
left: anchor(left);
|
||
position-try-fallbacks: flip-inline;
|
||
position-visibility: anchors-visible;
|
||
z-index: 60;
|
||
display: grid;
|
||
grid-template-columns: repeat(4, 104px);
|
||
gap: 8px;
|
||
padding: 10px;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 6px;
|
||
box-shadow: var(--docs-shadow-menu);
|
||
max-height: 420px;
|
||
overflow-y: auto;
|
||
}
|
||
|
||
.cover-card {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 4px;
|
||
padding: 6px 6px 5px;
|
||
border: 1px solid transparent;
|
||
border-radius: 6px;
|
||
background: none;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.cover-card:hover {
|
||
border-color: var(--word-blue);
|
||
background: var(--hover);
|
||
}
|
||
|
||
.cover-thumb-page {
|
||
width: 88px;
|
||
height: 116px;
|
||
overflow: hidden;
|
||
background: var(--docs-paper);
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 2px;
|
||
padding: 4px 5px;
|
||
font-size: 4px;
|
||
line-height: 1.3;
|
||
color: var(--docs-paper-ink-dim);
|
||
text-align: left;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.cover-thumb-para {
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.cover-card-name {
|
||
font-size: 11px;
|
||
color: var(--text);
|
||
}
|
||
|
||
.table-picker {
|
||
position: fixed;
|
||
position-anchor: --rb-drop-wrap;
|
||
top: calc(anchor(bottom) + 4px);
|
||
left: anchor(left);
|
||
position-try-fallbacks: flip-inline;
|
||
position-visibility: anchors-visible;
|
||
z-index: 60;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 6px;
|
||
box-shadow: var(--docs-shadow-menu);
|
||
padding: 8px;
|
||
}
|
||
|
||
.table-picker-title {
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
margin-bottom: 6px;
|
||
text-align: center;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.table-picker-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(10, 18px);
|
||
gap: 3px;
|
||
}
|
||
|
||
/* "Insert Table…" entry under the hover grid (opens the rows/cols dialog) */
|
||
.table-picker-custom {
|
||
display: block;
|
||
width: 100%;
|
||
margin-top: 8px;
|
||
padding: 5px 6px;
|
||
border: none;
|
||
border-top: 1px solid var(--border);
|
||
border-radius: 0 0 4px 4px;
|
||
background: none;
|
||
color: var(--text);
|
||
font-size: 12px;
|
||
text-align: left;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.table-picker-custom:hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
/* Word-style table move handle at the hovered table's top-left corner */
|
||
.doc-table-handle {
|
||
position: absolute;
|
||
z-index: 5;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 16px;
|
||
height: 16px;
|
||
padding: 0;
|
||
border: 1px solid var(--docs-table-handle-border);
|
||
border-radius: 3px;
|
||
background: var(--docs-table-handle-bg);
|
||
color: var(--docs-table-handle-ink);
|
||
cursor: move;
|
||
box-shadow: var(--docs-shadow-chip);
|
||
}
|
||
|
||
.doc-table-handle:hover {
|
||
background: var(--docs-table-handle-hover);
|
||
}
|
||
|
||
.table-cell {
|
||
width: 18px;
|
||
height: 16px;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 2px;
|
||
background: var(--surface);
|
||
cursor: pointer;
|
||
padding: 0;
|
||
}
|
||
|
||
.table-cell.hot {
|
||
/* blue-tinted like an in-document selection, not the gray toolbar plate */
|
||
background: var(--accent-soft);
|
||
border-color: var(--word-blue);
|
||
}
|
||
|
||
/* ---- Insert: symbol palette ---- */
|
||
|
||
.symbol-palette {
|
||
position: fixed;
|
||
position-anchor: --rb-drop-wrap;
|
||
top: calc(anchor(bottom) + 4px);
|
||
left: anchor(left);
|
||
position-try-fallbacks: flip-inline;
|
||
position-visibility: anchors-visible;
|
||
z-index: 60;
|
||
display: grid;
|
||
grid-template-columns: repeat(10, 28px);
|
||
gap: 2px;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 6px;
|
||
box-shadow: var(--docs-shadow-menu);
|
||
padding: 8px;
|
||
}
|
||
|
||
.symbol-cell {
|
||
width: 28px;
|
||
height: 28px;
|
||
border: none;
|
||
background: none;
|
||
border-radius: 3px;
|
||
font-size: 15px;
|
||
cursor: pointer;
|
||
color: var(--text);
|
||
}
|
||
|
||
.symbol-cell:hover {
|
||
background: var(--active-bg);
|
||
}
|
||
|
||
/* ---- Shape picker dropdown ---- */
|
||
|
||
.shape-palette {
|
||
position: fixed;
|
||
position-anchor: --rb-drop-wrap;
|
||
top: calc(anchor(bottom) + 4px);
|
||
left: anchor(left);
|
||
position-try-fallbacks: flip-inline;
|
||
position-visibility: anchors-visible;
|
||
z-index: 60;
|
||
width: 312px;
|
||
max-height: 420px;
|
||
overflow-y: auto;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 6px;
|
||
box-shadow: var(--docs-shadow-menu);
|
||
padding: 6px;
|
||
}
|
||
|
||
.shape-group-title {
|
||
padding: 6px 4px 2px;
|
||
font-size: 11px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.shape-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(9, 1fr);
|
||
}
|
||
|
||
.shape-cell {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 5px 0;
|
||
border: none;
|
||
background: none;
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
color: var(--text);
|
||
}
|
||
|
||
.shape-cell:hover {
|
||
background: var(--active-bg);
|
||
}
|
||
|
||
/* ---- WordArt picker panel ---- */
|
||
|
||
/* Unlabeled letter grid matching the slides WordArt gallery (style name = tooltip) */
|
||
.wordart-palette {
|
||
position: fixed;
|
||
position-anchor: --rb-drop-wrap;
|
||
top: calc(anchor(bottom) + 4px);
|
||
left: anchor(left);
|
||
position-try-fallbacks: flip-inline;
|
||
position-visibility: anchors-visible;
|
||
z-index: 60;
|
||
display: grid;
|
||
grid-template-columns: repeat(4, 44px);
|
||
gap: 5px;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 6px;
|
||
box-shadow: var(--docs-shadow-menu);
|
||
padding: 8px;
|
||
}
|
||
|
||
.wordart-cell {
|
||
width: 44px;
|
||
height: 44px;
|
||
border: 1px solid var(--border);
|
||
border-radius: 4px;
|
||
background: var(--surface);
|
||
font-size: 26px;
|
||
font-family: Georgia, serif;
|
||
cursor: pointer;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.wordart-cell:hover {
|
||
border-color: var(--accent);
|
||
}
|
||
|
||
/* ---- Drop cap dropdown menu ---- */
|
||
|
||
.dropcap-menu {
|
||
position: fixed;
|
||
position-anchor: --rb-drop-wrap;
|
||
top: calc(anchor(bottom) + 4px);
|
||
left: anchor(left);
|
||
position-try-fallbacks: flip-inline;
|
||
position-visibility: anchors-visible;
|
||
z-index: 60;
|
||
display: flex;
|
||
flex-direction: row;
|
||
gap: 4px;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 6px;
|
||
box-shadow: var(--docs-shadow-menu);
|
||
padding: 8px;
|
||
min-width: 200px;
|
||
}
|
||
|
||
.dropcap-option {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 8px 12px;
|
||
border: 1px solid transparent;
|
||
border-radius: 4px;
|
||
background: none;
|
||
cursor: pointer;
|
||
font-size: 11px;
|
||
color: var(--text);
|
||
min-width: 56px;
|
||
}
|
||
|
||
.dropcap-option:hover {
|
||
background: var(--active-bg);
|
||
border-color: var(--border);
|
||
}
|
||
|
||
.dropcap-preview {
|
||
font-size: 28px;
|
||
font-weight: bold;
|
||
line-height: 1;
|
||
color: var(--text);
|
||
min-height: 32px;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
/* ---- Equations: built-in equation library dropdown + LaTeX insert dialog ---- */
|
||
|
||
.equation-gallery {
|
||
/* right-aligned to its trigger (the Equation button sits at the ribbon's
|
||
far right) — fixed + anchored like the other panels */
|
||
position: fixed;
|
||
position-anchor: --rb-drop-wrap;
|
||
top: calc(anchor(bottom) + 4px);
|
||
right: anchor(right);
|
||
position-visibility: anchors-visible;
|
||
z-index: 60;
|
||
width: 300px;
|
||
max-height: 420px;
|
||
overflow-y: auto;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 6px;
|
||
box-shadow: var(--docs-shadow-menu);
|
||
padding: 6px;
|
||
}
|
||
|
||
.equation-gallery-item {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 4px;
|
||
width: 100%;
|
||
border: none;
|
||
background: none;
|
||
border-radius: 4px;
|
||
padding: 8px 6px;
|
||
cursor: pointer;
|
||
color: var(--text);
|
||
}
|
||
|
||
.equation-gallery-item:hover {
|
||
background: var(--active-bg);
|
||
}
|
||
|
||
.equation-gallery-name {
|
||
font-size: 11px;
|
||
color: var(--text-dim);
|
||
align-self: flex-start;
|
||
}
|
||
|
||
.equation-gallery-preview {
|
||
font-family: 'Cambria Math', 'STIX Two Math', serif;
|
||
font-size: 15px;
|
||
max-width: 100%;
|
||
overflow-x: hidden;
|
||
}
|
||
|
||
.equation-gallery-custom {
|
||
width: 100%;
|
||
border: none;
|
||
border-top: 1px solid var(--border-strong);
|
||
background: none;
|
||
padding: 8px 6px;
|
||
text-align: left;
|
||
font-size: 12px;
|
||
cursor: pointer;
|
||
color: var(--text);
|
||
}
|
||
|
||
.equation-gallery-custom:hover {
|
||
background: var(--active-bg);
|
||
}
|
||
|
||
.equation-modal {
|
||
min-width: 460px;
|
||
}
|
||
|
||
.equation-preview {
|
||
min-height: 64px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 6px;
|
||
margin: 10px 0 2px;
|
||
padding: 10px;
|
||
font-family: 'Cambria Math', 'STIX Two Math', serif;
|
||
font-size: 18px;
|
||
overflow-x: auto;
|
||
}
|
||
|
||
.equation-preview-hint {
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
font-family: system-ui, sans-serif;
|
||
}
|
||
|
||
.equation-preview-error {
|
||
font-size: 12px;
|
||
color: var(--danger);
|
||
font-family: system-ui, sans-serif;
|
||
}
|
||
|
||
.equation-inline-toggle {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
margin-top: 8px;
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
user-select: none;
|
||
}
|
||
|
||
/* ---- Layout: preset menus + paragraph spinners ---- */
|
||
|
||
.layout-menu {
|
||
position: fixed;
|
||
position-anchor: --rb-drop-wrap;
|
||
top: calc(anchor(bottom) + 4px);
|
||
left: anchor(left);
|
||
position-try-fallbacks: flip-inline;
|
||
position-visibility: anchors-visible;
|
||
z-index: 60;
|
||
min-width: 200px;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 6px;
|
||
box-shadow: var(--docs-shadow-menu);
|
||
padding: 5px;
|
||
}
|
||
|
||
.layout-menu button {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: flex-start;
|
||
gap: 1px;
|
||
width: 100%;
|
||
border: none;
|
||
background: none;
|
||
padding: 7px 12px;
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
color: var(--text);
|
||
font-size: 13px;
|
||
}
|
||
|
||
.layout-menu button span {
|
||
font-size: 11px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.layout-menu button:not(:disabled):hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.layout-menu button:disabled {
|
||
opacity: 0.4;
|
||
cursor: default;
|
||
}
|
||
|
||
.layout-menu button.active {
|
||
background: var(--active-bg);
|
||
}
|
||
|
||
/* w:trHeight hRule="exact": Word clips overflow instead of growing the row. td height is
|
||
min-height in CSS table layout, so cells wrap content in this fixed-height box instead;
|
||
clip (not hidden) so contenteditable's programmatic scrolls can't shift the content */
|
||
.cell-clip {
|
||
/* flow-root: overflow:clip alone is no BFC, so a first paragraph's
|
||
margin-top would collapse out and grow the exact row past its height */
|
||
display: flow-root;
|
||
overflow: clip;
|
||
}
|
||
|
||
/* w:textDirection cells: Word sizes the row from the horizontal cells / trHeight and
|
||
wraps the rotated text into the resulting cell height. Out of flow, the vertical
|
||
line no longer stretches the row group; padding:inherit keeps the cell insets. */
|
||
.cell-vert {
|
||
position: absolute;
|
||
inset: 0;
|
||
padding: inherit;
|
||
overflow: clip;
|
||
}
|
||
|
||
/* a row with no other height source (no declared trHeight, every in-flow cell
|
||
rotated) sizes from the rotated text like Word: the wrapper drops back into
|
||
flow. Structural :has() rather than a rendered tr attribute: ProseMirror
|
||
reuses the tr DOM when only its children change, so a baked attribute goes
|
||
stale after column inserts/deletes. gridGap spacers are not in-flow evidence. */
|
||
tr:not([style*='height']):not(
|
||
:has(
|
||
> td:not(.cell-vert-host):not([data-grid-gap]),
|
||
> th:not(.cell-vert-host):not([data-grid-gap])
|
||
)
|
||
)
|
||
> :is(td, th)
|
||
> .cell-vert {
|
||
position: static;
|
||
inset: auto;
|
||
padding: 0;
|
||
}
|
||
|
||
/* table row/cell revisions: insert = green background, delete = red background (inline text has separate ins/del underline/strike styles) */
|
||
tr.row-rev-ins > td,
|
||
tr.row-rev-ins > th,
|
||
td.cell-rev-ins,
|
||
th.cell-rev-ins {
|
||
background: var(--docs-paper-ins-bg);
|
||
}
|
||
|
||
tr.row-rev-del > td,
|
||
tr.row-rev-del > th,
|
||
td.cell-rev-del,
|
||
th.cell-rev-del {
|
||
background: var(--docs-paper-del-bg);
|
||
}
|
||
|
||
/* no-markup mode = as if all accepted: deleted rows hidden, insert background removed */
|
||
.rev-display-none tr.row-rev-del,
|
||
.rev-display-none td.cell-rev-del,
|
||
.rev-display-none th.cell-rev-del {
|
||
display: none;
|
||
}
|
||
|
||
.rev-display-none tr.row-rev-ins > td,
|
||
.rev-display-none tr.row-rev-ins > th,
|
||
.rev-display-none td.cell-rev-ins,
|
||
.rev-display-none th.cell-rev-ins {
|
||
background: none;
|
||
}
|
||
|
||
/* original mode = as if all rejected: inserted rows hidden, delete background removed */
|
||
.rev-display-original tr.row-rev-ins,
|
||
.rev-display-original td.cell-rev-ins,
|
||
.rev-display-original th.cell-rev-ins {
|
||
display: none;
|
||
}
|
||
|
||
.rev-display-original tr.row-rev-del > td,
|
||
.rev-display-original tr.row-rev-del > th,
|
||
.rev-display-original td.cell-rev-del,
|
||
.rev-display-original th.cell-rev-del {
|
||
background: none;
|
||
}
|
||
|
||
/* Arrange group position gallery: 3x3 page thumbnail grid, dots indicate image placement */
|
||
.pos-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(3, 36px);
|
||
gap: 4px;
|
||
padding: 6px 8px 4px;
|
||
}
|
||
|
||
.layout-menu button.pos-cell {
|
||
display: flex;
|
||
width: 36px;
|
||
height: 36px;
|
||
padding: 4px;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 4px;
|
||
}
|
||
|
||
.layout-menu button.pos-cell.active {
|
||
border-color: var(--border-strong);
|
||
background: var(--active-bg);
|
||
}
|
||
|
||
.pos-cell .pos-dot {
|
||
width: 10px;
|
||
height: 10px;
|
||
border-radius: 2px;
|
||
background: var(--text-dim);
|
||
}
|
||
|
||
.pos-cell.ph-left {
|
||
justify-content: flex-start;
|
||
}
|
||
.pos-cell.ph-center {
|
||
justify-content: center;
|
||
}
|
||
.pos-cell.ph-right {
|
||
justify-content: flex-end;
|
||
}
|
||
.pos-cell.pv-top {
|
||
align-items: flex-start;
|
||
}
|
||
.pos-cell.pv-center {
|
||
align-items: center;
|
||
}
|
||
.pos-cell.pv-bottom {
|
||
align-items: flex-end;
|
||
}
|
||
|
||
/* Switch Windows sits at the ribbon's right edge — anchor right so it isn't clipped */
|
||
.layout-menu.align-right {
|
||
left: auto;
|
||
right: anchor(right);
|
||
}
|
||
|
||
.layout-para {
|
||
gap: 14px;
|
||
}
|
||
|
||
.layout-col {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 5px;
|
||
justify-content: center;
|
||
}
|
||
|
||
.layout-num {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
font-size: 12px;
|
||
color: var(--text);
|
||
}
|
||
|
||
.layout-num > span:first-child {
|
||
width: 44px;
|
||
text-align: right;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.layout-num input {
|
||
width: 56px;
|
||
height: 24px;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 3px;
|
||
padding: 0 4px;
|
||
font-size: 12px;
|
||
}
|
||
|
||
.layout-num input:disabled {
|
||
opacity: 0.5;
|
||
}
|
||
|
||
.layout-unit {
|
||
color: var(--text-dim);
|
||
font-size: 11px;
|
||
}
|
||
|
||
/* ---- Review: word count ---- */
|
||
|
||
.stats-table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
font-size: 13px;
|
||
}
|
||
|
||
.stats-table td {
|
||
padding: 7px 4px;
|
||
border-bottom: 1px solid var(--border);
|
||
}
|
||
|
||
.stats-table td:last-child {
|
||
text-align: right;
|
||
font-weight: 600;
|
||
}
|
||
|
||
/* ---- page color swatch selection ---- */
|
||
|
||
.color-palette-page {
|
||
grid-template-columns: repeat(5, 20px);
|
||
}
|
||
|
||
.color-swatch.selected {
|
||
outline: 2px solid var(--accent);
|
||
outline-offset: 1px;
|
||
}
|
||
|
||
/* style gallery */
|
||
/* The Styles group absorbs the row's free width and shrinks with the window
|
||
(min-width keeps three cards + the expander visible); extra cards wrap onto
|
||
a clipped second row inside .style-gallery — whole cards only, never a
|
||
half-cut one — instead of widening the scrolling ribbon row, and the
|
||
expander below makes the hidden ones reachable. */
|
||
.ribbon-group-styles {
|
||
flex: 1;
|
||
min-width: 259px;
|
||
}
|
||
|
||
.style-gallery-wrap {
|
||
gap: 4px;
|
||
min-width: 0;
|
||
}
|
||
|
||
.style-gallery {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
align-content: flex-start;
|
||
align-items: center;
|
||
gap: 4px;
|
||
flex: 1 1 0;
|
||
min-width: 0;
|
||
/* one card row tall: wrapped cards land on the hidden second row */
|
||
height: 62px;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.style-gallery-more {
|
||
flex: 0 0 auto;
|
||
width: 17px;
|
||
height: 62px;
|
||
padding: 0;
|
||
border: 1px solid var(--border);
|
||
border-radius: 4px;
|
||
background: var(--surface);
|
||
color: var(--text-dim);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.style-gallery-more:hover {
|
||
border-color: var(--border-strong);
|
||
background: var(--hover);
|
||
}
|
||
|
||
.style-gallery-menu {
|
||
position: fixed;
|
||
position-anchor: --rb-drop-wrap;
|
||
top: calc(anchor(bottom) + 4px);
|
||
left: anchor(left);
|
||
position-try-fallbacks: flip-inline;
|
||
position-visibility: anchors-visible;
|
||
z-index: 60;
|
||
width: min(478px, calc(100vw - 16px));
|
||
max-height: 60vh;
|
||
overflow-y: auto;
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
|
||
gap: 4px;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 6px;
|
||
box-shadow: var(--docs-shadow-menu);
|
||
padding: 8px;
|
||
}
|
||
|
||
.style-card {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 2px;
|
||
flex: 0 0 auto;
|
||
width: 74px;
|
||
height: 62px;
|
||
border: 1px solid var(--border);
|
||
border-radius: 4px;
|
||
background: var(--surface);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.style-gallery-menu .style-card {
|
||
width: auto;
|
||
}
|
||
|
||
.style-card:hover:not(:disabled) {
|
||
border-color: var(--border-strong);
|
||
background: var(--hover);
|
||
}
|
||
|
||
.style-card.active {
|
||
border-color: var(--border-strong);
|
||
background: var(--active-bg);
|
||
}
|
||
|
||
.style-card:disabled {
|
||
opacity: 0.45;
|
||
cursor: default;
|
||
}
|
||
|
||
.style-card-label {
|
||
font-size: 10.5px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.style-card-preview {
|
||
font-size: 15px;
|
||
}
|
||
|
||
.style-card-preview.style-normal {
|
||
color: var(--text);
|
||
}
|
||
|
||
.style-card-preview.style-h1 {
|
||
color: var(--word-heading);
|
||
font-size: 18px;
|
||
font-weight: 400;
|
||
}
|
||
|
||
.style-card-preview.style-h2 {
|
||
color: var(--word-heading);
|
||
font-size: 15px;
|
||
}
|
||
|
||
.style-card-preview.style-h3 {
|
||
color: var(--docs-heading-3);
|
||
font-size: 13px;
|
||
}
|
||
|
||
/* ================= workspace / document canvas ================= */
|
||
|
||
.workspace {
|
||
display: flex;
|
||
flex: 1;
|
||
min-height: 0;
|
||
background: var(--canvas);
|
||
}
|
||
|
||
.editor-scroll {
|
||
flex: 1;
|
||
overflow-y: auto;
|
||
/* classic (non-overlay) scrollbars change clientWidth as they come and go,
|
||
which would make the zoom auto-refit oscillate — reserve the gutter */
|
||
scrollbar-gutter: stable;
|
||
padding: 26px 24px 140px;
|
||
}
|
||
|
||
.doc-zoom {
|
||
width: fit-content;
|
||
margin: 0 auto;
|
||
}
|
||
|
||
/* Format painter armed: Word-style I-beam + brush cursor, but only while
|
||
hovering the text flow (block children) — page margins and the blank area
|
||
below the content keep their normal cursor. Fixed black/white affordance,
|
||
identical in both themes (the page surface never follows the chrome theme). */
|
||
.ProseMirror.doc-painter-cursor > * {
|
||
cursor:
|
||
url('data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width=%2728%27%20height=%2728%27%20viewBox=%270%200%2028%2028%27%3E%3Cg%20stroke=%27white%27%20stroke-width=%273.4%27%20paint-order=%27stroke%27%20stroke-linecap=%27round%27%20fill=%27none%27%3E%3Cpath%20d=%27M2%205h5M2%2023h5M4.5%205v18%27/%3E%3C/g%3E%3Cg%20stroke=%27black%27%20stroke-width=%271.5%27%20fill=%27none%27%20stroke-linecap=%27round%27%3E%3Cpath%20d=%27M2%205h5M2%2023h5M4.5%205v18%27/%3E%3C/g%3E%3Crect%20x=%2716.6%27%20y=%273.5%27%20width=%273%27%20height=%275.2%27%20rx=%271.4%27%20fill=%27black%27%20stroke=%27white%27%20stroke-width=%271.2%27%20paint-order=%27stroke%27/%3E%3Crect%20x=%2710.5%27%20y=%278.2%27%20width=%2715%27%20height=%2710.3%27%20rx=%271.6%27%20fill=%27black%27%20stroke=%27white%27%20stroke-width=%271.2%27%20paint-order=%27stroke%27/%3E%3Cpath%20d=%27M10.5%2012.4%20H25.5%27%20stroke=%27white%27%20stroke-width=%271.3%27/%3E%3Cpath%20d=%27M15%2014.9%20V16.9%20M21%2014.9%20V16.9%27%20stroke=%27white%27%20stroke-width=%271.3%27%20stroke-linecap=%27round%27/%3E%3C/svg%3E')
|
||
4 14,
|
||
text;
|
||
}
|
||
|
||
/* ---- Word basics: marks / columns / page border / header-footer / nav / ruler ---- */
|
||
|
||
/* ¶ editing marks (front-end only) */
|
||
.show-marks .doc-page p::after,
|
||
.show-marks .doc-page h1::after,
|
||
.show-marks .doc-page h2::after,
|
||
.show-marks .doc-page h3::after,
|
||
.show-marks .doc-page h4::after {
|
||
content: '¶';
|
||
color: var(--docs-paper-mark);
|
||
opacity: 0.55;
|
||
font-size: 0.85em;
|
||
margin-left: 2px;
|
||
user-select: none;
|
||
}
|
||
|
||
/* multi-column layout (w:cols) */
|
||
.doc-page {
|
||
column-count: var(--page-cols, auto);
|
||
column-gap: 28px;
|
||
column-fill: auto;
|
||
}
|
||
|
||
/* mixed-column canvas layout (sections with differing column specs): blocks keep the
|
||
engine's stacked flow and are painted into their column slot by a per-block width +
|
||
constant translate; the width also applies in preview clones (line breaks must match) */
|
||
.doc-page .doc-col-block {
|
||
width: var(--col-w, auto);
|
||
}
|
||
|
||
/* floating-anchor wrappers and side-wrap carriers force width:100%, which
|
||
beats the section-width decoration above: their stray in-flow lines then
|
||
wrap at the full canvas width on the canvas but at the section width in
|
||
preview clones, drifting every boundary below (one corpus file split a line
|
||
across two pages, another sliced a heading) */
|
||
.doc-page .doc-col-block.doc-protected-floating,
|
||
.doc-page .doc-col-block.doc-img-float,
|
||
.doc-page .doc-col-block.doc-protected-wrapside {
|
||
width: var(--col-w, 100%);
|
||
max-width: var(--col-w, 100%);
|
||
}
|
||
|
||
.editor-scroll .doc-page:not(.measuring-columns) .doc-col-block {
|
||
transform: translate(var(--col-dx, 0px), var(--col-dy, 0px));
|
||
}
|
||
|
||
/* w:docGrid charSpace character grid (Word probes 2026-09-02): every character
|
||
in a typed linesAndChars section advances by natural width + charSpace/4096pt
|
||
— plain letter-spacing, inherited into tables and textboxes but not into the
|
||
header/footer strips (they live outside .doc-page). Uniform docs get the
|
||
variable from App.tsx's .doc-page injection; mixed docs set it per block via
|
||
the layout decoration channel (doc-charspace-block). Both selectors also
|
||
reach preview/export clones (.pv-content carries the doc-page class). */
|
||
.doc-page {
|
||
letter-spacing: var(--doc-char-space, normal);
|
||
}
|
||
.doc-page .doc-charspace-block {
|
||
letter-spacing: var(--doc-char-space, normal);
|
||
}
|
||
/* per-page header/footer strips are page-gap widgets inside the editor root,
|
||
but Word does not grid header/footer text (scope probe) */
|
||
.doc-page .page-gap-hf {
|
||
letter-spacing: normal;
|
||
}
|
||
|
||
/* page/margin-relative X anchors are absolute on the page in Word: undo the
|
||
column shift for boxes riding a column-translated block (Y keeps following
|
||
the anchor paragraph). Boxes with their own inline transform (rotation)
|
||
keep it — inline wins — a rare combination accepted as-is. */
|
||
.editor-scroll .doc-page:not(.measuring-columns) .doc-col-block [data-page-rel-x='1'] {
|
||
transform: translateX(calc(-1 * var(--col-dx, 0px)));
|
||
}
|
||
|
||
/* single-flow measuring state: transforms and the column-space pull-up must not
|
||
distort the 1-D virtual coordinates */
|
||
.editor-scroll .doc-page.measuring-columns .page-gap {
|
||
margin-top: 0 !important;
|
||
}
|
||
|
||
/* page border (w:pgBorders): per-page overlay boxes (see syncPageBorders);
|
||
border color/width are document data and come inline from the sectPr */
|
||
.page-border-overlays {
|
||
position: absolute;
|
||
inset: 0;
|
||
pointer-events: none;
|
||
z-index: 3;
|
||
}
|
||
|
||
.page-border-overlay {
|
||
position: absolute;
|
||
}
|
||
|
||
/* preview/print copy: same document-data border, one box per .pv-page sheet */
|
||
.pv-page-border {
|
||
position: absolute;
|
||
pointer-events: none;
|
||
z-index: 3;
|
||
}
|
||
|
||
/* ---- tab stops (w:tabs) ---- */
|
||
|
||
/* Paragraphs whose tabs were measured (TabStopExtension): tab chars get zero
|
||
intrinsic width; the jump to the stop is a letter-spacing decoration on the
|
||
tab char itself, so an ancestor <u> still underlines the gap. */
|
||
.has-tab-stops {
|
||
tab-size: 0;
|
||
}
|
||
|
||
/* TabStopExtension measures tab paragraphs with justification suspended: tab
|
||
advances are laid out in left-aligned space (Chromium and Word alike), so
|
||
the stretched spaces of a justified line must not enter the measurements */
|
||
.ProseMirror.doc-tabs-measuring .has-tab-stops {
|
||
text-align: left !important;
|
||
}
|
||
|
||
/* Word never stretches a tab on a justified line (the segment after it stays at
|
||
its stop); Chromium counts the tab as a justification opportunity unless told
|
||
otherwise */
|
||
.doc-tab {
|
||
text-justify: none;
|
||
}
|
||
|
||
/* symbols Chromium counts as ideographs for justification (U+2116 and friends,
|
||
see justifySymbolRanges) in non-CJK justified paragraphs: Word stretches only
|
||
the spaces around them */
|
||
.doc-justify-symbol {
|
||
text-justify: none;
|
||
}
|
||
|
||
/* tab with no room left on its line: Chromium still advances at least one
|
||
space width per tab, which would overflow — a zero font lifts that floor */
|
||
.doc-tab-collapse {
|
||
font-size: 0;
|
||
}
|
||
|
||
/* underlined tab run: browsers skip text-decoration over a tab advance, so
|
||
the blank (e.g. signature "By: ____") gets an explicit line */
|
||
.doc-tab-underline {
|
||
border-bottom: 1px solid currentColor;
|
||
}
|
||
|
||
/* tab leader (w:leader) drawn across the tab gap */
|
||
.doc-tab-leader-dot,
|
||
.doc-tab-leader-middleDot {
|
||
border-bottom: 1px dotted currentColor;
|
||
}
|
||
.doc-tab-leader-hyphen {
|
||
border-bottom: 1px dashed currentColor;
|
||
}
|
||
.doc-tab-leader-underscore {
|
||
border-bottom: 1px solid currentColor;
|
||
}
|
||
.doc-tab-leader-heavy {
|
||
border-bottom: 2px solid currentColor;
|
||
}
|
||
|
||
/* Drop cap: first-letter floats to 3 lines height */
|
||
.has-drop-cap::first-letter {
|
||
float: left;
|
||
line-height: 0.85;
|
||
margin-right: 0.05em;
|
||
margin-top: 0.1em;
|
||
font-weight: normal;
|
||
}
|
||
|
||
/* editor-created caps keep the body size on the run: scale the letter here;
|
||
Word-imported caps (drop-cap-own-size) already carry the enlarged run size */
|
||
.has-drop-cap:not(.drop-cap-own-size)::first-letter {
|
||
font-size: 3em;
|
||
}
|
||
|
||
/* Margin drop cap (in-margin): negative left margin to push it outside text area */
|
||
[data-drop-cap*='"type":"margin"']::first-letter {
|
||
margin-left: -0.6em;
|
||
}
|
||
|
||
/* Move-from revision: strikethrough + light red background (content moved away) */
|
||
.has-move-from {
|
||
background: var(--docs-paper-del-bg);
|
||
text-decoration: line-through;
|
||
text-decoration-color: var(--docs-paper-del-line);
|
||
}
|
||
|
||
/* Move-to revision: light green background (content moved in) */
|
||
.has-move-to {
|
||
background: var(--docs-paper-ins-bg);
|
||
}
|
||
|
||
/* pPrChange (tracked paragraph format change): light amber left border + badge */
|
||
.has-ppr-change {
|
||
border-left: 3px solid var(--docs-paper-ppr);
|
||
padding-left: 4px;
|
||
position: relative;
|
||
}
|
||
|
||
/* pPrChange badge: "format revision" label at paragraph end via ::after */
|
||
.has-ppr-change::after {
|
||
content: attr(data-ppr-change-label);
|
||
margin-left: 6px;
|
||
font-size: 8px;
|
||
color: var(--docs-paper-ppr-ink);
|
||
background: var(--docs-paper-ppr-bg);
|
||
border: 1px solid var(--docs-paper-ppr-border);
|
||
border-radius: 2px;
|
||
padding: 0 3px;
|
||
vertical-align: middle;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.has-sdt {
|
||
position: relative;
|
||
/* outline, not border/padding: chrome only appears while the selection is
|
||
inside the control, and must not reflow text or shift pagination */
|
||
outline: 1px solid var(--docs-paper-sdt-border);
|
||
outline-offset: 1px;
|
||
border-radius: 2px;
|
||
}
|
||
|
||
/* SDT alias label: tiny floating tag in the top-left corner via ::before.
|
||
Only the first block of a multi-block control carries the attribute */
|
||
.has-sdt[data-sdt-alias]::before {
|
||
content: attr(data-sdt-alias);
|
||
position: absolute;
|
||
top: -10px;
|
||
left: 0;
|
||
font-size: 8px;
|
||
line-height: 1;
|
||
color: var(--docs-paper-sdt-ink);
|
||
background: var(--docs-paper-sdt-bg);
|
||
border: 1px solid var(--docs-paper-sdt-border);
|
||
border-radius: 2px 2px 0 0;
|
||
padding: 0 3px;
|
||
pointer-events: none;
|
||
white-space: nowrap;
|
||
max-width: 120px;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.page-wrap {
|
||
position: relative;
|
||
min-height: var(--page-h, 1056px);
|
||
}
|
||
|
||
.page-hf {
|
||
position: absolute;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
/* Word: header/footer strip spans the text column; paragraphs default to
|
||
left-aligned black text at the body size (alignment comes from w:jc).
|
||
Word's Header/Footer styles are based on Normal, so runs without their own
|
||
w:sz take the document default size when it is smaller than the 10.5pt
|
||
static guess (docStyleCss emits the var shrink-only) */
|
||
width: var(--section-content-w, calc(var(--page-w, 816px) - 120px));
|
||
font-size: var(--hf-default-fs, 10.5pt);
|
||
color: var(--docs-paper-ink);
|
||
overflow: hidden;
|
||
z-index: 1;
|
||
cursor: default;
|
||
}
|
||
|
||
.page-hf-para {
|
||
white-space: pre-wrap;
|
||
min-height: 1.3em;
|
||
}
|
||
|
||
/* w:framePr floated frame (page number at a margin edge): the frame shares
|
||
the next paragraph's flow line instead of stacking above it. Only when a
|
||
following line exists — a frame that is the last/only paragraph keeps its
|
||
line, or the strip's used height collapses and overflow:hidden clips it */
|
||
.page-hf-frame:not(:last-child) {
|
||
height: 0;
|
||
min-height: 0;
|
||
overflow: visible;
|
||
}
|
||
|
||
/* tabbed header/footer paragraph (left\tcenter\tright): segments after each
|
||
tab are pinned at their stop offsets from the text-column left edge */
|
||
.page-hf-tabbed {
|
||
position: relative;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.page-hf-tabseg {
|
||
position: absolute;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.page-hf-tabseg-center {
|
||
transform: translateX(-50%);
|
||
}
|
||
|
||
.page-hf-tabseg-right {
|
||
transform: translateX(-100%);
|
||
}
|
||
|
||
/* header/footer layout-table row: cells as columns (display-only). Default
|
||
align-items (stretch) on purpose: a shaded cell's background must fill the
|
||
row height even when its own content is a single empty paragraph (Word cells
|
||
top-align; w:vAlign moves the paragraph stack inside the stretched cell) */
|
||
.page-hf-row {
|
||
display: flex;
|
||
text-align: left;
|
||
}
|
||
|
||
/* declared widths include the cell margins and borders (border-box); a tab laid
|
||
out past the cell edge stays hidden like Word's legacy layout */
|
||
.page-hf-cell {
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-width: 0;
|
||
flex-shrink: 1;
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* one block line per cell paragraph */
|
||
.page-hf-cell-para {
|
||
white-space: pre-wrap;
|
||
min-height: 1.3em;
|
||
}
|
||
|
||
.page-hf-cell-para.page-hf-tabbed {
|
||
position: relative;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.page-hf-cell-para .page-hf-tabseg {
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* inline picture on a layout-table cell run (logo); sits in the cell's text line */
|
||
.page-hf-cell-img {
|
||
vertical-align: middle;
|
||
object-fit: contain;
|
||
user-select: none;
|
||
pointer-events: none;
|
||
}
|
||
|
||
/* logo and other images in the part (display-only, excluded from text editing) */
|
||
.page-hf-images {
|
||
display: flex;
|
||
gap: 8px;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
user-select: none;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.page-hf-images img {
|
||
max-width: 100%;
|
||
object-fit: contain;
|
||
}
|
||
|
||
.page-hf-editing {
|
||
outline: 2px solid var(--word-blue);
|
||
outline-offset: 2px;
|
||
border-radius: 2px;
|
||
background: var(--docs-paper);
|
||
color: var(--docs-paper-ink);
|
||
overflow: visible;
|
||
cursor: text;
|
||
}
|
||
|
||
/* editing surface: a separate element receives input and clears on unmount (no leftover input text nodes) */
|
||
.page-hf-edit-surface {
|
||
outline: none;
|
||
min-height: 1.3em;
|
||
white-space: pre-wrap;
|
||
}
|
||
|
||
.page-hf-header {
|
||
top: var(--header-dist, 48px);
|
||
border-bottom: 1px dashed var(--docs-paper-hf-line);
|
||
padding-bottom: 2px;
|
||
}
|
||
|
||
.page-hf-footer {
|
||
bottom: var(--footer-dist, 48px);
|
||
border-top: 1px dashed var(--docs-paper-hf-line);
|
||
padding-top: 2px;
|
||
}
|
||
|
||
/* first/odd/even header-footer switcher (only shown when Different First Page or Different Odd & Even is on) */
|
||
.hf-variant-chips {
|
||
position: absolute;
|
||
top: 6px;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
display: flex;
|
||
gap: 4px;
|
||
z-index: 2;
|
||
}
|
||
|
||
.hf-variant-chips button {
|
||
font-size: 10px;
|
||
padding: 1px 8px;
|
||
border: 1px solid var(--border);
|
||
border-radius: 8px;
|
||
background: var(--surface);
|
||
color: var(--text-dim);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.hf-variant-chips button.on {
|
||
background: var(--word-blue);
|
||
border-color: var(--word-blue);
|
||
color: var(--docs-on-accent);
|
||
}
|
||
|
||
/* "Different first page" entry next to the header itself: while the
|
||
feature is off the whole chip bar stays invisible until the header area is
|
||
hovered or being edited, so plain documents keep a clean page top. The
|
||
padding-bottom stretches the (invisible) bar down to the header so the cursor
|
||
can travel from the header up to the chip without a hover gap. */
|
||
.hf-chips-idle {
|
||
opacity: 0;
|
||
pointer-events: none;
|
||
transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
||
padding-bottom: max(0px, calc(var(--header-dist, 48px) - 24px));
|
||
}
|
||
|
||
.page-wrap:has(.page-hf-header:hover) .hf-chips-idle,
|
||
.page-wrap:has(.page-hf-header.page-hf-editing) .hf-chips-idle,
|
||
.hf-variant-chips.hf-chips-idle:hover {
|
||
opacity: 1;
|
||
pointer-events: auto;
|
||
}
|
||
|
||
/* navigation pane */
|
||
.nav-pane {
|
||
width: 232px;
|
||
flex: none;
|
||
border-right: 1px solid var(--border);
|
||
background: var(--surface);
|
||
display: flex;
|
||
flex-direction: column;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.nav-pane-title {
|
||
padding: 10px 14px 8px;
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
color: var(--text);
|
||
border-bottom: 1px solid var(--border);
|
||
}
|
||
|
||
.nav-pane-list {
|
||
overflow-y: auto;
|
||
padding: 6px 0;
|
||
}
|
||
|
||
.nav-item {
|
||
display: block;
|
||
width: 100%;
|
||
text-align: left;
|
||
border: none;
|
||
background: none;
|
||
padding: 4px 14px;
|
||
font-size: 12.5px;
|
||
color: var(--text);
|
||
cursor: pointer;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.nav-item:hover {
|
||
background: var(--hover);
|
||
color: var(--accent);
|
||
}
|
||
|
||
.nav-l2 {
|
||
padding-left: 28px;
|
||
font-size: 12px;
|
||
}
|
||
.nav-l3 {
|
||
padding-left: 42px;
|
||
font-size: 11.5px;
|
||
}
|
||
.nav-l4 {
|
||
padding-left: 56px;
|
||
font-size: 11.5px;
|
||
}
|
||
|
||
.nav-empty {
|
||
padding: 12px 14px;
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
/* tracked changes: insertions underlined, deletions struck through (Word revisions) */
|
||
.doc-ins {
|
||
color: var(--docs-paper-rev-ink);
|
||
text-decoration: underline;
|
||
text-decoration-color: var(--docs-paper-rev-ink);
|
||
}
|
||
|
||
.doc-del {
|
||
color: var(--docs-paper-rev-ink);
|
||
text-decoration: line-through;
|
||
text-decoration-color: var(--docs-paper-rev-ink);
|
||
opacity: 0.72;
|
||
}
|
||
|
||
/* deleted text inside an insertion (insert-then-delete) keeps both cues */
|
||
.doc-ins .doc-del,
|
||
.doc-del .doc-ins {
|
||
text-decoration: underline line-through;
|
||
}
|
||
|
||
/* revision display mode: No Markup = as if all accepted (insertions shown normally, deletions hidden) */
|
||
.rev-display-none .doc-ins {
|
||
color: inherit;
|
||
text-decoration: none;
|
||
}
|
||
|
||
.rev-display-none .doc-del,
|
||
.rev-display-none .has-move-from {
|
||
display: none;
|
||
}
|
||
|
||
.rev-display-none .has-move-to {
|
||
background: none;
|
||
}
|
||
|
||
.rev-display-none .has-rpr-change {
|
||
text-decoration: none;
|
||
}
|
||
|
||
.rev-display-none .has-ppr-change {
|
||
border-left: none;
|
||
padding-left: 0;
|
||
}
|
||
|
||
.rev-display-none .has-ppr-change::after {
|
||
content: none;
|
||
}
|
||
|
||
/* revision display mode: Original = as if all rejected (deletions shown normally, insertions hidden).
|
||
known approximation: old formats of rPrChange/pPrChange can't be restored in CSS; markers are merely hidden */
|
||
.rev-display-original .doc-del {
|
||
color: inherit;
|
||
text-decoration: none;
|
||
opacity: 1;
|
||
}
|
||
|
||
.rev-display-original .doc-ins,
|
||
.rev-display-original .has-move-to {
|
||
display: none;
|
||
}
|
||
|
||
.rev-display-original .has-move-from {
|
||
background: none;
|
||
text-decoration: none;
|
||
}
|
||
|
||
.rev-display-original .has-rpr-change {
|
||
text-decoration: none;
|
||
}
|
||
|
||
.rev-display-original .has-ppr-change {
|
||
border-left: none;
|
||
padding-left: 0;
|
||
}
|
||
|
||
.rev-display-original .has-ppr-change::after {
|
||
content: none;
|
||
}
|
||
|
||
/* inserted then deleted: they cancel out in No Markup view → hidden; also nonexistent in Original view */
|
||
.rev-display-none .doc-ins .doc-del,
|
||
.rev-display-original .doc-del .doc-ins {
|
||
display: none;
|
||
}
|
||
|
||
/* balloon mode (print view, All Markup): deletions and format-change chrome move
|
||
to margin balloons and leave the text flow (Word's balloon view); insertions
|
||
stay inline. Collapsed paragraphs are fully deleted ones whose mark is also
|
||
deleted — Word shows no trace of them in the body. */
|
||
.rev-balloon .doc-del,
|
||
.rev-balloon .doc-para-del-collapse {
|
||
display: none;
|
||
}
|
||
|
||
/* deleted table rows/cells leave the flow with their fills (Word shows them balloon-side only) */
|
||
.rev-balloon tr.row-rev-del,
|
||
.rev-balloon td.cell-rev-del,
|
||
.rev-balloon th.cell-rev-del {
|
||
display: none;
|
||
}
|
||
|
||
.rev-balloon .has-ppr-change {
|
||
border-left: none;
|
||
padding-left: 0;
|
||
}
|
||
|
||
.rev-balloon .has-ppr-change::after {
|
||
content: none;
|
||
}
|
||
|
||
/* Compare result pane */
|
||
.compare-meta {
|
||
padding: 8px 12px;
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
border-bottom: 1px solid var(--border);
|
||
}
|
||
|
||
.compare-same {
|
||
text-align: center;
|
||
font-size: 11px;
|
||
color: var(--text-dim);
|
||
padding: 4px 0;
|
||
}
|
||
|
||
.compare-card {
|
||
border: 1px solid var(--border);
|
||
border-radius: 6px;
|
||
padding: 7px 9px;
|
||
margin: 4px 8px;
|
||
font-size: 12px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 4px;
|
||
}
|
||
|
||
.compare-left {
|
||
color: var(--docs-del-ink);
|
||
text-decoration: line-through;
|
||
opacity: 0.8;
|
||
}
|
||
|
||
.compare-right {
|
||
color: var(--docs-ins-ink);
|
||
}
|
||
|
||
.compare-added {
|
||
background: var(--docs-ins-bg);
|
||
}
|
||
|
||
.compare-removed {
|
||
background: var(--docs-del-bg);
|
||
}
|
||
|
||
/* comment composer (new comment) */
|
||
.comment-compose {
|
||
border-bottom: 1px solid var(--border);
|
||
padding: 8px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 6px;
|
||
}
|
||
|
||
.comment-compose textarea {
|
||
width: 100%;
|
||
min-height: 56px;
|
||
resize: vertical;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 6px;
|
||
padding: 6px 8px;
|
||
font-size: 13px;
|
||
font-family: inherit;
|
||
background: var(--surface);
|
||
color: var(--text);
|
||
}
|
||
|
||
.comment-compose-actions {
|
||
display: flex;
|
||
gap: 6px;
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
.comment-compose-actions button {
|
||
border: 1px solid var(--border-strong);
|
||
background: var(--surface);
|
||
border-radius: 5px;
|
||
padding: 4px 12px;
|
||
font-size: 12px;
|
||
cursor: pointer;
|
||
color: var(--text);
|
||
}
|
||
|
||
.comment-compose-actions button.primary {
|
||
background: var(--accent);
|
||
border-color: var(--accent);
|
||
color: var(--docs-on-accent);
|
||
}
|
||
|
||
.comment-card-del,
|
||
.comment-card-edit {
|
||
margin-left: auto;
|
||
border: none;
|
||
background: none;
|
||
color: var(--text-dim);
|
||
cursor: pointer;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
flex: none;
|
||
padding: 3px;
|
||
border-radius: 4px;
|
||
}
|
||
|
||
/* the pencil sits directly before the trash; only the first icon pushes to the right edge */
|
||
.comment-card-edit + .comment-card-del {
|
||
margin-left: 0;
|
||
}
|
||
|
||
.comment-card-del:hover {
|
||
background: var(--hover);
|
||
color: var(--danger);
|
||
}
|
||
|
||
.comment-card-edit:hover {
|
||
background: var(--hover);
|
||
color: var(--text);
|
||
}
|
||
|
||
/* comments: in-text highlight + right-side pane */
|
||
.doc-comment {
|
||
background: var(--docs-paper-comment-bg);
|
||
border-bottom: 2px solid var(--docs-paper-comment-line);
|
||
cursor: pointer;
|
||
}
|
||
|
||
/* range picked for a comment that is still being composed */
|
||
.comment-pending {
|
||
background: var(--docs-paper-comment-bg);
|
||
border-bottom: 2px dashed var(--docs-paper-comment-line);
|
||
}
|
||
|
||
/* Word: body shading of resolved threads is hidden (the jump flash animation can still briefly reveal the position) */
|
||
.doc-comment:has(.doc-comment-resolved),
|
||
.doc-comment-resolved,
|
||
.doc-comment-resolved .doc-comment {
|
||
background: none;
|
||
border-bottom: none;
|
||
cursor: text;
|
||
}
|
||
|
||
.doc-comment-flash {
|
||
animation: comment-flash 350ms cubic-bezier(0, 0, 0.2, 1);
|
||
}
|
||
|
||
@keyframes comment-flash {
|
||
0%,
|
||
40% {
|
||
background: var(--docs-paper-comment-flash);
|
||
}
|
||
100% {
|
||
background: var(--docs-paper-comment-bg);
|
||
}
|
||
}
|
||
|
||
.comments-pane {
|
||
width: 264px;
|
||
flex: none;
|
||
border-left: 1px solid var(--border);
|
||
background: var(--surface);
|
||
display: flex;
|
||
flex-direction: column;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.comments-pane-head {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 10px 14px 8px;
|
||
border-bottom: 1px solid var(--border);
|
||
}
|
||
|
||
.comments-pane-title {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
color: var(--text);
|
||
}
|
||
|
||
.comments-pane-close {
|
||
border: none;
|
||
background: none;
|
||
cursor: pointer;
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
border-radius: 3px;
|
||
padding: 2px 6px;
|
||
}
|
||
|
||
.comments-pane-close:hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.comments-pane-list {
|
||
overflow-y: auto;
|
||
padding: 8px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8px;
|
||
}
|
||
|
||
.comment-card {
|
||
display: block;
|
||
width: 100%;
|
||
text-align: left;
|
||
border: 1px solid var(--border);
|
||
border-radius: 6px;
|
||
background: var(--surface);
|
||
padding: 8px 10px;
|
||
cursor: pointer;
|
||
font-size: 12.5px;
|
||
color: var(--text);
|
||
}
|
||
|
||
.comment-card:hover {
|
||
border-color: var(--docs-comment-accent);
|
||
}
|
||
|
||
.comment-card.active {
|
||
border-color: var(--docs-comment-accent);
|
||
box-shadow: 0 0 0 1px var(--docs-comment-accent);
|
||
}
|
||
|
||
.comment-card-head {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
margin-bottom: 4px;
|
||
}
|
||
|
||
.comment-avatar {
|
||
flex: none;
|
||
width: 20px;
|
||
height: 20px;
|
||
border-radius: 50%;
|
||
background: var(--docs-comment-accent);
|
||
color: var(--docs-on-accent);
|
||
font-size: 10px;
|
||
font-weight: 600;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.comment-author {
|
||
font-weight: 600;
|
||
font-size: 12px;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.comment-date {
|
||
margin-left: auto;
|
||
flex: none;
|
||
font-size: 10.5px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.comment-anchor {
|
||
font-size: 11px;
|
||
color: var(--text-dim);
|
||
border-left: 2px solid var(--docs-comment-accent);
|
||
padding-left: 6px;
|
||
margin-bottom: 4px;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.comment-text {
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
}
|
||
|
||
.comments-empty {
|
||
padding: 12px 14px;
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
/* horizontal ruler */
|
||
.ruler {
|
||
position: relative;
|
||
height: 20px;
|
||
margin: 0 auto 6px;
|
||
background:
|
||
repeating-linear-gradient(
|
||
to right,
|
||
var(--docs-ruler-tick) 0,
|
||
var(--docs-ruler-tick) 1px,
|
||
transparent 1px,
|
||
transparent 12px
|
||
)
|
||
bottom / 100% 5px no-repeat,
|
||
var(--docs-ruler-bg);
|
||
border: 1px solid var(--docs-ruler-border);
|
||
border-radius: 2px;
|
||
font-size: 9px;
|
||
color: var(--docs-ruler-ink);
|
||
user-select: none;
|
||
overflow: hidden;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ruler-tab-type {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
width: 20px;
|
||
height: 100%;
|
||
background: var(--docs-ruler-btn-bg);
|
||
border: none;
|
||
border-right: 1px solid var(--docs-ruler-btn-border);
|
||
font-size: 9px;
|
||
font-weight: bold;
|
||
cursor: pointer;
|
||
z-index: 2;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: var(--docs-ruler-btn-ink);
|
||
}
|
||
|
||
.ruler-tab-type:hover {
|
||
background: var(--docs-ruler-btn-hover);
|
||
}
|
||
|
||
/* tab stop markers on ruler */
|
||
.ruler-tab {
|
||
position: absolute;
|
||
bottom: 2px;
|
||
width: 10px;
|
||
height: 10px;
|
||
font-size: 8px;
|
||
font-weight: bold;
|
||
color: var(--accent);
|
||
cursor: move;
|
||
transform: translateX(-50%);
|
||
text-align: center;
|
||
line-height: 10px;
|
||
z-index: 3;
|
||
user-select: none;
|
||
}
|
||
|
||
.ruler-tab:hover {
|
||
color: var(--accent-dark);
|
||
background: var(--docs-accent-ghost);
|
||
}
|
||
|
||
/* default tab stop guide (no interaction) */
|
||
.ruler-tab-default {
|
||
position: absolute;
|
||
bottom: 0;
|
||
width: 1px;
|
||
height: 4px;
|
||
background: var(--docs-ruler-tab-guide);
|
||
transform: translateX(-50%);
|
||
z-index: 1;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.ruler-zone {
|
||
position: absolute;
|
||
top: 0;
|
||
bottom: 0;
|
||
background: var(--docs-ruler-zone);
|
||
}
|
||
|
||
.ruler-num {
|
||
position: absolute;
|
||
top: 3px;
|
||
transform: translateX(-50%);
|
||
line-height: 1;
|
||
}
|
||
|
||
/* header/footer dropdown editor */
|
||
.hf-menu {
|
||
/* fixed + anchored like the other ribbon panels, so the ribbon-body
|
||
scroll clip can't cut it off */
|
||
position: fixed;
|
||
position-anchor: --rb-drop-wrap;
|
||
top: anchor(bottom);
|
||
left: anchor(left);
|
||
position-try-fallbacks: flip-inline;
|
||
position-visibility: anchors-visible;
|
||
z-index: 30;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border);
|
||
border-radius: 6px;
|
||
box-shadow: var(--docs-shadow-menu);
|
||
padding: 10px;
|
||
width: 260px;
|
||
}
|
||
|
||
.hf-menu-title {
|
||
font-size: 11px;
|
||
color: var(--text-dim);
|
||
margin-bottom: 6px;
|
||
}
|
||
|
||
.hf-menu input {
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
padding: 5px 8px;
|
||
border: 1px solid var(--border);
|
||
border-radius: 4px;
|
||
font-size: 12.5px;
|
||
background: var(--surface);
|
||
color: var(--text);
|
||
}
|
||
|
||
.hf-menu-actions {
|
||
display: flex;
|
||
gap: 6px;
|
||
margin-top: 8px;
|
||
justify-content: flex-end;
|
||
}
|
||
|
||
.hf-menu-actions button {
|
||
padding: 4px 12px;
|
||
font-size: 12px;
|
||
border-radius: 4px;
|
||
border: 1px solid var(--border);
|
||
background: var(--surface);
|
||
color: var(--text);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.hf-menu-actions .btn-primary {
|
||
background: var(--accent);
|
||
border-color: var(--accent);
|
||
color: var(--docs-on-accent);
|
||
}
|
||
|
||
/* the page: size/margins/background follow the docx sectPr via CSS vars */
|
||
.doc-page {
|
||
width: var(--page-w, 816px);
|
||
margin: 0 auto;
|
||
/* own stacking context: floating pictures rank via z-index (front band is
|
||
unbounded upward), so trap those ranks here — editor chrome mounted
|
||
outside the page (table handles, menus) always paints above them */
|
||
isolation: isolate;
|
||
background: var(--page-bg, var(--docs-paper));
|
||
box-shadow: var(--docs-page-shadow);
|
||
padding: var(--page-pad, 96px 96px 120px);
|
||
min-height: var(--page-h, 1056px);
|
||
outline: none;
|
||
font-family: Calibri, 'DengXian', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||
font-size: 11pt;
|
||
line-height: 1.35;
|
||
color: var(--docs-paper-ink);
|
||
/* Word's autoSpaceDE/DN (on by default): 1/8em gap between CJK and Latin/digits */
|
||
text-autospace: normal;
|
||
/* the other half of Word's ~1/4em gap, delivered by .doc-autospace-pad spans */
|
||
--doc-autospace-pad: 0.125em;
|
||
}
|
||
|
||
/* CJK/Latin autospace pad: the character after the boundary carries the extra
|
||
1/8em as a start margin. Plain inline (not inline-block): an atomic inline
|
||
would suppress Chromium's own text-autospace gap. Not an empty span: when an
|
||
empty inline's margin is what no longer fits at the line end, Chromium rewinds
|
||
to the previous recorded break opportunity (the preceding pad) instead of
|
||
breaking inside the CJK run, dropping a third of the line (prod 003). */
|
||
.doc-autospace-pad {
|
||
margin-inline-start: var(--doc-autospace-pad, 0.125em);
|
||
}
|
||
|
||
/* dark page in the light theme: Word's gray band around the dark paper — one
|
||
variable override, every canvas-band rule below reads var(--canvas) */
|
||
.workspace-dark {
|
||
--canvas: #3d3d3d;
|
||
}
|
||
|
||
/* ---- Dark page (View ▸ Dark Mode; the dark theme's default) ----
|
||
Word-style: the paper renders dark and authored document colors are remapped
|
||
for contrast, on screen only. Emission sites append `--dk-*` twins next to the
|
||
authored inline declarations (editor/dark-page.ts); the rules below switch the
|
||
painted property to the twin. Screen media only, so printToPDF of the live
|
||
canvas keeps the authored colors (the pagination preview sits outside
|
||
.page-dark and stays paper-white like Word's print preview). The paper
|
||
constants are darkPageColor() of their light values — keep the two in step. */
|
||
@media screen {
|
||
.page-dark {
|
||
--ai-highlight: #483d1e;
|
||
--ai-highlight-border: #d9a71e;
|
||
--docs-paper: #1e1e1e;
|
||
--docs-paper-ink: #ffffff;
|
||
--docs-paper-ink-dim: #d2d2d2;
|
||
--docs-paper-ink-mid: #b4b4b4;
|
||
--docs-paper-ink-soft: #969696;
|
||
--docs-paper-ink-faint: #878787;
|
||
--docs-paper-heading: #83a4de;
|
||
--docs-paper-link: #55a8fb;
|
||
--docs-paper-accent: #629cf3;
|
||
--docs-paper-mark: #468edb;
|
||
--docs-paper-grid: rgb(70 142 219 / 13%);
|
||
--docs-paper-hf-line: #474747;
|
||
--docs-paper-chip-bg: #222222;
|
||
--docs-paper-select-bg: #222a32;
|
||
--docs-paper-stripe: #2b2b2b;
|
||
--docs-paper-chart-grid: #393939;
|
||
--docs-paper-chart-border: #3f3f3f;
|
||
--docs-paper-field-bg: rgb(255 255 255 / 7%);
|
||
--docs-paper-watermark: rgb(142 142 142 / 18%);
|
||
--docs-paper-rev-ink: #ff8a8a;
|
||
--docs-paper-ins-bg: rgb(122 246 168 / 8%);
|
||
--docs-paper-del-bg: rgb(255 114 114 / 8%);
|
||
--docs-paper-del-line: #ff7272;
|
||
--docs-paper-ppr: #e4971e;
|
||
--docs-paper-ppr-ink: #fea867;
|
||
--docs-paper-ppr-bg: #463c1e;
|
||
--docs-paper-ppr-border: #a07b1e;
|
||
--docs-paper-rpr: #e9b137;
|
||
--docs-paper-sdt-border: #345174;
|
||
--docs-paper-sdt-ink: #648eb8;
|
||
--docs-paper-sdt-bg: #22272d;
|
||
--docs-paper-comment-bg: rgb(106 166 32 / 25%);
|
||
--docs-paper-comment-flash: rgb(145 181 102 / 45%);
|
||
--docs-paper-comment-line: #91b566;
|
||
--docs-paper-ai-anchor-bg: rgb(74 116 197 / 14%);
|
||
--docs-paper-ai-anchor-line: #4a74c5;
|
||
--docs-paper-xe-ink: #c5ab7f;
|
||
--docs-paper-xe-bg: #332d1e;
|
||
--docs-paper-xe-border: #796a37;
|
||
--docs-paper-hit-bg: #745a1e;
|
||
--docs-paper-hit-active-bg: #d4781f;
|
||
--docs-paper-hit-active-ink: #1e1e1e;
|
||
}
|
||
|
||
/* Filled text boxes are a light island: their text contrasts with the box
|
||
fill, not with the paper, so nothing inside them is remapped. The shared
|
||
constants rule near the top of the file gives them the light paper values
|
||
back; this re-sets the page ink they would otherwise inherit from
|
||
.doc-page (docStyleCss re-sets a document default color the same way),
|
||
and every twin rule below skips them. */
|
||
.page-dark .doc-textbox-filled {
|
||
color: var(--docs-paper-ink);
|
||
}
|
||
|
||
/* dark shading is remapped light on the dark page, so its auto ink goes paper-dark */
|
||
.page-dark [data-ink='light']:where(:not(.doc-textbox-filled *)) {
|
||
--docs-paper-ink: var(--docs-paper);
|
||
}
|
||
|
||
.page-dark [data-ink='light'] [data-ink='dark']:where(:not(.doc-textbox-filled *)) {
|
||
--docs-paper-ink: #ffffff;
|
||
}
|
||
|
||
/* Inline twins. !important is what beats the authored inline declaration;
|
||
:where() keeps the specificity at the bare attribute selector so any later
|
||
paper rule still wins over these. */
|
||
:where(.page-dark) [style*='--dk-c:']:where(:not(.doc-textbox-filled, .doc-textbox-filled *)) {
|
||
color: var(--dk-c) !important;
|
||
}
|
||
|
||
:where(.page-dark) [style*='--dk-bg:']:where(:not(.doc-textbox-filled, .doc-textbox-filled *)) {
|
||
background-color: var(--dk-bg) !important;
|
||
}
|
||
|
||
:where(.page-dark) [style*='--dk-b-t:']:where(:not(.doc-textbox-filled, .doc-textbox-filled *)) {
|
||
border-top: var(--dk-b-t) !important;
|
||
}
|
||
|
||
:where(.page-dark) [style*='--dk-b-r:']:where(:not(.doc-textbox-filled, .doc-textbox-filled *)) {
|
||
border-right: var(--dk-b-r) !important;
|
||
}
|
||
|
||
:where(.page-dark) [style*='--dk-b-b:']:where(:not(.doc-textbox-filled, .doc-textbox-filled *)) {
|
||
border-bottom: var(--dk-b-b) !important;
|
||
}
|
||
|
||
:where(.page-dark) [style*='--dk-b-l:']:where(:not(.doc-textbox-filled, .doc-textbox-filled *)) {
|
||
border-left: var(--dk-b-l) !important;
|
||
}
|
||
|
||
/* table-level w:tblBorders: twins of the --doc-b-* cell rules further down
|
||
(same selectors, the table's --dk-tb-* variables instead; :where() keeps
|
||
the specificity equal to the authored rules) */
|
||
.page-dark .doc-table td:where(:not(.doc-textbox-filled *)),
|
||
.page-dark .doc-table th:where(:not(.doc-textbox-filled *)) {
|
||
border-top: var(--dk-tb-h, none);
|
||
border-bottom: var(--dk-tb-h, none);
|
||
border-left: var(--dk-tb-v, none);
|
||
border-right: var(--dk-tb-v, none);
|
||
}
|
||
|
||
.page-dark .doc-table tr:first-child > td:where(:not(.doc-textbox-filled *)),
|
||
.page-dark .doc-table tr:first-child > th:where(:not(.doc-textbox-filled *)) {
|
||
border-top: var(--dk-tb-t, var(--dk-tb-h, none));
|
||
}
|
||
|
||
.page-dark .doc-table tr:last-child > td:where(:not(.doc-textbox-filled *)),
|
||
.page-dark .doc-table tr:last-child > th:where(:not(.doc-textbox-filled *)) {
|
||
border-bottom: var(--dk-tb-b, var(--dk-tb-h, none));
|
||
}
|
||
|
||
.page-dark .doc-table td:first-child:where(:not(.doc-textbox-filled *)),
|
||
.page-dark .doc-table th:first-child:where(:not(.doc-textbox-filled *)) {
|
||
border-left: var(--dk-tb-l, var(--dk-tb-v, none));
|
||
}
|
||
|
||
.page-dark .doc-table td:last-child:where(:not(.doc-textbox-filled *)),
|
||
.page-dark .doc-table th:last-child:where(:not(.doc-textbox-filled *)) {
|
||
border-right: var(--dk-tb-r, var(--dk-tb-v, none));
|
||
}
|
||
}
|
||
|
||
/* visual page-break indicator (w:pageBreakBefore); a list item's ::before is its
|
||
numbering marker, so list items carry the label on ::after */
|
||
.doc-page .page-break-before {
|
||
position: relative;
|
||
border-top: 1px dashed var(--border-strong);
|
||
padding-top: 14px;
|
||
margin-top: 14pt;
|
||
}
|
||
|
||
.doc-page .page-break-before:where(:not(.doc-li))::before,
|
||
.doc-page .doc-li.page-break-before::after {
|
||
content: attr(data-page-break-label);
|
||
position: absolute;
|
||
top: -9px;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
font-size: 10px;
|
||
color: var(--text-dim);
|
||
background: var(--page-bg, var(--docs-paper));
|
||
padding: 0 8px;
|
||
}
|
||
|
||
.doc-page p {
|
||
margin: 0 0 8pt;
|
||
}
|
||
|
||
/* M4 always-on pagination in the canvas: page gap = previous page's bottom margin (white) + inter-page band (gray) + next page's top margin (white) */
|
||
.page-gap {
|
||
position: relative;
|
||
cursor: default;
|
||
user-select: none;
|
||
}
|
||
|
||
.page-gap::before {
|
||
content: '';
|
||
position: absolute;
|
||
top: var(--gap-mb, 96px);
|
||
bottom: var(--gap-mt, 96px);
|
||
left: 0;
|
||
right: 0;
|
||
background: var(--canvas);
|
||
box-shadow: var(--docs-gap-inset);
|
||
}
|
||
|
||
/* inline gap for mid-paragraph page breaks: inserted at the broken line inside the paragraph, takes its own line, excluded from text selection/cursor.
|
||
Opaque paper background so the paragraph's own shading can't cross the band (the ::before canvas band paints on top of it). */
|
||
.page-gap-inline {
|
||
display: inline-block;
|
||
vertical-align: top;
|
||
pointer-events: none;
|
||
text-indent: 0;
|
||
background: var(--page-bg, var(--docs-paper));
|
||
}
|
||
|
||
/* in-cell gap (single-column in-row table cut): opaque paper background so the cell's
|
||
shading/borders don't cross the band; z-index lifts it above collapsed-border painting */
|
||
.page-gap-cell {
|
||
background: var(--page-bg, var(--docs-paper));
|
||
z-index: 1;
|
||
}
|
||
|
||
/* In-table gap at a row boundary. A real spanning cell isolates collapsed
|
||
borders/backgrounds from the page gutter; the inner fill paints paper /
|
||
canvas / paper bands without inheriting table-cell decoration. */
|
||
.page-gap-table {
|
||
display: table-row;
|
||
}
|
||
|
||
.doc-table .page-gap-table > td {
|
||
position: relative;
|
||
height: auto;
|
||
padding: 0;
|
||
/* !important: the td edge-border rules (--doc-b-l/r on first/last-child) come
|
||
later in the sheet and would otherwise frame the page gutter */
|
||
border: 0 !important;
|
||
background: var(--page-bg, var(--docs-paper));
|
||
}
|
||
|
||
.page-gap-table::before {
|
||
display: none;
|
||
}
|
||
|
||
/* absolute: height 100% of an auto-height td resolves to 0, hiding the bands.
|
||
left/width are re-anchored to the paper box by alignTableGapFills (inline
|
||
styles): the cell's own box follows the table, not the paper */
|
||
.page-gap-table-fill {
|
||
position: absolute;
|
||
inset: 0;
|
||
background: linear-gradient(
|
||
to bottom,
|
||
var(--page-bg, var(--docs-paper)) 0 var(--gap-mb, 96px),
|
||
var(--canvas) var(--gap-mb, 96px) calc(var(--gap-mb, 96px) + 28px),
|
||
var(--page-bg, var(--docs-paper)) calc(var(--gap-mb, 96px) + 28px) 100%
|
||
);
|
||
}
|
||
|
||
/* footnote area at the top of a page gap (previous page's bottom, Word behavior): the gap was already enlarged by the reserved height;
|
||
the estimated height differs from actual rendering by pixels, so overflow into the bottom-margin area is allowed (no clipping) */
|
||
.page-gap-notes {
|
||
position: absolute;
|
||
/* small offset keeps the separator off the last line's descenders when the break lands mid-paragraph */
|
||
top: 5px;
|
||
overflow: visible;
|
||
box-sizing: border-box;
|
||
pointer-events: auto;
|
||
font-size: 10pt;
|
||
/* font + line-height mirror the estimateFootnoteHeight model (line-height set
|
||
inline in px, docGrid-snapped) so reserved and rendered heights agree */
|
||
font-family: Calibri, Carlito, 'Carlito GO', sans-serif;
|
||
line-height: 1.3;
|
||
color: var(--docs-paper-ink-dim);
|
||
text-indent: 0;
|
||
text-align: left;
|
||
}
|
||
|
||
/* Word's built-in separator: a 2in rule (clamped to the column) on its own line;
|
||
the border sits at the bottom of the reserved row (11 + 1 + 4 = FOOTNOTE_SEPARATOR_H)
|
||
so it clears the last body line's descenders instead of underlining them */
|
||
.page-gap-notes::before {
|
||
content: '';
|
||
display: block;
|
||
width: min(2in, 100%);
|
||
height: 11px;
|
||
border-bottom: 1px solid var(--docs-paper-ink-faint);
|
||
margin-bottom: 4px;
|
||
}
|
||
|
||
/* rows are min-height (App.tsx): a long entry grows past its reserved height
|
||
and spills into the bottom margin instead of being clipped mid-line */
|
||
.page-gap-note {
|
||
cursor: default;
|
||
}
|
||
|
||
.pv-footnote {
|
||
overflow: hidden;
|
||
}
|
||
|
||
.page-gap-note sup {
|
||
margin-right: 4px;
|
||
font-size: 0.65em;
|
||
}
|
||
|
||
/* pagination preview: page-bottom footnote area (the referencing page; separator + small text); tiny overflow spills into the bottom margin */
|
||
.pv-footnotes {
|
||
position: absolute;
|
||
overflow: visible;
|
||
box-sizing: border-box;
|
||
font-size: 10pt;
|
||
line-height: 1.3;
|
||
color: var(--docs-paper-ink-dim);
|
||
}
|
||
|
||
/* same 2in bottom-anchored rule as .page-gap-notes::before; consuming the full
|
||
reserved row keeps the entries aligned with the engine's height reservation */
|
||
.pv-footnotes::before {
|
||
content: '';
|
||
display: block;
|
||
width: min(2in, 100%);
|
||
height: 11px;
|
||
border-bottom: 1px solid var(--docs-paper-ink-faint);
|
||
margin-bottom: 4px;
|
||
}
|
||
|
||
/* Word renders note markers with the reference character style: superscript at
|
||
~65% of the entry size (the UA's font-size:smaller left them oversized) */
|
||
.pv-footnote sup {
|
||
margin-right: 4px;
|
||
font-size: 0.65em;
|
||
}
|
||
|
||
/* endnote area: right after the body's end, separator above the first entry, continuation pages have no separator */
|
||
.pv-endnotes {
|
||
position: absolute;
|
||
overflow: visible;
|
||
box-sizing: border-box;
|
||
font-size: 10pt;
|
||
line-height: 1.3;
|
||
color: var(--docs-paper-ink-dim);
|
||
}
|
||
|
||
.pv-endnote-separator {
|
||
/* matches FOOTNOTE_SEPARATOR_H (16px): 11 box + 1 bottom border + 4 spacing —
|
||
the rule sits at the row's bottom, clear of the last body line above it */
|
||
width: min(2in, 100%);
|
||
border-bottom: 1px solid var(--docs-paper-ink-faint);
|
||
margin-bottom: 4px;
|
||
height: 11px;
|
||
}
|
||
|
||
/* header/footer strips inside canvas page gaps: display-only copies of each page's
|
||
variant (edit via the document top/bottom areas or the pagination preview) */
|
||
.page-gap-hf {
|
||
pointer-events: none;
|
||
}
|
||
|
||
/* floating textbox in a header/footer part: drawn at its anchor's page position
|
||
(strip-relative offsets from hfTextBoxStyle) like Word's anchored shapes, so
|
||
its lines never stack into the strip flow. The box can sit outside the strip's
|
||
own line box, so a strip hosting boxes opens its overflow and gives up its
|
||
stacking context (no z-index, and centering by offset instead of the
|
||
translate, which would keep one): behindDoc boxes (z-index -1) then paint
|
||
under the body like floating header images, in-front boxes stay above it.
|
||
Inline left/transform from sizeGapHf / the edge pins and the .pv-page rule
|
||
below still take precedence. */
|
||
.page-hf.page-hf-has-boxes {
|
||
overflow: visible;
|
||
z-index: auto;
|
||
left: calc(50% - var(--section-content-w, calc(var(--page-w, 816px) - 120px)) / 2);
|
||
transform: none;
|
||
}
|
||
|
||
.page-hf-textbox {
|
||
position: absolute;
|
||
display: flex;
|
||
flex-direction: column;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.page-hf-textbox .page-hf-para {
|
||
min-height: 0;
|
||
}
|
||
|
||
/* a strip paragraph hosting the boxes anchored to it (paragraph-relative offsets) */
|
||
.page-hf-anchor {
|
||
position: relative;
|
||
}
|
||
|
||
/* words break only at spaces like Word; wrap="none" keeps a label on one line */
|
||
.page-hf-textbox .page-hf-para {
|
||
word-break: normal;
|
||
overflow-wrap: normal;
|
||
}
|
||
|
||
.page-hf-textbox.page-hf-nowrap .page-hf-para {
|
||
white-space: pre;
|
||
}
|
||
|
||
/* floating header image (picture watermark) on canvas pages, mirroring
|
||
.pv-watermark-img: behind the body text via negative z-index, which needs
|
||
.doc-page as the stacking context (isolation below) so the image still paints
|
||
above the paper background. Document content: identical in both themes. */
|
||
.page-hf-float-img {
|
||
position: absolute;
|
||
z-index: -1;
|
||
pointer-events: none;
|
||
user-select: none;
|
||
}
|
||
|
||
.view-print .doc-page {
|
||
isolation: isolate;
|
||
}
|
||
|
||
/* first page's floating-image host: zero-height page-float-host so measurement
|
||
and preview clones ignore it without page-boundary consumers counting it as a page */
|
||
.page-first-floats {
|
||
position: relative;
|
||
height: 0;
|
||
cursor: default;
|
||
user-select: none;
|
||
}
|
||
|
||
/* when a page gap is right next to a page-break indicator, hide the duplicate dashed marker (keep placeholder height) */
|
||
.page-gap + .page-break-before {
|
||
border-top-color: transparent;
|
||
}
|
||
|
||
.page-gap + .page-break-before:where(:not(.doc-li))::before,
|
||
.page-gap + .doc-li.page-break-before::after {
|
||
display: none;
|
||
}
|
||
|
||
/* Word drops space-before on the lead block of a page forced by an explicit break;
|
||
!important beats the inline spacing style, unscoped so pv clones and direct print match */
|
||
.page-break-lead {
|
||
margin-top: 0 !important;
|
||
}
|
||
|
||
/* Sole line taller than its column (oversized inline picture): Word overflow-clips
|
||
it at the page bottom. The max-height rides the setOversizeClips inline style;
|
||
unscoped so pv clones and direct print match */
|
||
.doc-oversize-clip {
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* Word border groups: adjacent paragraphs with identical w:pBdr + shading draw
|
||
top/bottom lines only at the group edges (ParaBorderMergeExtension classes).
|
||
!important beats the inline border style; unscoped so pv clones and print match */
|
||
.pbdr-suppress-top {
|
||
border-top: none !important;
|
||
}
|
||
|
||
.pbdr-suppress-bottom {
|
||
border-bottom: none !important;
|
||
}
|
||
|
||
/* pagination preview: read-only overlay, one fixed-size box per page, content clone clipped via negative margin */
|
||
.pagination-preview {
|
||
position: fixed;
|
||
inset: 0;
|
||
z-index: 60;
|
||
display: flex;
|
||
flex-direction: column;
|
||
background: var(--docs-pv-canvas);
|
||
}
|
||
|
||
/* chunked PDF export: each printToPDF flips print<->screen media over the whole
|
||
document; parking the subtree layout of everything outside the printed group
|
||
(the editor is covered by the opaque preview overlay; skipped pages keep
|
||
their inline-sized box) keeps those flips from stalling Chromium for minutes
|
||
on hundreds of table-heavy pages */
|
||
.app.pv-exporting > *:not(.pagination-preview) {
|
||
content-visibility: hidden;
|
||
}
|
||
|
||
.pv-page.pv-print-skip {
|
||
content-visibility: hidden;
|
||
}
|
||
|
||
.pv-toolbar {
|
||
position: relative;
|
||
z-index: 1;
|
||
flex: none;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
padding: 8px 16px;
|
||
background: var(--surface);
|
||
border-bottom: 1px solid var(--border);
|
||
-webkit-app-region: no-drag;
|
||
}
|
||
|
||
.pv-title {
|
||
font-weight: 600;
|
||
}
|
||
|
||
.pv-count {
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.pv-hint {
|
||
margin-left: auto;
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.pv-close {
|
||
border: 1px solid var(--border);
|
||
background: var(--surface);
|
||
border-radius: 4px;
|
||
padding: 4px 14px;
|
||
cursor: pointer;
|
||
-webkit-app-region: no-drag;
|
||
}
|
||
|
||
.pv-close:hover {
|
||
background: var(--word-blue);
|
||
border-color: var(--word-blue);
|
||
color: var(--docs-on-accent);
|
||
}
|
||
|
||
.pv-scroll {
|
||
flex: 1;
|
||
overflow: auto;
|
||
padding: 24px 0 48px;
|
||
}
|
||
|
||
.pv-page {
|
||
position: relative;
|
||
/* own stacking context: behind-text layers (picture watermarks, z-index -1)
|
||
must stay above this page's background, not sink under it */
|
||
isolation: isolate;
|
||
margin: 0 auto 24px;
|
||
background: var(--docs-paper);
|
||
box-shadow: var(--docs-page-shadow);
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
font-family: Calibri, 'DengXian', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||
font-size: 11pt;
|
||
line-height: 1.35;
|
||
color: var(--docs-paper-ink);
|
||
}
|
||
|
||
.pv-clip {
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* header picture watermark (absolute VML shape): drawn once per preview page,
|
||
behind the body text. Document content: renders identically in both themes. */
|
||
.pv-watermark-img {
|
||
position: absolute;
|
||
z-index: -1;
|
||
pointer-events: none;
|
||
}
|
||
|
||
/* clip at the paper edge, not the content box: over-wide tables bleed into the right
|
||
margin like Word (keep overflow hidden — print pagination needs the box monolithic).
|
||
Left side symmetrically: negative w:tblInd tables start inside the left margin, and
|
||
clipping at the content box culled their leading characters from the exported text.
|
||
The padding compensates the negative margin so the content position is unchanged —
|
||
only the clip edge moves out to the paper edge. */
|
||
.pv-sheet > .pv-clip {
|
||
margin-right: calc(-1 * var(--pv-mr, 0px));
|
||
margin-left: calc(-1 * var(--pv-ml, 0px));
|
||
padding-left: var(--pv-ml, 0px);
|
||
}
|
||
|
||
/* the page's layout lives on this wrapper so the whole sheet can scale as one
|
||
when the markup strip is on (Word's print-markup geometry) */
|
||
.pv-sheet {
|
||
position: absolute;
|
||
inset: 0;
|
||
box-sizing: border-box;
|
||
transform-origin: 0 0;
|
||
}
|
||
|
||
.pv-markup {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
transform-origin: 0 0;
|
||
pointer-events: none;
|
||
font-family: 'Segoe UI', 'PingFang SC', sans-serif;
|
||
}
|
||
|
||
.pv-markup-band {
|
||
position: absolute;
|
||
top: 0;
|
||
bottom: 0;
|
||
background: var(--docs-print-markup-band);
|
||
}
|
||
|
||
.pv-comment-leaders {
|
||
position: absolute;
|
||
left: 0;
|
||
top: 0;
|
||
}
|
||
|
||
.pv-comment-leaders path {
|
||
fill: none;
|
||
stroke: var(--docs-paper-comment-line);
|
||
stroke-width: 1;
|
||
stroke-dasharray: 3 2;
|
||
}
|
||
|
||
.pv-comment-bubble {
|
||
position: absolute;
|
||
box-sizing: border-box;
|
||
padding: 5px 8px;
|
||
border: 1px solid var(--docs-paper-comment-line);
|
||
border-radius: 4px;
|
||
background: var(--docs-print-comment-fill);
|
||
color: var(--docs-print-comment-ink);
|
||
font-size: 12px;
|
||
line-height: 16px;
|
||
white-space: pre-wrap;
|
||
overflow-wrap: break-word;
|
||
}
|
||
|
||
.pv-comment-label {
|
||
font-weight: 700;
|
||
}
|
||
|
||
.pv-comment-leaders path.pv-leader-rev {
|
||
stroke: var(--docs-print-rev-line);
|
||
}
|
||
|
||
/* Word's revision balloons: white, author-line border, tighter than comments */
|
||
.pv-rev-bubble {
|
||
padding: 2px 6px;
|
||
border-color: var(--docs-print-rev-line);
|
||
background: var(--docs-print-rev-fill);
|
||
font-size: 11px;
|
||
line-height: 14px;
|
||
}
|
||
|
||
/* crowded page: one line per balloon, like Word before it spills to the overflow pane */
|
||
.pv-rev-bubble-compact {
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
/* column flow: regions stack vertically; narrow clipped columns sit side by side within a region */
|
||
.pv-region {
|
||
display: flex;
|
||
align-items: flex-start;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.pv-col {
|
||
flex: none;
|
||
}
|
||
|
||
/* the clone is a gapless continuous flow (slices use virtual coordinates); canvas page gaps don't enter the clone */
|
||
.pv-clip .page-gap,
|
||
.pv-clip .page-gap-cut,
|
||
.pv-clip .page-float-host {
|
||
display: none;
|
||
}
|
||
|
||
/* the clone keeps only content layout, stripping the page box's chrome (width = content area, matching the canvas) */
|
||
.pv-clip .doc-page {
|
||
width: auto;
|
||
margin: 0;
|
||
padding: 0;
|
||
background: transparent;
|
||
box-shadow: none;
|
||
min-height: 0;
|
||
pointer-events: none;
|
||
}
|
||
|
||
/* page-break indicators are only visually hidden, keeping placeholder height — clone line heights must match measurement */
|
||
.pv-clip .doc-page .page-break-before {
|
||
border-top-color: transparent;
|
||
}
|
||
|
||
.pv-clip .doc-page .page-break-before:where(:not(.doc-li))::before,
|
||
.pv-clip .doc-page .doc-li.page-break-before::after {
|
||
visibility: hidden;
|
||
}
|
||
|
||
.pv-page .page-hf {
|
||
cursor: default;
|
||
/* anchor at the left margin, not left:50% + translateX(-50%): Chromium's
|
||
print fit-to-paper shrink measures the centered strip's untransformed box
|
||
(reaching 50% + content width past the paper edge) and uniformly scaled
|
||
down whole multi-page exports */
|
||
left: var(--pv-ml);
|
||
transform: none;
|
||
}
|
||
|
||
/* the 1.3em floor is editor chrome (clickable empty strips): exported strip
|
||
lines take their natural height, where Word draws them and what the
|
||
push-down probe measures */
|
||
.pv-page .page-hf-para {
|
||
min-height: 0;
|
||
}
|
||
|
||
.pv-pageno {
|
||
position: absolute;
|
||
right: 8px;
|
||
bottom: 8px;
|
||
font-size: 10px;
|
||
color: var(--docs-paper-ink-faint);
|
||
user-select: none;
|
||
}
|
||
|
||
.doc-page h1,
|
||
.doc-page h2,
|
||
.doc-page h3,
|
||
.doc-page h4,
|
||
.doc-page h5,
|
||
.doc-page h6 {
|
||
font-weight: 400;
|
||
line-height: 1.2;
|
||
margin: 14pt 0 4pt;
|
||
}
|
||
|
||
/* built-in heading look; :where keeps specificity below [data-style] rules,
|
||
and .doc-outline-only (heading by w:outlineLvl alone) keeps body formatting */
|
||
.doc-page h1:where(:not(.doc-outline-only)) {
|
||
font-size: 16pt;
|
||
color: inherit;
|
||
}
|
||
|
||
.doc-page h2:where(:not(.doc-outline-only)) {
|
||
font-size: 13pt;
|
||
color: inherit;
|
||
}
|
||
|
||
.doc-page h3:where(:not(.doc-outline-only)) {
|
||
font-size: 12pt;
|
||
color: inherit;
|
||
}
|
||
|
||
.doc-page h4:where(:not(.doc-outline-only)),
|
||
.doc-page h5:where(:not(.doc-outline-only)),
|
||
.doc-page h6:where(:not(.doc-outline-only)) {
|
||
font-size: 11pt;
|
||
color: inherit;
|
||
font-style: italic;
|
||
}
|
||
|
||
/* body size instead of the UA heading size; stays below [data-style] rules */
|
||
.doc-page :where(h1, h2, h3, h4, h5, h6).doc-outline-only {
|
||
font-size: inherit;
|
||
}
|
||
|
||
.doc-link {
|
||
color: var(--docs-paper-link);
|
||
text-decoration: underline;
|
||
cursor: pointer;
|
||
}
|
||
|
||
/* flat list items (1:1 with w:p anchors)
|
||
geometry comes from w:ind (--li-left text indent / --li-hang hanging marker-area width,
|
||
emitted by extensions.ts; --style-li-left is the style-level w:ind fallback from
|
||
doc-style-css.ts); defaults replicate the old fixed per-level indents. The marker
|
||
is an inline hanging box: it fills the hanging area, and when too wide it pushes the body
|
||
text aside instead of overlapping it (Word behavior).
|
||
Logical (inline-start) geometry so RTL list items (direction:rtl via w:bidi)
|
||
mirror automatically: indent and marker land on the right side. */
|
||
.doc-li {
|
||
position: relative;
|
||
padding-inline-start: var(--li-left, var(--style-li-left, 0.55in));
|
||
margin: 0 0 4pt;
|
||
}
|
||
|
||
.doc-li.ilvl-1 {
|
||
padding-inline-start: var(--li-left, var(--style-li-left, 0.85in));
|
||
}
|
||
|
||
.doc-li.ilvl-2 {
|
||
padding-inline-start: var(--li-left, var(--style-li-left, 1.15in));
|
||
}
|
||
|
||
.doc-li.ilvl-3 {
|
||
padding-inline-start: var(--li-left, var(--style-li-left, 1.45in));
|
||
}
|
||
|
||
.doc-li.ilvl-4 {
|
||
padding-inline-start: var(--li-left, var(--style-li-left, 1.75in));
|
||
}
|
||
|
||
/* Word HTML auto spacing (sp-auto-*, 14pt inline margins) collapses to 0 between
|
||
two list items; !important beats the inline auto margin */
|
||
.doc-page .doc-li.sp-auto-a:has(+ .doc-li) {
|
||
margin-bottom: 0 !important;
|
||
}
|
||
|
||
.doc-page .doc-li + .doc-li.sp-auto-b {
|
||
margin-top: 0 !important;
|
||
}
|
||
|
||
/* auto space-before is also suppressed on the document's first paragraph (Word);
|
||
the page-1 float host is a zero-height widget that may precede the block */
|
||
.doc-page > .sp-auto-b:nth-child(1 of :not(.page-float-host)) {
|
||
margin-top: 0 !important;
|
||
}
|
||
|
||
/* Word zeroes auto spacing at a cell's first/last paragraph (probe 2026-09-03) */
|
||
.doc-table :is(td, th, .cell-clip, .cell-vert) > .sp-auto-b:nth-child(1 of :not(.doc-cell-boxes)) {
|
||
margin-top: 0 !important;
|
||
}
|
||
|
||
.doc-table
|
||
:is(td, th, .cell-clip, .cell-vert)
|
||
> .sp-auto-a:nth-last-child(1 of :not(.doc-cell-boxes)) {
|
||
margin-bottom: 0 !important;
|
||
}
|
||
|
||
/* direct w:contextualSpacing between unstyled (Normal) paragraphs, list items
|
||
(.doc-li) included: same-style suppression (styled pairs are handled per
|
||
style in doc-style-css.ts) */
|
||
.doc-page :is(p, .doc-li).ctx-sp:not([data-style]):has(+ :is(p, .doc-li):not([data-style])) {
|
||
margin-bottom: 0 !important;
|
||
}
|
||
|
||
.doc-page :is(p, .doc-li):not([data-style]) + :is(p, .doc-li).ctx-sp:not([data-style]) {
|
||
margin-top: 0 !important;
|
||
}
|
||
|
||
.doc-li::before {
|
||
display: inline-block;
|
||
/* --li-tab: measured marker escaped the hanging area; box widens to the next default tab stop.
|
||
--style-li-hang: style-level w:hanging fallback (doc-style-css.ts) */
|
||
min-width: var(--li-tab, var(--li-hang, var(--style-li-hang, 0.25in)));
|
||
margin-inline-start: calc(-1 * var(--li-hang, var(--style-li-hang, 0.25in)));
|
||
/* the marker box is a block container: an inherited first-line indent would
|
||
drag the glyphs out of the hanging area */
|
||
text-indent: 0;
|
||
/* glyphs lead the box whatever the paragraph alignment: Word's tab follows the marker */
|
||
text-align: start;
|
||
font-family: var(--li-marker-font, inherit);
|
||
font-size: calc(var(--li-marker-size, 1em) * var(--li-marker-scale, 1));
|
||
line-height: var(--li-marker-lh, inherit);
|
||
}
|
||
|
||
.doc-li-bullet::before {
|
||
content: '•';
|
||
}
|
||
|
||
.doc-li.ilvl-1.doc-li-bullet::before {
|
||
content: '◦';
|
||
}
|
||
|
||
.doc-li.ilvl-2.doc-li-bullet::before {
|
||
content: '▪';
|
||
}
|
||
|
||
.doc-page {
|
||
counter-reset: doc-ol;
|
||
}
|
||
|
||
.doc-li-ordered {
|
||
counter-increment: doc-ol;
|
||
}
|
||
|
||
.doc-li-ordered::before {
|
||
content: counter(doc-ol) '.';
|
||
}
|
||
|
||
/* restart numbering after any non-ordered block; counter-set (applied after
|
||
increment) mutates the page-scoped counter, while a sibling counter-reset
|
||
would nest a new instance and desync the numbers from the 2nd item on */
|
||
.doc-page > :not(.doc-li-ordered) + .doc-li-ordered {
|
||
counter-set: doc-ol 1;
|
||
}
|
||
|
||
/* real multilevel numbering: items defined in numbering.xml get data-marker computed by ListNumberingExtension,
|
||
overriding the bullet/CSS-counter fallbacks above (selector includes .doc-page for higher specificity and comes later) */
|
||
.doc-page .doc-li[data-marker] {
|
||
counter-increment: none;
|
||
}
|
||
|
||
.doc-page .doc-li[data-marker]::before {
|
||
content: attr(data-marker);
|
||
}
|
||
|
||
/* Word clips cell content at the cell's text area: a marker hanging left of it never shows
|
||
(ListNumberingExtension flags the item); the box still holds the text position */
|
||
.doc-page .doc-li[data-marker-clip]::before {
|
||
visibility: hidden;
|
||
}
|
||
|
||
/* w:suff space/nothing: the marker no longer fills the hanging area (no tab);
|
||
first-line text starts right after the marker (+ one space), wrapped lines keep the indent */
|
||
.doc-page .doc-li[data-suff]::before {
|
||
min-width: 0;
|
||
margin-inline-start: calc(-1 * var(--li-hang, var(--style-li-hang, 0)));
|
||
}
|
||
|
||
.doc-page .doc-li[data-suff='space'][data-marker]::before {
|
||
content: attr(data-marker) '\00a0';
|
||
}
|
||
|
||
/* protected blocks (table / image / chart / math ...) */
|
||
.doc-protected {
|
||
position: relative;
|
||
border: 1px dashed var(--border-strong);
|
||
border-radius: 3px;
|
||
padding: 10px 14px;
|
||
margin: 0 0 8pt;
|
||
background: var(--docs-paper-chip-bg);
|
||
cursor: grab;
|
||
user-select: none;
|
||
}
|
||
|
||
.doc-move-handle {
|
||
position: absolute;
|
||
z-index: 4;
|
||
top: -14px;
|
||
left: -14px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 18px;
|
||
height: 18px;
|
||
border: 1px solid var(--word-blue);
|
||
border-radius: 3px;
|
||
background: var(--docs-paper);
|
||
color: var(--word-blue);
|
||
font: 13px/1 sans-serif;
|
||
cursor: move;
|
||
user-select: none;
|
||
-webkit-user-select: none;
|
||
opacity: 0;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.doc-protected:hover > .doc-move-handle,
|
||
.ProseMirror-focused .doc-protected.ProseMirror-selectednode > .doc-move-handle {
|
||
opacity: 1;
|
||
pointer-events: auto;
|
||
}
|
||
|
||
/* Pictures drag directly from their body. Their left-side chrome is the
|
||
paragraph anchor marker below, not the generic protected-block move button. */
|
||
.doc-protected[data-doc-protected='image'] > .doc-move-handle {
|
||
display: none;
|
||
}
|
||
|
||
/* pictures drag-move from anywhere on their body (Word parity) */
|
||
.doc-protected[data-doc-protected='image'] .doc-img-wrap {
|
||
cursor: grab;
|
||
}
|
||
|
||
body.docs-crop-active .doc-protected[data-doc-protected='image'] .doc-img-wrap {
|
||
cursor: default;
|
||
}
|
||
|
||
/* Word-style inactive selection: while a ribbon combobox (font family/size)
|
||
holds keyboard focus the DOM selection lives in that input, so the editor's
|
||
native highlight vanishes — this decoration keeps the target text visibly
|
||
selected (gray, like Word's unfocused selection) until focus returns.
|
||
Translucent on purpose: it overlays run highlights/shading without hiding
|
||
them, which no opaque token can do (document canvas, not themed chrome). */
|
||
.doc-inactive-selection {
|
||
--doc-inactive-selection-bg: rgb(0 0 0 / 18%);
|
||
|
||
background-color: var(--doc-inactive-selection-bg);
|
||
}
|
||
|
||
/* corner resize handle of floating shape/textbox/WordArt/line boxes */
|
||
.box-resize-handle {
|
||
position: absolute;
|
||
z-index: 4;
|
||
right: -6px;
|
||
bottom: -6px;
|
||
width: 11px;
|
||
height: 11px;
|
||
border: 1px solid var(--word-blue);
|
||
border-radius: 2px;
|
||
background: var(--docs-paper);
|
||
cursor: nwse-resize;
|
||
opacity: 0;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.doc-protected-textboxes:hover > .box-resize-handle,
|
||
.ProseMirror-focused .doc-protected-textboxes.ProseMirror-selectednode > .box-resize-handle,
|
||
.doc-protected-chart:hover > .box-resize-handle,
|
||
.ProseMirror-focused .doc-protected-chart.ProseMirror-selectednode > .box-resize-handle {
|
||
opacity: 1;
|
||
pointer-events: auto;
|
||
}
|
||
|
||
.doc-content-editing > .box-resize-handle {
|
||
opacity: 0;
|
||
pointer-events: none;
|
||
}
|
||
|
||
/* Native ProseMirror tables */
|
||
.doc-page > .doc-table {
|
||
margin: 2px 0;
|
||
}
|
||
|
||
.doc-protected[data-doc-protected='table'] {
|
||
border-color: transparent;
|
||
background: transparent;
|
||
padding: 2px;
|
||
}
|
||
|
||
.doc-protected[data-doc-protected='table']:hover {
|
||
border-color: var(--border-strong);
|
||
}
|
||
|
||
.doc-table {
|
||
/* fallback when there are no absolute grid widths; tables with w:tblGrid are overridden by inline width.
|
||
font size/line spacing inherit the document defaults (.doc-page, i.e. the Normal style) */
|
||
width: 100%;
|
||
/* paper-width cap: over-wide tables may spill into the page margins like Word
|
||
(inline widths in extensions.ts/protected-render.ts grant up to this much);
|
||
--doc-content-w = per-block section content width (differing-width sections) */
|
||
max-width: calc(
|
||
var(--doc-content-w, 100%) + var(--doc-margin-left, var(--doc-margin-right, 0px)) +
|
||
var(--doc-margin-right, 0px)
|
||
);
|
||
border-collapse: collapse;
|
||
table-layout: fixed;
|
||
/* share of a vertical border the cell margin absorbs; spaced tables set 0 inline
|
||
(declared per table so nested tables do not inherit the parent's value) */
|
||
--doc-bw-share: 0.5;
|
||
/* share of a horizontal border's snap delta each adjacent row carries; spaced tables set 1 */
|
||
--doc-bd-share: 0.5;
|
||
/* row gridline advance: the table sets --doc-row-eat from insideH and spaced tables
|
||
set --doc-row-grid 0 inline; reset here so nested tables do not inherit them */
|
||
--doc-row-eat: 0px;
|
||
--doc-row-grid: 1;
|
||
}
|
||
|
||
.doc-table.doc-table-autofit-contents,
|
||
.doc-table.doc-table-autofit-window {
|
||
table-layout: auto;
|
||
}
|
||
|
||
.doc-table.doc-table-autofit-contents {
|
||
max-width: 100%;
|
||
}
|
||
|
||
.doc-table td,
|
||
.doc-table th {
|
||
/* not positioned: a positioned cell's fill paints over the inner half of the collapsed borders */
|
||
box-sizing: border-box;
|
||
/* the w:docGrid line grid applies to the body flow only, UNLESS settings.xml
|
||
w:compat carries w:adjustLineHeightInTable — then docStyleCss restores the
|
||
pitch in cells and they snap like body lines (Word probe 2026-09-02) */
|
||
--doc-grid-pitch: 0.0001px;
|
||
}
|
||
|
||
/* empty paragraph in a cell: LO sizes it near the Latin single line, so it must
|
||
not out-grow the row's content cells via the inherited CJK factor */
|
||
.doc-table td .doc-p-empty,
|
||
.doc-table th .doc-p-empty {
|
||
--doc-line-factor: var(--doc-line-factor-latin, 1.2);
|
||
}
|
||
|
||
/* Word ignores page-type w:br inside table cells; a visible line break here
|
||
inflates every cell that carries one (HWP-exported TOC/decor tables) */
|
||
.doc-table td .doc-page-br,
|
||
.doc-table th .doc-page-br {
|
||
display: none;
|
||
}
|
||
|
||
.doc-table td,
|
||
.doc-table th {
|
||
/* undeclared borders render as none (Word's on-screen gridlines are non-printing
|
||
view furniture, not part of the document); w:tblBorders drives --doc-b-* */
|
||
border-top: var(--doc-b-h, none);
|
||
border-bottom: var(--doc-b-h, none);
|
||
border-left: var(--doc-b-v, none);
|
||
border-right: var(--doc-b-v, none);
|
||
/* Word default cell margins: 108 twips sides / 0 top-bottom (--doc-cell-pad-* overrides);
|
||
text inset = max(margin, border/2), so the margin absorbs the half border (probe 2026-09-03) */
|
||
--cell-bw-l: var(--doc-bw-v, 0px);
|
||
--cell-bw-r: var(--doc-bw-v, 0px);
|
||
--cell-bd-t: var(--doc-bd-h, 0px);
|
||
--cell-bd-b: var(--doc-bd-h, 0px);
|
||
padding: var(--doc-cell-pad-t, 0px)
|
||
max(0px, calc(var(--doc-cell-pad-r, 7.2px) - var(--cell-bw-r) * var(--doc-bw-share, 0.5)))
|
||
var(--doc-cell-pad-b, 0px)
|
||
max(0px, calc(var(--doc-cell-pad-l, 7.2px) - var(--cell-bw-l) * var(--doc-bw-share, 0.5)));
|
||
vertical-align: top;
|
||
/* Word breaks a token wider than the cell character-by-character rather
|
||
than letting it overflow (unless w:noWrap, which we don't model yet) */
|
||
overflow-wrap: break-word;
|
||
}
|
||
|
||
/* Word sizes rows with the true border width (0.5pt = 0.667px) while we draw whole
|
||
px (Chromium snaps sub-px borders anyway); this spacer hands the difference back
|
||
so a 40-row table ends where Word's does (--cell-bd-* = true - drawn). A positive
|
||
delta must be height, not margin: a margin would collapse into the first
|
||
paragraph's space-before and vanish */
|
||
.doc-table td::before,
|
||
.doc-table th::before {
|
||
content: '';
|
||
display: block;
|
||
--cell-bd-sum: calc((var(--cell-bd-t) + var(--cell-bd-b)) * var(--doc-bd-share, 0.5));
|
||
height: max(0px, var(--cell-bd-sum));
|
||
margin-bottom: min(0px, var(--cell-bd-sum));
|
||
}
|
||
.doc-table .page-gap-table > td::before {
|
||
content: none;
|
||
}
|
||
|
||
/* repeated header rows after a table page break (w:tblHeader): pure decoration —
|
||
not selectable, not editable, invisible to hit-testing. display beats the
|
||
.page-gap-inline inline-block (that class only marks them as measurement gaps). */
|
||
.doc-table tr.page-repeat-header {
|
||
display: table-row;
|
||
user-select: none;
|
||
pointer-events: none;
|
||
}
|
||
|
||
/* outer edges: table-level outer borders beat the inside-line variables even when the
|
||
frame is explicitly none (border-collapse would otherwise let inside lines win) */
|
||
.doc-table tr:first-child > td,
|
||
.doc-table tr:first-child > th {
|
||
border-top: var(--doc-b-t, var(--doc-b-h, none));
|
||
--cell-bd-t: var(--doc-bd-t, var(--doc-bd-h, 0px));
|
||
}
|
||
.doc-table tr:last-child > td,
|
||
.doc-table tr:last-child > th {
|
||
border-bottom: var(--doc-b-b, var(--doc-b-h, none));
|
||
--cell-bd-b: var(--doc-bd-b, var(--doc-bd-h, 0px));
|
||
}
|
||
.doc-table td:first-child,
|
||
.doc-table th:first-child {
|
||
border-left: var(--doc-b-l, var(--doc-b-v, none));
|
||
--cell-bw-l: var(--doc-bw-l, var(--doc-bw-v, 0px));
|
||
}
|
||
.doc-table td:last-child,
|
||
.doc-table th:last-child {
|
||
border-right: var(--doc-b-r, var(--doc-b-v, none));
|
||
--cell-bw-r: var(--doc-bw-r, var(--doc-bw-v, 0px));
|
||
}
|
||
|
||
/* header cells follow the document model (cell bold/align attrs), not the UA defaults */
|
||
.doc-table th {
|
||
font-weight: inherit;
|
||
text-align: inherit;
|
||
}
|
||
|
||
.doc-table .selectedCell {
|
||
position: relative;
|
||
}
|
||
|
||
.doc-table .selectedCell::after {
|
||
position: absolute;
|
||
inset: 0;
|
||
content: '';
|
||
pointer-events: none;
|
||
background: color-mix(in srgb, var(--word-blue) 18%, transparent);
|
||
}
|
||
|
||
.doc-page.resize-cursor {
|
||
cursor: col-resize;
|
||
}
|
||
|
||
/* the handle is an absolute child of its cell; cells are positioned only while a
|
||
handle is live (prosemirror-tables sets resize-cursor), never in the export clone */
|
||
.resize-cursor .doc-table td,
|
||
.resize-cursor .doc-table th {
|
||
position: relative;
|
||
}
|
||
|
||
.column-resize-handle {
|
||
position: absolute;
|
||
top: 0;
|
||
right: -2px;
|
||
bottom: -2px;
|
||
width: 4px;
|
||
pointer-events: none;
|
||
background: var(--word-blue);
|
||
}
|
||
|
||
.table-ribbon-body {
|
||
display: flex;
|
||
align-items: stretch;
|
||
/* keep the row at content width: shrinking it (the old min-width: 0) let
|
||
the groups squeeze and paint over each other instead of overflowing
|
||
.ribbon-body into its horizontal scroll */
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.table-tool-group {
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: center;
|
||
flex-shrink: 0;
|
||
min-width: 66px;
|
||
padding: 2px 6px;
|
||
}
|
||
|
||
.table-tool-row,
|
||
.table-tool-grid {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 3px;
|
||
flex: 1;
|
||
}
|
||
|
||
.table-tool-grid {
|
||
display: grid;
|
||
}
|
||
|
||
.table-tool-grid-four {
|
||
grid-template-columns: repeat(2, minmax(66px, auto));
|
||
}
|
||
|
||
.table-tool-grid-two {
|
||
grid-template-columns: repeat(2, minmax(58px, auto));
|
||
}
|
||
|
||
.table-tool-grid-three {
|
||
grid-template-columns: repeat(3, minmax(94px, auto));
|
||
}
|
||
|
||
.table-tool-group button {
|
||
min-height: 26px;
|
||
padding: 3px 8px;
|
||
border: 1px solid transparent;
|
||
border-radius: 3px;
|
||
background: transparent;
|
||
color: var(--text);
|
||
font-size: 11px;
|
||
white-space: nowrap;
|
||
cursor: pointer;
|
||
}
|
||
|
||
/* icon + label buttons (insert/delete/merge/align/borders) */
|
||
.table-tool-row > button,
|
||
.table-tool-grid > button,
|
||
.table-tool-delete > .table-tool-button {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
gap: 5px;
|
||
}
|
||
|
||
.table-tool-row > button svg,
|
||
.table-tool-grid > button svg,
|
||
.table-tool-delete > .table-tool-button svg {
|
||
flex: none;
|
||
opacity: 0.9;
|
||
}
|
||
|
||
.table-tool-delete > .table-tool-button {
|
||
justify-content: center;
|
||
}
|
||
|
||
.table-tool-group button:hover:not(:disabled) {
|
||
border-color: var(--border);
|
||
background: var(--hover);
|
||
}
|
||
|
||
.table-tool-group button:disabled {
|
||
opacity: 0.35;
|
||
cursor: default;
|
||
}
|
||
|
||
.table-tool-group button.danger {
|
||
color: var(--danger);
|
||
}
|
||
|
||
.table-tool-delete {
|
||
min-width: 72px;
|
||
}
|
||
|
||
.table-style-swatches {
|
||
display: grid;
|
||
/* square swatches with breathing room (matches the slides shape-style grid) */
|
||
grid-template-columns: repeat(6, 24px);
|
||
gap: 5px;
|
||
align-content: center;
|
||
flex: 1;
|
||
}
|
||
|
||
.table-tool-group .table-style-swatch {
|
||
box-sizing: border-box;
|
||
width: 24px;
|
||
height: 24px;
|
||
min-width: 24px;
|
||
min-height: 24px;
|
||
padding: 0;
|
||
border-color: var(--docs-swatch-border);
|
||
}
|
||
|
||
.table-tool-group .table-style-clear {
|
||
grid-column: span 2;
|
||
min-height: 22px;
|
||
padding: 1px 5px;
|
||
}
|
||
|
||
.table-style-options {
|
||
display: grid;
|
||
grid-template-columns: repeat(3, minmax(82px, auto));
|
||
gap: 2px;
|
||
align-content: center;
|
||
flex: 1;
|
||
}
|
||
|
||
.table-style-options button {
|
||
min-height: 22px;
|
||
padding: 1px 5px;
|
||
text-align: left;
|
||
}
|
||
|
||
.table-option-toggle {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
gap: 5px;
|
||
}
|
||
|
||
.table-option-toggle > span:last-child {
|
||
min-width: 0;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.table-option-check {
|
||
position: relative;
|
||
box-sizing: border-box;
|
||
flex: 0 0 13px;
|
||
width: 13px;
|
||
height: 13px;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 4px;
|
||
background: var(--surface);
|
||
}
|
||
|
||
.table-option-toggle.active .table-option-check {
|
||
border-color: var(--accent);
|
||
background: var(--accent);
|
||
}
|
||
|
||
.table-option-toggle.active .table-option-check::after {
|
||
position: absolute;
|
||
left: 3px;
|
||
top: 0;
|
||
width: 3px;
|
||
height: 7px;
|
||
border: solid var(--docs-on-accent);
|
||
border-width: 0 1.5px 1.5px 0;
|
||
content: '';
|
||
transform: rotate(45deg);
|
||
}
|
||
|
||
.table-tool-autofit {
|
||
min-width: 158px;
|
||
}
|
||
|
||
.table-autofit-wrap {
|
||
width: 100%;
|
||
}
|
||
|
||
.table-tool-group .table-command-button {
|
||
display: grid;
|
||
grid-template-columns: 20px minmax(0, 1fr) 12px;
|
||
align-items: center;
|
||
width: 100%;
|
||
min-height: 52px;
|
||
padding: 5px 7px;
|
||
gap: 6px;
|
||
border-color: var(--border);
|
||
background: var(--surface);
|
||
}
|
||
|
||
.table-command-button:hover:not(:disabled),
|
||
.table-command-button.active {
|
||
border-color: var(--border-strong);
|
||
background: var(--hover);
|
||
}
|
||
|
||
.table-command-copy {
|
||
display: flex;
|
||
min-width: 0;
|
||
flex-direction: column;
|
||
align-items: flex-start;
|
||
gap: 1px;
|
||
text-align: left;
|
||
}
|
||
|
||
.table-command-copy > span,
|
||
.table-command-copy > small {
|
||
display: block;
|
||
max-width: 100%;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.table-command-copy > small {
|
||
color: var(--text-dim);
|
||
font-size: 10px;
|
||
}
|
||
|
||
.table-autofit-menu {
|
||
width: 238px;
|
||
padding: 6px;
|
||
}
|
||
|
||
.layout-menu.table-autofit-menu button {
|
||
display: grid;
|
||
grid-template-columns: 22px minmax(0, 1fr) 12px;
|
||
min-height: 36px;
|
||
padding: 6px 8px;
|
||
align-items: center;
|
||
gap: 7px;
|
||
border-radius: 6px;
|
||
text-align: left;
|
||
}
|
||
|
||
.layout-menu.table-autofit-menu button > span {
|
||
color: var(--text);
|
||
font-size: 12px;
|
||
}
|
||
|
||
.table-menu-state {
|
||
width: 7px;
|
||
height: 7px;
|
||
justify-self: center;
|
||
border-radius: 50%;
|
||
background: transparent;
|
||
}
|
||
|
||
.table-autofit-menu button.active .table-menu-state {
|
||
background: var(--accent);
|
||
}
|
||
|
||
.table-tool-advanced {
|
||
min-width: 146px;
|
||
}
|
||
|
||
.table-tool-stack {
|
||
display: grid;
|
||
grid-template-rows: repeat(2, minmax(25px, 1fr));
|
||
gap: 2px;
|
||
flex: 1;
|
||
}
|
||
|
||
.table-tool-group .table-command-row {
|
||
display: grid;
|
||
grid-template-columns: 18px minmax(0, 1fr);
|
||
min-height: 25px;
|
||
padding: 2px 7px;
|
||
align-items: center;
|
||
gap: 6px;
|
||
text-align: left;
|
||
}
|
||
|
||
.table-command-row > span {
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
/* anchored textboxes (code boxes, callout cards): render the box itself,
|
||
text edits happen in place */
|
||
.doc-protected-textboxes {
|
||
border-color: transparent;
|
||
background: transparent;
|
||
/* Word gives inline drawings no intrinsic spacing: chip chrome (8pt margin +
|
||
vertical padding) inflated flow height and pushed following blocks to the
|
||
next page (floating boxes already zero it out) */
|
||
padding: 0;
|
||
margin: 0;
|
||
cursor: default;
|
||
width: fit-content;
|
||
max-width: 100%;
|
||
}
|
||
|
||
.doc-protected-textboxes:hover {
|
||
border-color: var(--border);
|
||
}
|
||
|
||
/* side-wrapped box: the wrapper spans the column so the float's edge margin
|
||
lands on the column edge; the float is not contained, so following
|
||
paragraphs wrap beside the box too (Word) */
|
||
.doc-protected-textboxes.doc-protected-wrapside {
|
||
width: 100%;
|
||
}
|
||
|
||
/* inline shapes (WordArt) follow their paragraph's justification like Word */
|
||
.doc-protected-textboxes.doc-protected-boxes-center {
|
||
margin-left: auto;
|
||
margin-right: auto;
|
||
}
|
||
|
||
.doc-protected-textboxes.doc-protected-boxes-right {
|
||
margin-left: auto;
|
||
}
|
||
|
||
/* floating drawings (wrapNone/front/behind anchors, or several drawings
|
||
anchored in one paragraph): the wrapper marks the anchor paragraph's flow
|
||
position but takes no flow height — each box positions absolutely at its
|
||
own offset, overlapping body text exactly like Word */
|
||
/* canvas-only page-gap compensation for floating boxes (syncFloatShifts);
|
||
the pagination preview clones per-page flow with no gaps, so it neutralizes it */
|
||
.doc-protected-floating > .doc-textbox {
|
||
translate: 0 var(--page-float-dy, 0px);
|
||
}
|
||
.pv-clip .doc-protected-floating > .doc-textbox {
|
||
translate: none;
|
||
}
|
||
|
||
.doc-protected.doc-protected-floating {
|
||
position: relative;
|
||
height: 0;
|
||
min-height: 0;
|
||
padding: 0;
|
||
margin: 0;
|
||
border: none;
|
||
width: 100%;
|
||
max-width: 100%;
|
||
}
|
||
|
||
/* behindDoc anchors: under the body text like Word (positioned boxes would
|
||
otherwise paint above every later in-flow paragraph); on the boxes too so
|
||
it also holds when the pagepinned wrapper is un-positioned */
|
||
.doc-protected.doc-protected-floating.doc-protected-behind {
|
||
z-index: -1;
|
||
overflow: visible;
|
||
}
|
||
|
||
.doc-protected.doc-protected-behind .doc-textbox {
|
||
z-index: -1;
|
||
}
|
||
|
||
/* page-pinned cover art: the un-positioned wrapper lets the boxes' absolute
|
||
page coordinates resolve against the page box itself */
|
||
.doc-protected.doc-protected-floating.doc-protected-pagepinned {
|
||
position: static;
|
||
}
|
||
|
||
.doc-protected-pagepinned > .doc-move-handle {
|
||
display: none;
|
||
}
|
||
|
||
/* wrapNone / behind-text anchored images: same zero-flow-height semantics */
|
||
.doc-protected.doc-img-float {
|
||
position: relative;
|
||
height: 0;
|
||
min-height: 0;
|
||
padding: 0;
|
||
margin: 0;
|
||
border: none;
|
||
width: 100%;
|
||
max-width: 100%;
|
||
overflow: visible;
|
||
}
|
||
|
||
/* banded side wrap: the wrapper keeps the picture's band as flow height (inline
|
||
min-height) while the picture itself positions at its anchor offset */
|
||
.doc-protected.doc-img-float.img-wrap-band {
|
||
height: auto;
|
||
}
|
||
|
||
.doc-img-float > .doc-img-wrap {
|
||
translate: 0 var(--page-float-dy, 0px);
|
||
}
|
||
|
||
/* cell-anchored boxes share the float display-shift channel (paper-top clamp) */
|
||
.doc-cell-boxes > .doc-textbox,
|
||
.doc-cell-boxes > div {
|
||
translate: 0 var(--page-float-dy, 0px);
|
||
}
|
||
.pv-clip .doc-cell-boxes > .doc-textbox,
|
||
.pv-clip .doc-cell-boxes > div {
|
||
translate: none;
|
||
}
|
||
|
||
.pv-clip .doc-img-float > .doc-img-wrap {
|
||
translate: none;
|
||
}
|
||
|
||
/* anchor-paragraph text next to all-floating boxes keeps its flow line:
|
||
the wrapper takes the stray line's height instead of collapsing */
|
||
.doc-protected.doc-protected-floating.doc-protected-floating-stray {
|
||
height: auto;
|
||
}
|
||
|
||
/* preview: an anchor-shifted box reaching above its page top rides --pv-anchor-lift
|
||
(stamped before cloning) back onto the anchor's page */
|
||
.pv-clip [data-anchor-dy] > .doc-textbox {
|
||
translate: 0 var(--pv-anchor-lift, 0px);
|
||
}
|
||
|
||
/* preview: wrappers whose boxes are all page-relative V (data-pv-pagerel,
|
||
stamped before cloning) un-position like pinned covers so the boxes escape
|
||
the pv-clip (sized to the page's flow content) and resolve against the page
|
||
box. Their inline offsets are content-area coordinates: the page margins
|
||
(--pv-ml/--pv-mt, set per pv-page) shift them back onto the page. */
|
||
.pv-page [data-pv-pagerel='1'] {
|
||
position: static;
|
||
}
|
||
.pv-page [data-pv-pagerel='1'] > .doc-textbox[data-page-rel-v='1'],
|
||
.pv-page [data-pv-pagerel='1'] > .doc-img-wrap[data-page-rel-v='1'] {
|
||
translate: var(--pv-ml, 0px) var(--pv-mt, 0px);
|
||
}
|
||
/* page-edge V anchors keep their page Y under a header push; margin ones ride the body top (Word) */
|
||
.pv-page [data-pv-pagerel='1'] > .doc-textbox[data-page-rel-from='page'],
|
||
.pv-page [data-pv-pagerel='1'] > .doc-img-wrap[data-page-rel-from='page'] {
|
||
translate: var(--pv-ml, 0px) var(--pv-mt-page, var(--pv-mt, 0px));
|
||
}
|
||
|
||
/* preview: wrappers whose boxes spill past the page's flow window (data-pv-hoist,
|
||
stamped before cloning — cover flows ending in an early page break, page-bottom
|
||
overhang) un-position the same way so the boxes escape the pv-clip (which cut
|
||
them at the flow end while the next page's window repainted the spilled part),
|
||
and re-pin to the page box: --pv-hoist-dy is the anchor's content-area Y. */
|
||
.pv-page [data-pv-hoist='1'] {
|
||
position: static;
|
||
}
|
||
.pv-page [data-pv-hoist='1'] > .doc-textbox,
|
||
.pv-page [data-pv-hoist='1'] > .doc-img-wrap {
|
||
translate: var(--pv-ml, 0px) calc(var(--pv-mt, 0px) + var(--pv-hoist-dy, 0px));
|
||
}
|
||
|
||
.ProseMirror-focused .doc-protected.doc-protected-textboxes.ProseMirror-selectednode {
|
||
border-color: var(--word-blue);
|
||
outline: none;
|
||
background: transparent;
|
||
}
|
||
|
||
.doc-textbox {
|
||
/* no reserved edge: Word's text rectangle is the shape rect minus insets */
|
||
border: 0 solid transparent;
|
||
border-radius: 3px;
|
||
padding: 5px 10px;
|
||
margin: 2px 0;
|
||
max-width: 100%;
|
||
cursor: text;
|
||
user-select: text;
|
||
-webkit-user-select: text;
|
||
/* fixed-height boxes (noAutofit) clip overflow instead of growing */
|
||
overflow: hidden;
|
||
}
|
||
|
||
.doc-protected-textboxes:not(.doc-content-editing) .doc-textbox,
|
||
.doc-protected[data-doc-protected='table']:not(.doc-content-editing) td {
|
||
cursor: move;
|
||
user-select: none;
|
||
-webkit-user-select: none;
|
||
}
|
||
|
||
.doc-content-editing > .doc-move-handle {
|
||
opacity: 0;
|
||
pointer-events: none;
|
||
}
|
||
|
||
/* the nested tiptap editor inside each box */
|
||
.doc-textbox .doc-textbox-editor {
|
||
outline: none;
|
||
white-space: pre-wrap;
|
||
}
|
||
|
||
.doc-textbox-editor p {
|
||
margin: 0;
|
||
}
|
||
|
||
/* Word gives empty w:p elements no line box; only their explicit w:spacing
|
||
contributes height. Keeping browser-default <br> line boxes made fixed
|
||
textboxes clip valid content far above their actual bottom edge. */
|
||
.doc-textbox-editor p:has(> br.ProseMirror-trailingBreak:only-child),
|
||
.doc-textbox-para-empty {
|
||
height: 0;
|
||
min-height: 0;
|
||
line-height: 0;
|
||
}
|
||
|
||
.doc-textbox:focus-within {
|
||
outline: 2px solid var(--word-blue);
|
||
outline-offset: 1px;
|
||
}
|
||
|
||
.doc-textbox-para {
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
}
|
||
|
||
/* numbering inside a textbox: marker resolved at parse time (data-marker), same hanging
|
||
box geometry as .doc-li (margin-inline-start carries the text indent; --li-tab widens
|
||
the box to the default tab stop when the level declares no hanging area) */
|
||
.doc-textbox-para[data-marker]::before {
|
||
content: attr(data-marker);
|
||
display: inline-block;
|
||
min-width: var(--li-tab, var(--li-hang, 0));
|
||
margin-inline-start: calc(-1 * var(--li-hang, 0));
|
||
text-indent: 0;
|
||
font-family: var(--li-marker-font, inherit);
|
||
font-size: calc(var(--li-marker-size, 1em) * var(--li-marker-scale, 1));
|
||
line-height: var(--li-marker-lh, inherit);
|
||
}
|
||
|
||
/* numbered anchor paragraph (Word keeps it in the list): its stray line runs on the
|
||
.doc-li geometry; ListNumberingExtension decorates the protected wrapper with
|
||
--li-marker since attr() cannot read an ancestor */
|
||
.doc-page .doc-li-stray {
|
||
padding-inline-start: var(--li-left, var(--style-li-left, 0));
|
||
}
|
||
|
||
.doc-page [data-stray-marker] .doc-li-stray::before {
|
||
content: var(--li-marker);
|
||
display: inline-block;
|
||
min-width: var(--li-tab, var(--li-hang, var(--style-li-hang, 0)));
|
||
margin-inline-start: calc(-1 * var(--li-hang, var(--style-li-hang, 0)));
|
||
text-indent: 0;
|
||
font-family: var(--li-marker-font, inherit);
|
||
font-size: calc(var(--li-marker-size, 1em) * var(--li-marker-scale, 1));
|
||
line-height: var(--li-marker-lh, inherit);
|
||
}
|
||
|
||
/* the wrapper carries the same flags as a .doc-li: clipped-in-cell, w:suff space/nothing */
|
||
.doc-page [data-stray-marker][data-marker-clip] .doc-li-stray::before {
|
||
visibility: hidden;
|
||
}
|
||
|
||
.doc-page [data-stray-marker][data-suff] .doc-li-stray::before {
|
||
min-width: 0;
|
||
margin-inline-start: calc(-1 * var(--li-hang, var(--style-li-hang, 0)));
|
||
}
|
||
|
||
.doc-page [data-stray-marker][data-suff='space'] .doc-li-stray::before {
|
||
content: var(--li-marker) '\00a0';
|
||
}
|
||
|
||
/* inline pictures in table cells (document content, theme-independent) */
|
||
.doc-inline-img {
|
||
max-width: 100%;
|
||
}
|
||
|
||
/* floating (wp:anchor) run pictures: zero-size marker at the run, the picture
|
||
overlays without consuming flow space. The hosting paragraph is the
|
||
positioning origin — wp:posOffset measures from the column / paragraph top
|
||
(Word anchors the drawing run at the paragraph end, so a run-based origin
|
||
would push the picture off the page) */
|
||
.doc-inline-img-anchor {
|
||
display: inline;
|
||
}
|
||
|
||
/* set by the lineFactorLive decoration pass; a stylesheet :has() here OOMed
|
||
Blink's invalidation on long picture-heavy documents */
|
||
.doc-page .doc-anchor-origin {
|
||
position: relative;
|
||
}
|
||
|
||
/* CJK stretch of a mixed-script paragraph (lineFactorLive): the strut sits at
|
||
the Latin base and the stretch re-resolves the auto line rule with its own
|
||
factor, so only the lines it lands on lift (Word sizes each line by the faces
|
||
on it). Typed-grid, fixed-line and per-style rules from docStyleCss override. */
|
||
.doc-page .doc-run-lf {
|
||
line-height: var(
|
||
--doc-line-max,
|
||
calc(var(--doc-line-factor, 1.2) * 1em * var(--doc-line-mult, 1))
|
||
);
|
||
}
|
||
|
||
.doc-inline-img--behind {
|
||
opacity: 0.45;
|
||
}
|
||
|
||
/* square/tight/through wrap: real CSS float so same-paragraph text wraps */
|
||
.doc-inline-img--wrap-square-left,
|
||
.doc-inline-img--wrap-tight-left,
|
||
.doc-inline-img--wrap-through-left {
|
||
float: left;
|
||
margin: 0 12px 0 0;
|
||
}
|
||
|
||
.doc-inline-img--wrap-square-right,
|
||
.doc-inline-img--wrap-tight-right,
|
||
.doc-inline-img--wrap-through-right {
|
||
float: right;
|
||
margin: 0 0 0 12px;
|
||
}
|
||
|
||
.doc-inline-img--wrap-topBottom {
|
||
display: block;
|
||
margin: 2px auto;
|
||
}
|
||
|
||
/* invisible drawing paragraph: Word still lays out its (empty) line */
|
||
.doc-protected.doc-protected-anchor-line {
|
||
border: none;
|
||
border-radius: 0;
|
||
padding: 0;
|
||
margin: 0;
|
||
background: none;
|
||
pointer-events: none;
|
||
user-select: none;
|
||
}
|
||
|
||
/* body-level invisible markers (stray bookmarkEnd…): occupy no space at all */
|
||
.doc-protected-invisible {
|
||
height: 0;
|
||
overflow: hidden;
|
||
border: none;
|
||
padding: 0;
|
||
margin: 0;
|
||
pointer-events: none;
|
||
user-select: none;
|
||
}
|
||
|
||
/* empty section-break paragraphs: zero flow height like Word's absorbed section
|
||
mark (a 26px strip shifted every page below it); the label is an absolute
|
||
overlay (transparent until the node is selected), so it never takes flow space */
|
||
.doc-protected-sectbreak {
|
||
border-color: transparent;
|
||
background: transparent;
|
||
padding: 0;
|
||
border-width: 0;
|
||
margin: 0;
|
||
height: 0;
|
||
min-height: 0;
|
||
position: relative;
|
||
overflow: visible;
|
||
}
|
||
|
||
.doc-protected-sectbreak .doc-sectbreak-label {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.doc-protected-sectbreak:hover {
|
||
border-color: var(--border-strong);
|
||
}
|
||
|
||
.doc-sectbreak-label {
|
||
display: block;
|
||
font-size: 10px;
|
||
color: transparent;
|
||
line-height: 1.2;
|
||
user-select: none;
|
||
}
|
||
|
||
.doc-protected-sectbreak:hover .doc-sectbreak-label,
|
||
.ProseMirror-focused .doc-protected-sectbreak.ProseMirror-selectednode .doc-sectbreak-label {
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
/* decorative rule drawings (heading underlines, dividers): a plain line */
|
||
.doc-protected-rule {
|
||
border-color: transparent;
|
||
background: transparent;
|
||
padding: 4px 0;
|
||
line-height: 0;
|
||
}
|
||
|
||
.doc-protected-rule:hover {
|
||
border-color: var(--border-strong);
|
||
}
|
||
|
||
/* inline-level at full width: a line shortened by a float cannot hold it, so
|
||
the rule drops below the float like Word's full-width rule picture */
|
||
.doc-rule-line {
|
||
display: inline-block;
|
||
vertical-align: top;
|
||
width: 100%;
|
||
height: 1px;
|
||
background: var(--docs-paper-ink-dim);
|
||
}
|
||
|
||
/* VML horizontal rule, alone in its paragraph or sharing it with text: Word puts
|
||
the shape on a line of its own and sits it on that line's baseline; that line is
|
||
one single line of the rule run's own font (the document base size unless the
|
||
run declares w:sz inline), not the paragraph's tallest-run strut. The text-less
|
||
rule run measures with the ascii face, so the Latin factor applies even in a
|
||
CJK document (KR sample: 11pt Google Sans body -> 1.17 line, not Malgun's 1.74).
|
||
A block box (not an inline-block) so a floating picture beside the paragraph
|
||
cannot push the rule below itself */
|
||
.doc-inline-rule {
|
||
display: block;
|
||
font-size: var(--doc-base-fs, 11pt);
|
||
line-height: calc(
|
||
var(--doc-line-factor-latin, var(--doc-line-factor, 1.2)) * var(--doc-line-mult, 1) * 1em
|
||
);
|
||
box-sizing: content-box;
|
||
height: var(--doc-rule-h, 1px);
|
||
/* padding, not margins: a leading/trailing rule's margin would collapse into
|
||
the paragraph's own and lose part of the line */
|
||
padding-top: calc(1lh - 0.22em - var(--doc-rule-h, 1px));
|
||
padding-bottom: 0.22em;
|
||
background: var(--doc-rule-color, var(--docs-paper-ink-dim));
|
||
background-clip: content-box;
|
||
}
|
||
|
||
/* a rule opening a paragraph that goes on with text gets no text line of its own:
|
||
Word sets the rule ~5.5pt below the paragraph top and starts the first text line
|
||
right under it (probe 2026-09-05: 9.4px for a 1.5pt rule, 11.4px for 3pt, at any
|
||
rule-run or text size and any auto line spacing; a rule alone or after text keeps
|
||
the full line) */
|
||
.doc-inline-rule[data-lead-rule] {
|
||
padding-top: 5.5pt;
|
||
padding-bottom: 0;
|
||
}
|
||
|
||
/* exact / atLeast paragraphs fix every line, the rule line included; typed-grid
|
||
documents already snap the rule through the generic span rule (doc-style-css) */
|
||
.doc-lh-fixed > .doc-inline-rule {
|
||
line-height: inherit;
|
||
}
|
||
|
||
.doc-lh-fixed > .doc-inline-rule[data-lead-rule] {
|
||
padding-top: calc(1lh - 0.22em - var(--doc-rule-h, 1px));
|
||
padding-bottom: 0.22em;
|
||
}
|
||
|
||
/* ProseMirror's trailing separator/break after a final leaf node would open an
|
||
extra empty line under the block rule (prosemirror.css forces the separator
|
||
inline with !important) */
|
||
.doc-inline-rule + .ProseMirror-separator,
|
||
.doc-inline-rule + .ProseMirror-separator + .ProseMirror-trailingBreak {
|
||
display: none !important;
|
||
}
|
||
|
||
/* a column break ending a paragraph is one line in Word (the mark opens the
|
||
next column); the trailing-break phantom after it would add a second */
|
||
.doc-page br.doc-col-br + br.ProseMirror-trailingBreak {
|
||
display: none;
|
||
}
|
||
|
||
/* the same break inside a run-mark span (a w:br run carrying rPr): the sibling
|
||
combinator cannot reach the phantom, so the break's own line goes instead
|
||
and the phantom supplies the single line */
|
||
.doc-page span:last-of-type > br.doc-col-br:last-child {
|
||
display: none;
|
||
}
|
||
|
||
/* broken pictures: empty frame placeholder (frame/text colors are inline —
|
||
they substitute document content and must not follow the theme) */
|
||
.doc-protected-broken-img {
|
||
border-color: transparent;
|
||
background: transparent;
|
||
padding: 0;
|
||
}
|
||
|
||
.doc-protected-broken-img:hover {
|
||
border-color: var(--border-strong);
|
||
}
|
||
|
||
.doc-broken-img-frame {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
box-sizing: border-box;
|
||
max-width: 100%;
|
||
min-height: 24px;
|
||
padding: 2px 8px;
|
||
overflow: hidden;
|
||
font-size: 12px;
|
||
line-height: 1.3;
|
||
text-align: center;
|
||
user-select: none;
|
||
}
|
||
|
||
/* field paragraphs whose visible result is rendered directly (TOC lines, page
|
||
fields...): no chip frame, dashed outline only on hover */
|
||
.doc-protected-field {
|
||
/* outline, not border: the chip border's 1px top/bottom would add 2px to
|
||
every field row (a 40-line TOC gains ~4 lines and drifts a page) */
|
||
border: none;
|
||
outline: 1px dashed transparent;
|
||
outline-offset: -1px;
|
||
background: transparent;
|
||
/* no vertical padding/margin: field paragraphs (TOC entries, filled text
|
||
fields) must occupy paragraph-height boxes or pagination drifts; document
|
||
CSS (docStyleCss blockSel + [data-style]) supplies the real spacing */
|
||
padding: 0 4px;
|
||
margin: 0;
|
||
cursor: default;
|
||
user-select: none;
|
||
-webkit-user-select: none;
|
||
}
|
||
|
||
.doc-protected-field:hover {
|
||
outline-color: var(--border-strong);
|
||
}
|
||
|
||
/* text-field paragraphs are body text in Word: no chip inset (the 4px shifted
|
||
citation paragraphs off the column edge and shortened every line) */
|
||
.doc-protected-field.doc-protected-field-text {
|
||
padding: 0;
|
||
}
|
||
|
||
.doc-toc-line {
|
||
display: flex;
|
||
align-items: baseline;
|
||
gap: 4px;
|
||
/* inherit the document's paragraph metrics: a hardcoded 11pt/1.7 line made
|
||
every TOC entry ~50% taller than Word/LO and drifted long TOCs a page+ */
|
||
font-size: inherit;
|
||
line-height: inherit;
|
||
/* the entry's hanging indent would shift every blockified cell's first line
|
||
left, overprinting the neighbor cell; the flex row indents via padding */
|
||
text-indent: 0;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.doc-toc-line:hover .doc-toc-title {
|
||
color: var(--accent);
|
||
text-decoration: underline;
|
||
}
|
||
|
||
/* level indent applies to the first cell (the numbering marker when present, the title otherwise) */
|
||
.doc-toc-l2 > span:first-child {
|
||
padding-left: 1.5em;
|
||
}
|
||
|
||
.doc-toc-l3 > span:first-child {
|
||
padding-left: 3em;
|
||
}
|
||
|
||
.doc-toc-l4 > span:first-child {
|
||
padding-left: 4.5em;
|
||
}
|
||
|
||
.doc-toc-num {
|
||
white-space: pre;
|
||
margin-right: 4px;
|
||
}
|
||
|
||
.doc-toc-dots {
|
||
flex: 1;
|
||
min-width: 24px;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
letter-spacing: 2px;
|
||
user-select: none;
|
||
}
|
||
|
||
/* tiptap injects `.ProseMirror [contenteditable="false"] { white-space: normal }`
|
||
* (0-2-0), beating the single-class rules above; mirror it to keep TOC lines
|
||
* from wrapping their leader dots into extra lines. */
|
||
.ProseMirror [contenteditable='false'] .doc-toc-dots,
|
||
.ProseMirror [contenteditable='false'].doc-toc-dots {
|
||
white-space: nowrap;
|
||
}
|
||
.ProseMirror [contenteditable='false'] .doc-toc-num,
|
||
.ProseMirror [contenteditable='false'].doc-toc-num {
|
||
white-space: pre;
|
||
}
|
||
|
||
.doc-field-pagebreak {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
color: var(--text-tertiary);
|
||
font-size: 10px;
|
||
user-select: none;
|
||
}
|
||
|
||
.doc-field-pagebreak::before,
|
||
.doc-field-pagebreak::after {
|
||
content: '';
|
||
flex: 1;
|
||
border-top: 1px dashed var(--border-strong);
|
||
}
|
||
|
||
.doc-field-text {
|
||
font-size: inherit;
|
||
line-height: inherit;
|
||
}
|
||
|
||
/* field results keep their spaces (Word preserves them; collapsing reflows the
|
||
wrap column around anchored pictures) — must outrank prosemirror-view's
|
||
injected `.ProseMirror [contenteditable=false] { white-space: normal }` */
|
||
.ProseMirror [contenteditable='false'].doc-field-text,
|
||
.ProseMirror [contenteditable='false'] .doc-field-text {
|
||
white-space: pre-wrap;
|
||
}
|
||
|
||
.doc-content-editing .doc-toc-title,
|
||
.doc-content-editing .doc-toc-page,
|
||
.doc-content-editing .doc-field-text,
|
||
.doc-content-editing .doc-formula-token {
|
||
cursor: text;
|
||
user-select: text;
|
||
-webkit-user-select: text;
|
||
outline: 1px solid color-mix(in srgb, var(--word-blue) 45%, transparent);
|
||
border-radius: 2px;
|
||
}
|
||
|
||
.doc-protected-formula {
|
||
padding: 5px 8px;
|
||
background: transparent;
|
||
}
|
||
|
||
.doc-formula {
|
||
display: inline-flex;
|
||
align-items: baseline;
|
||
min-height: 24px;
|
||
font-family: 'Cambria Math', 'STIX Two Math', serif;
|
||
font-size: 16px;
|
||
cursor: move;
|
||
user-select: none;
|
||
-webkit-user-select: none;
|
||
}
|
||
|
||
.doc-content-editing .doc-formula {
|
||
cursor: text;
|
||
user-select: text;
|
||
-webkit-user-select: text;
|
||
}
|
||
|
||
.doc-formula-token:empty::before {
|
||
content: '\00a0';
|
||
}
|
||
|
||
/* 2D MathML rendering: shown by default, swapped for the editable token
|
||
strip while the block is in content-editing mode */
|
||
.doc-formula-wrap {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.doc-formula-math {
|
||
display: inline-block;
|
||
font-family: 'Cambria Math', 'STIX Two Math', 'Latin Modern Math', serif;
|
||
font-size: 16px;
|
||
cursor: move;
|
||
user-select: none;
|
||
-webkit-user-select: none;
|
||
}
|
||
|
||
.doc-formula-math math {
|
||
font-family: inherit;
|
||
}
|
||
|
||
.doc-formula.doc-formula-has-math {
|
||
display: none;
|
||
}
|
||
|
||
.doc-content-editing .doc-formula.doc-formula-has-math {
|
||
display: inline-flex;
|
||
}
|
||
|
||
.doc-content-editing .doc-formula-math {
|
||
display: none;
|
||
}
|
||
|
||
/* display equations (oMathPara-style) are centered; inline fallbacks keep flow */
|
||
.doc-protected-formula-display {
|
||
text-align: center;
|
||
}
|
||
|
||
/* embedded charts: SVG preview + editable data sheet.
|
||
No chip padding: the drawing must occupy exactly its wp:extent box or
|
||
pagination gains ~20px per chart over Word and drifts across pages */
|
||
.doc-protected-chart {
|
||
background: var(--docs-paper);
|
||
padding: 0;
|
||
}
|
||
|
||
/* no flex gap: title + plot must fill exactly the wp:extent box (the plot
|
||
height already budgets a 22px title row); the editing-only data grid
|
||
carries its own top margin instead */
|
||
.doc-chart {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.doc-chart-title {
|
||
font-size: 13pt;
|
||
font-weight: 600;
|
||
text-align: center;
|
||
color: var(--docs-paper-ink-dim);
|
||
/* pinned to CHART_TITLE_ROW_PX: the plot SVG budgets exactly this row so
|
||
title + plot fill the wp:extent box; inherited (CJK) line-height must not
|
||
re-inflate it */
|
||
height: 22px;
|
||
line-height: 22px;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.doc-chart-svg {
|
||
display: block;
|
||
max-width: 100%;
|
||
margin: 0 auto;
|
||
}
|
||
|
||
.doc-chart-grid {
|
||
stroke: var(--docs-paper-chart-grid);
|
||
stroke-width: 1;
|
||
}
|
||
|
||
.doc-chart-axis-label {
|
||
font:
|
||
10px 'Segoe UI',
|
||
var(--ui-cjk),
|
||
sans-serif;
|
||
fill: var(--docs-paper-ink-faint);
|
||
}
|
||
|
||
/* data grid is an editing affordance: visible while the chart block is
|
||
selected or in text-edit mode; the printed/preview chart shows only the plot
|
||
(Word/LO behavior) */
|
||
.doc-protected .doc-chart-data {
|
||
display: none;
|
||
margin-top: 8px;
|
||
}
|
||
|
||
.ProseMirror-focused .doc-protected.ProseMirror-selectednode .doc-chart-data,
|
||
.doc-protected.doc-content-editing .doc-chart-data {
|
||
display: table;
|
||
}
|
||
|
||
.doc-chart-data {
|
||
border-collapse: collapse;
|
||
align-self: center;
|
||
font-size: 10pt;
|
||
line-height: 1.4;
|
||
}
|
||
|
||
.doc-chart-data th,
|
||
.doc-chart-data td {
|
||
border: 1px solid var(--docs-paper-chart-border);
|
||
padding: 2px 10px;
|
||
min-width: 52px;
|
||
text-align: right;
|
||
font-weight: 400;
|
||
}
|
||
|
||
.doc-chart-data th.doc-chart-corner {
|
||
border: none;
|
||
}
|
||
|
||
.doc-chart-data th.doc-chart-cat {
|
||
font-weight: 600;
|
||
text-align: center;
|
||
background: color-mix(in srgb, var(--docs-paper-accent) 6%, transparent);
|
||
}
|
||
|
||
.doc-chart-data th.doc-chart-name {
|
||
font-weight: 600;
|
||
text-align: left;
|
||
border-left-width: 4px;
|
||
border-left-style: solid;
|
||
}
|
||
|
||
.doc-chart-data td.doc-chart-gap {
|
||
background: repeating-linear-gradient(
|
||
45deg,
|
||
transparent,
|
||
transparent 4px,
|
||
var(--docs-paper-stripe) 4px,
|
||
var(--docs-paper-stripe) 8px
|
||
);
|
||
}
|
||
|
||
.doc-content-editing .doc-chart-title,
|
||
.doc-content-editing .doc-chart-cell {
|
||
cursor: text;
|
||
user-select: text;
|
||
-webkit-user-select: text;
|
||
outline: 1px solid color-mix(in srgb, var(--word-blue) 45%, transparent);
|
||
border-radius: 2px;
|
||
}
|
||
|
||
.ProseMirror-focused .doc-protected.ProseMirror-selectednode {
|
||
border: 1px solid var(--word-blue);
|
||
outline: 1px solid var(--word-blue);
|
||
/* blue-tinted like an in-document selection, not the gray toolbar plate */
|
||
background: var(--docs-paper-select-bg);
|
||
}
|
||
|
||
/* field rows stay borderless when selected too — the border's 2px would
|
||
reflow the page under the caret */
|
||
.ProseMirror-focused .doc-protected-field.ProseMirror-selectednode {
|
||
border: none;
|
||
}
|
||
|
||
.doc-protected-label {
|
||
display: inline-block;
|
||
font-size: 11px;
|
||
color: var(--text-dim);
|
||
border: 1px solid var(--border);
|
||
border-radius: 3px;
|
||
padding: 1px 8px;
|
||
margin-right: 10px;
|
||
background: var(--surface);
|
||
font-family: 'Segoe UI', var(--ui-cjk), sans-serif;
|
||
}
|
||
|
||
.doc-protected-preview {
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
cursor: text;
|
||
user-select: text;
|
||
-webkit-user-select: text;
|
||
/* SmartArt degrade lists one node label per line */
|
||
white-space: pre-line;
|
||
}
|
||
|
||
/* SmartArt degrade: precomputed diagram shapes at absolute positions.
|
||
Shape/text colors are document data — inline per shape, never themed. */
|
||
.doc-diagram {
|
||
position: relative;
|
||
display: inline-block;
|
||
overflow: hidden;
|
||
max-width: 100%;
|
||
vertical-align: top;
|
||
}
|
||
|
||
.doc-diagram-shape {
|
||
position: absolute;
|
||
overflow: hidden;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
text-align: center;
|
||
white-space: pre-line;
|
||
line-height: 1.15;
|
||
}
|
||
|
||
.doc-diagram-text {
|
||
position: relative;
|
||
z-index: 1;
|
||
padding: 0 4px;
|
||
}
|
||
|
||
/* drawing canvas (lockedCanvas): text keeps its raw font size and overflows
|
||
the scaled child geometry downward instead of clipping (LO behavior) */
|
||
.doc-diagram-canvas,
|
||
.doc-diagram-canvas .doc-diagram-shape {
|
||
overflow: visible;
|
||
}
|
||
|
||
.doc-diagram-canvas .doc-diagram-shape {
|
||
align-items: flex-start;
|
||
}
|
||
|
||
.doc-diagram-canvas .doc-diagram-text {
|
||
word-break: break-all;
|
||
line-height: 1.2;
|
||
}
|
||
|
||
/* OLE embed degrade: the packaged preview picture at its declared size —
|
||
Word draws no box or caption (the type name lives in the hover tooltip).
|
||
The block stays display:block so consecutive objects stack like w:p and
|
||
the paragraph's w:jc (text-align) can place the inline preview. */
|
||
.doc-protected-ole {
|
||
border-color: transparent;
|
||
background: none;
|
||
padding: 0;
|
||
margin: 0;
|
||
}
|
||
|
||
.doc-protected-ole:hover {
|
||
border-color: var(--border-strong);
|
||
}
|
||
|
||
/* wrap inline-block + img block (like image blocks): the paragraph's
|
||
text-align places the shrink-wrapped preview without a baseline gap */
|
||
.doc-protected-ole .doc-ole-wrap {
|
||
display: inline-block;
|
||
max-width: 100%;
|
||
}
|
||
|
||
.doc-protected-ole .doc-ole-img {
|
||
display: block;
|
||
max-width: 100%;
|
||
}
|
||
|
||
.doc-protected-img {
|
||
max-width: 100%;
|
||
display: block;
|
||
}
|
||
|
||
/* SmartArt / drawing-canvas blocks: the shapes are the content — no chip box.
|
||
Zero padding: the block footprint must equal the declared wp:extent so
|
||
pagination matches Word (the dashed 1px border stays as hover chrome). */
|
||
.doc-protected-diagram {
|
||
border-color: transparent;
|
||
background: none;
|
||
padding: 0;
|
||
margin: 0;
|
||
}
|
||
|
||
.doc-protected-diagram:hover {
|
||
border-color: var(--border);
|
||
}
|
||
|
||
/* srcRect crop windows carry the declared extent inline; the float wrap's
|
||
60% clamp must not squeeze them (Word keeps the placed size and lets the
|
||
picture reach into the margin instead) */
|
||
.doc-protected .doc-img-crop {
|
||
max-width: none;
|
||
}
|
||
|
||
/* image blocks: no chip chrome, selection border with resize handle */
|
||
.doc-protected[data-doc-protected='image'] {
|
||
border-color: transparent;
|
||
background: none;
|
||
padding: 2px 0;
|
||
/* no baseline strut/descender slack: Word gives a picture-only paragraph
|
||
exactly the image height, and the ~8px surplus pushes a page-filling
|
||
picture past the page and derails the slice boundaries */
|
||
line-height: 0;
|
||
}
|
||
|
||
.doc-protected[data-doc-protected='image'] .doc-img-wrap > img,
|
||
.doc-protected[data-doc-protected='image'] .doc-img-crop-viewport > img {
|
||
vertical-align: bottom;
|
||
}
|
||
|
||
.doc-image-leading-space {
|
||
white-space: pre;
|
||
}
|
||
|
||
.doc-protected[data-doc-protected='image']:hover {
|
||
border-color: var(--border);
|
||
}
|
||
|
||
.ProseMirror-focused .doc-protected[data-doc-protected='image'].ProseMirror-selectednode {
|
||
border-color: transparent;
|
||
outline: none;
|
||
background: none;
|
||
}
|
||
|
||
.doc-img-wrap {
|
||
position: relative;
|
||
display: inline-block;
|
||
max-width: 100%;
|
||
}
|
||
|
||
.doc-img-crop-viewport {
|
||
display: block;
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
|
||
/* find option toggles (match case / whole word) */
|
||
.find-opt {
|
||
border: 1px solid var(--border);
|
||
background: var(--surface);
|
||
border-radius: 3px;
|
||
font-size: 11px;
|
||
padding: 2px 6px;
|
||
cursor: pointer;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.find-opt.on {
|
||
background: var(--word-blue);
|
||
border-color: var(--word-blue);
|
||
color: var(--docs-on-accent);
|
||
}
|
||
|
||
/* data grid of the Insert Chart dialog */
|
||
.modal-chart {
|
||
min-width: 460px;
|
||
}
|
||
|
||
.chart-data-grid {
|
||
border-collapse: collapse;
|
||
margin-bottom: 8px;
|
||
width: 100%;
|
||
}
|
||
|
||
.chart-data-grid th,
|
||
.chart-data-grid td {
|
||
border: 1px solid var(--border);
|
||
padding: 0;
|
||
}
|
||
|
||
.chart-data-grid input {
|
||
border: none;
|
||
background: transparent;
|
||
width: 90px;
|
||
padding: 4px 6px;
|
||
font-size: 12px;
|
||
}
|
||
|
||
.chart-data-grid thead input {
|
||
font-weight: 600;
|
||
}
|
||
|
||
/* cross-reference (REF field): gray field shading */
|
||
/* Word's default field shading is "when selected": a static view shows the
|
||
field result as plain text, shading appears on hover/interaction only */
|
||
.doc-ref-field {
|
||
border-radius: 2px;
|
||
}
|
||
|
||
.doc-ref-field:hover {
|
||
background: var(--docs-paper-field-bg);
|
||
}
|
||
|
||
/* Bookmark / Cross-reference dialogs */
|
||
.modal-row {
|
||
display: flex;
|
||
gap: 8px;
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
.modal-row input {
|
||
flex: 1;
|
||
}
|
||
|
||
.modal-error {
|
||
color: var(--danger);
|
||
font-size: 12px;
|
||
margin-bottom: 6px;
|
||
}
|
||
|
||
/* Custom page margins dialog: two labeled inputs per row */
|
||
.margin-row label {
|
||
flex: 1;
|
||
margin-bottom: 4px;
|
||
}
|
||
|
||
.bookmark-list {
|
||
max-height: 260px;
|
||
overflow-y: auto;
|
||
border: 1px solid var(--border);
|
||
border-radius: 4px;
|
||
}
|
||
|
||
.bookmark-empty {
|
||
padding: 14px;
|
||
color: var(--text-dim);
|
||
font-size: 13px;
|
||
}
|
||
|
||
.bookmark-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
padding: 5px 10px;
|
||
border-bottom: 1px solid var(--border);
|
||
}
|
||
|
||
.bookmark-row:last-child {
|
||
border-bottom: none;
|
||
}
|
||
|
||
.bookmark-name {
|
||
background: none;
|
||
border: none;
|
||
color: var(--word-blue);
|
||
cursor: pointer;
|
||
font-weight: 600;
|
||
padding: 0;
|
||
}
|
||
|
||
.bookmark-preview {
|
||
flex: 1;
|
||
color: var(--text-dim);
|
||
font-size: 12px;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.bookmark-del {
|
||
background: none;
|
||
border: none;
|
||
cursor: pointer;
|
||
color: var(--text-dim);
|
||
font-size: 15px;
|
||
}
|
||
|
||
/* text wrap: square uses a real CSS float so following paragraphs wrap automatically; tight/through display approximately as square */
|
||
.doc-protected.img-wrap-square-left,
|
||
.doc-protected.img-wrap-tight-left,
|
||
.doc-protected.img-wrap-through-left {
|
||
float: left;
|
||
width: fit-content;
|
||
max-width: 60%;
|
||
margin: 0 12px 0 0;
|
||
}
|
||
|
||
.doc-protected.img-wrap-square-right,
|
||
.doc-protected.img-wrap-tight-right,
|
||
.doc-protected.img-wrap-through-right {
|
||
float: right;
|
||
width: fit-content;
|
||
max-width: 60%;
|
||
margin: 0 0 0 12px;
|
||
}
|
||
|
||
.doc-protected.img-wrap-topBottom {
|
||
text-align: center;
|
||
}
|
||
|
||
/* floating tables (w:tblpPr): text flows around the free side */
|
||
.doc-table.doc-table-float-left {
|
||
float: left;
|
||
margin: 2px 12px 6px 0;
|
||
}
|
||
|
||
.doc-table.doc-table-float-right {
|
||
float: right;
|
||
margin: 2px 0 6px 12px;
|
||
}
|
||
|
||
/* behind text: the absolutely positioned wrap drops under the flow's inline
|
||
content (negative z-index stays above the paper: no intermediate background) */
|
||
.img-wrap-behind > .doc-img-wrap {
|
||
z-index: -1;
|
||
}
|
||
|
||
.ProseMirror-focused
|
||
.doc-protected[data-doc-protected='image'].ProseMirror-selectednode
|
||
.doc-img-wrap {
|
||
outline: 2px solid var(--word-blue);
|
||
}
|
||
|
||
.img-resize-handle {
|
||
display: none;
|
||
position: absolute;
|
||
box-sizing: border-box;
|
||
width: 9px;
|
||
height: 9px;
|
||
background: var(--docs-paper);
|
||
border: 1px solid var(--word-blue);
|
||
border-radius: 1px;
|
||
z-index: 6;
|
||
}
|
||
|
||
.img-resize-handle-nw {
|
||
top: -5px;
|
||
left: -5px;
|
||
cursor: nwse-resize;
|
||
}
|
||
|
||
.img-resize-handle-n {
|
||
top: -5px;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
cursor: ns-resize;
|
||
}
|
||
|
||
.img-resize-handle-ne {
|
||
top: -5px;
|
||
right: -5px;
|
||
cursor: nesw-resize;
|
||
}
|
||
|
||
.img-resize-handle-e {
|
||
top: 50%;
|
||
right: -5px;
|
||
transform: translateY(-50%);
|
||
cursor: ew-resize;
|
||
}
|
||
|
||
.img-resize-handle-se {
|
||
right: -5px;
|
||
bottom: -5px;
|
||
cursor: nwse-resize;
|
||
}
|
||
|
||
.img-resize-handle-s {
|
||
bottom: -5px;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
cursor: ns-resize;
|
||
}
|
||
|
||
.img-resize-handle-sw {
|
||
bottom: -5px;
|
||
left: -5px;
|
||
cursor: nesw-resize;
|
||
}
|
||
|
||
.img-resize-handle-w {
|
||
top: 50%;
|
||
left: -5px;
|
||
transform: translateY(-50%);
|
||
cursor: ew-resize;
|
||
}
|
||
|
||
.ProseMirror-focused
|
||
.doc-protected[data-doc-protected='image'].ProseMirror-selectednode
|
||
.img-resize-handle {
|
||
display: block;
|
||
}
|
||
|
||
.doc-image-anchor-marker {
|
||
display: none;
|
||
position: absolute;
|
||
z-index: 6;
|
||
top: -11px;
|
||
left: -32px;
|
||
width: 22px;
|
||
height: 22px;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: var(--text);
|
||
font: 16px/1 sans-serif;
|
||
pointer-events: none;
|
||
user-select: none;
|
||
}
|
||
|
||
.ProseMirror-focused
|
||
.doc-protected[data-doc-protected='image'].ProseMirror-selectednode
|
||
> .doc-image-anchor-marker {
|
||
display: flex;
|
||
}
|
||
|
||
/* Crop owns the active image controls while its modal is open. */
|
||
body.docs-crop-active
|
||
.doc-protected[data-doc-protected='image'].ProseMirror-selectednode
|
||
.doc-img-wrap {
|
||
outline: none;
|
||
}
|
||
|
||
body.docs-crop-active
|
||
.doc-protected[data-doc-protected='image'].ProseMirror-selectednode
|
||
.img-resize-handle,
|
||
body.docs-crop-active
|
||
.doc-protected[data-doc-protected='image'].ProseMirror-selectednode
|
||
> .doc-image-anchor-marker,
|
||
body.docs-crop-active
|
||
.doc-protected[data-doc-protected='image'].ProseMirror-selectednode
|
||
> .doc-move-handle {
|
||
display: none !important;
|
||
pointer-events: none !important;
|
||
}
|
||
|
||
/* AI diff highlight */
|
||
.doc-page .ai-changed {
|
||
background: var(--ai-highlight);
|
||
box-shadow: -3px 0 0 var(--ai-highlight-border);
|
||
}
|
||
|
||
/* ================= start screen ================= */
|
||
|
||
.start-screen {
|
||
width: 100%;
|
||
min-height: 100%;
|
||
padding: 9vh 24px 40px;
|
||
text-align: center;
|
||
background: var(--surface);
|
||
font-family: 'Segoe UI', var(--ui-cjk), sans-serif;
|
||
}
|
||
|
||
.editor-scroll:has(> .start-screen) {
|
||
padding: 0;
|
||
background: var(--surface);
|
||
}
|
||
|
||
/* Starting up (while the pending-open check runs): lightweight placeholder, don't flash the start screen */
|
||
.start-booting {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: var(--text-dim);
|
||
font-size: 13px;
|
||
}
|
||
|
||
.btn-primary {
|
||
height: 34px;
|
||
padding: 0 16px;
|
||
border: none;
|
||
border-radius: 12px;
|
||
background: var(--word-blue);
|
||
color: var(--docs-on-accent);
|
||
font-size: 13px;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.btn-primary:hover:not(:disabled) {
|
||
background: var(--word-blue-dark);
|
||
}
|
||
|
||
.btn-primary:disabled {
|
||
opacity: 0.5;
|
||
cursor: default;
|
||
}
|
||
|
||
.btn-ghost {
|
||
border: none;
|
||
background: none;
|
||
color: var(--word-blue);
|
||
font-size: 13px;
|
||
cursor: pointer;
|
||
padding: 4px 8px;
|
||
border-radius: 12px;
|
||
}
|
||
|
||
.btn-ghost:hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.btn-sm {
|
||
font-size: 12px;
|
||
padding: 2px 10px;
|
||
height: 26px;
|
||
}
|
||
|
||
.recent {
|
||
margin-top: 44px;
|
||
text-align: left;
|
||
}
|
||
|
||
.recent-title {
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
margin-bottom: 8px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.recent-item {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
width: 100%;
|
||
text-align: left;
|
||
padding: 9px 12px;
|
||
margin-bottom: 3px;
|
||
border: none;
|
||
border-radius: 4px;
|
||
background: var(--surface);
|
||
font-size: 13px;
|
||
color: var(--text);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.recent-item:hover {
|
||
background: var(--active-bg);
|
||
}
|
||
|
||
.recent-path {
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
/* ================= AI panel (Copilot-style pane) ================= */
|
||
|
||
.ai-panel {
|
||
position: relative;
|
||
width: 360px;
|
||
flex-shrink: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
background: var(--color-bg-page);
|
||
/* Same visible divider as the GenOffice Sheets panel: the editor canvas is gray, so the default border would drown */
|
||
border-right: 1px solid var(--color-border-strong);
|
||
font-family: var(--gs-font-sans);
|
||
color: var(--color-text-primary);
|
||
}
|
||
|
||
/* drag handle on the panel's right edge — resize the panel horizontally */
|
||
.ai-panel-resizer {
|
||
position: absolute;
|
||
right: -3px;
|
||
top: 0;
|
||
bottom: 0;
|
||
width: 7px;
|
||
cursor: col-resize;
|
||
z-index: 20;
|
||
background: transparent;
|
||
}
|
||
|
||
/* while dragging: keep the col-resize cursor everywhere, no text selection */
|
||
.ai-panel-resizing {
|
||
cursor: col-resize;
|
||
user-select: none;
|
||
}
|
||
|
||
.ai-panel-header {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
gap: 8px;
|
||
padding: 10px 12px 10px 14px;
|
||
border-bottom: 1px solid var(--color-border-default);
|
||
font-weight: 600;
|
||
font-size: 14px;
|
||
color: var(--color-text-primary);
|
||
}
|
||
|
||
.ai-panel-title {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 7px;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.ai-panel-header-actions {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 2px;
|
||
min-width: 0;
|
||
}
|
||
|
||
.ai-header-btn {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 26px;
|
||
height: 26px;
|
||
flex-shrink: 0;
|
||
border: none;
|
||
background: none;
|
||
border-radius: var(--radius-8);
|
||
color: var(--color-text-secondary);
|
||
cursor: pointer;
|
||
padding: 0;
|
||
transition: all var(--transition-fast);
|
||
}
|
||
|
||
.ai-header-btn:hover {
|
||
background: var(--color-bg-subtle);
|
||
color: var(--color-text-primary);
|
||
}
|
||
|
||
/* collapsed AI sidebar: thin rail on the left edge */
|
||
.ai-rail {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 8px;
|
||
width: 34px;
|
||
padding: 12px 2px;
|
||
border: none;
|
||
border-right: 1px solid var(--border);
|
||
background: var(--surface);
|
||
color: var(--text);
|
||
cursor: pointer;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.ai-rail:hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.ai-rail-text {
|
||
writing-mode: vertical-rl;
|
||
font-size: 12px;
|
||
letter-spacing: 2px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.ai-chat {
|
||
flex: 1;
|
||
overflow-y: auto;
|
||
padding: 32px 16px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
/* uniform 16px flex gap between blocks, messages carry no margin */
|
||
gap: 16px;
|
||
font-family: var(--gs-font-sans);
|
||
}
|
||
|
||
/* Boundary between the restored transcript and the live turn */
|
||
.ai-history-sep {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
height: 30px;
|
||
font-size: 14px;
|
||
color: var(--color-text-tertiary);
|
||
}
|
||
|
||
.ai-chat-empty {
|
||
margin-top: 36px;
|
||
padding: 0 10px;
|
||
text-align: center;
|
||
}
|
||
|
||
.ai-chat-empty-title {
|
||
font-size: var(--text-body-lg);
|
||
font-weight: 600;
|
||
color: var(--color-text-primary);
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
.ai-chat-empty-body {
|
||
color: var(--color-text-secondary);
|
||
font-size: var(--text-small);
|
||
line-height: 1.5;
|
||
}
|
||
|
||
/* clickable starter prompts in the empty state — suggestion chips:
|
||
* 30px-radius outline pills, 13px/400 */
|
||
.ai-starter-list {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 8px;
|
||
margin-top: 16px;
|
||
}
|
||
|
||
.ai-starter {
|
||
padding: 8px 16px;
|
||
border-radius: var(--radius-30);
|
||
border: 1px solid var(--color-border-default);
|
||
background: var(--color-bg-page);
|
||
font-size: 13px;
|
||
font-weight: 400;
|
||
line-height: 1.4;
|
||
color: var(--color-text-primary);
|
||
cursor: pointer;
|
||
transition: all var(--transition-fast);
|
||
}
|
||
|
||
.ai-starter:hover {
|
||
border-color: var(--color-border-strong);
|
||
background: var(--color-bg-subtle);
|
||
}
|
||
|
||
.ai-starter:active {
|
||
filter: brightness(0.88);
|
||
transform: scale(0.98);
|
||
}
|
||
|
||
/* Chat messages (scaled to the 14px panel): user = gray pill, AI = plain text without a bubble, no accent colors */
|
||
.ai-msg {
|
||
position: relative;
|
||
margin: 0;
|
||
font-size: 16px;
|
||
line-height: 1.6;
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
}
|
||
|
||
/* markdown body inside assistant bubbles */
|
||
.ai-md {
|
||
white-space: normal;
|
||
}
|
||
|
||
.ai-md p,
|
||
.ai-md ul,
|
||
.ai-md ol {
|
||
margin: 0 0 16px;
|
||
}
|
||
|
||
.ai-md :last-child {
|
||
margin-bottom: 0;
|
||
}
|
||
|
||
/* blank markdown paragraphs would each eat a 16px margin — the stream never renders them */
|
||
.ai-md p:empty {
|
||
display: none;
|
||
}
|
||
|
||
.ai-md ul,
|
||
.ai-md ol {
|
||
margin-bottom: 20px;
|
||
padding-left: 20px;
|
||
}
|
||
|
||
.ai-md li {
|
||
margin-left: 20px;
|
||
line-height: 28px;
|
||
}
|
||
|
||
.ai-md .ai-md-h {
|
||
font-weight: 700;
|
||
line-height: 1.3;
|
||
margin: 20px 0 8px;
|
||
}
|
||
|
||
.ai-md .ai-md-h:first-child {
|
||
margin-top: 0;
|
||
}
|
||
|
||
/* inline code: neutral gray chip (deliberately not red), 2px below body size */
|
||
.ai-md code {
|
||
padding: 1px 6px;
|
||
border-radius: 4px;
|
||
background: var(--color-bg-subtle);
|
||
color: var(--color-text-secondary);
|
||
font-size: 14px;
|
||
font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
|
||
}
|
||
|
||
/* User pill: gray, fully rounded (no tail) */
|
||
.ai-msg-user {
|
||
align-self: flex-end;
|
||
background: var(--color-bg-subtle);
|
||
color: var(--color-text-primary);
|
||
padding: 8px 16px;
|
||
border-radius: 14px;
|
||
max-width: 80%;
|
||
line-height: 1.5;
|
||
}
|
||
|
||
.ai-msg-assistant {
|
||
align-self: stretch;
|
||
background: none;
|
||
border: none;
|
||
padding: 0;
|
||
max-width: 100%;
|
||
color: var(--color-text-primary);
|
||
}
|
||
|
||
/* tool activity chips inside assistant bubbles */
|
||
/* Collapsible tool-activity group */
|
||
.ai-work-group {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: flex-start;
|
||
margin-top: 12px;
|
||
}
|
||
|
||
.ai-msg-assistant .ai-work-group:first-child,
|
||
.ai-work-group:only-child {
|
||
margin-top: 0;
|
||
}
|
||
|
||
.ai-work-group-summary {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
padding: 4px 0;
|
||
margin: 0;
|
||
background: none;
|
||
border: none;
|
||
cursor: pointer;
|
||
user-select: none;
|
||
font-family: inherit;
|
||
font-size: 14px;
|
||
line-height: 1.5;
|
||
color: var(--color-text-tertiary);
|
||
transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
||
}
|
||
|
||
.ai-work-group-summary:hover {
|
||
color: var(--color-text-secondary);
|
||
}
|
||
|
||
.ai-work-group-summary:focus-visible {
|
||
outline: none;
|
||
box-shadow: 0 0 0 3px var(--docs-focus-ring);
|
||
border-radius: 4px;
|
||
}
|
||
|
||
.ai-work-group-summary.running {
|
||
color: var(--color-text-secondary);
|
||
}
|
||
|
||
.ai-work-group-summary.running .ai-work-group-label {
|
||
animation: ai-summary-pulse 1500ms linear infinite;
|
||
}
|
||
|
||
@keyframes ai-summary-pulse {
|
||
0%,
|
||
100% {
|
||
opacity: 1;
|
||
}
|
||
50% {
|
||
opacity: 0.45;
|
||
}
|
||
}
|
||
|
||
.ai-work-group-body {
|
||
align-self: stretch;
|
||
display: grid;
|
||
grid-template-rows: 0fr;
|
||
transition: grid-template-rows 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
||
}
|
||
|
||
.ai-work-group-body.open {
|
||
grid-template-rows: 1fr;
|
||
}
|
||
|
||
.ai-work-group-body-inner {
|
||
overflow: hidden;
|
||
min-height: 0;
|
||
padding: 0 0 0 8px;
|
||
transition: padding 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
||
}
|
||
|
||
.ai-work-group-body.open .ai-work-group-body-inner {
|
||
padding: 4px 0 8px 8px;
|
||
}
|
||
|
||
/* Step rows inside the group: 20px icon slot + 1px connector */
|
||
.ai-step-row {
|
||
position: relative;
|
||
display: flex;
|
||
align-items: flex-start;
|
||
gap: 12px;
|
||
padding: 8px 0;
|
||
color: var(--color-text-tertiary);
|
||
animation: ai-row-ease-in 320ms ease-out;
|
||
}
|
||
|
||
.ai-step-row:not(:last-child) {
|
||
padding-bottom: 16px;
|
||
}
|
||
|
||
.ai-step-row:not(:last-child)::after {
|
||
content: '';
|
||
position: absolute;
|
||
left: 9.5px;
|
||
top: 32px;
|
||
bottom: -4px;
|
||
width: 1px;
|
||
background: var(--color-border-default);
|
||
}
|
||
|
||
.ai-step-icon {
|
||
flex-shrink: 0;
|
||
width: 20px;
|
||
height: 20px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: var(--color-text-tertiary);
|
||
}
|
||
|
||
.ai-step-icon.done {
|
||
color: var(--color-text-secondary);
|
||
}
|
||
|
||
.ai-step-icon.error {
|
||
color: var(--color-error);
|
||
}
|
||
|
||
.ai-step-icon.running svg {
|
||
animation: ai-hourglass-flip 1.8s ease-in-out infinite;
|
||
}
|
||
|
||
@keyframes ai-hourglass-flip {
|
||
0%,
|
||
12% {
|
||
transform: rotate(0);
|
||
}
|
||
44%,
|
||
56% {
|
||
transform: rotate(180deg);
|
||
}
|
||
88%,
|
||
100% {
|
||
transform: rotate(360deg);
|
||
}
|
||
}
|
||
|
||
.ai-step-content {
|
||
flex: 1;
|
||
min-width: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 6px;
|
||
padding-top: 1px;
|
||
}
|
||
|
||
.ai-step-title {
|
||
font-size: 14px;
|
||
line-height: 1.3;
|
||
color: var(--color-text-secondary);
|
||
text-align: left;
|
||
background: none;
|
||
border: none;
|
||
padding: 0;
|
||
margin: 0;
|
||
font-family: inherit;
|
||
}
|
||
|
||
.ai-step-title.clickable {
|
||
cursor: pointer;
|
||
transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
||
}
|
||
|
||
.ai-step-title.clickable:hover {
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.ai-step-title.clickable:focus-visible {
|
||
outline: none;
|
||
box-shadow: 0 0 0 3px var(--docs-focus-ring);
|
||
border-radius: 4px;
|
||
}
|
||
|
||
/* Step detail opens instantly, no animation */
|
||
.ai-step-detail {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8px;
|
||
margin-top: 8px;
|
||
}
|
||
|
||
@media (prefers-reduced-motion: reduce) {
|
||
.ai-step-row,
|
||
.ai-step-icon.running svg,
|
||
.ai-work-group-summary.running .ai-work-group-label {
|
||
animation: none;
|
||
}
|
||
}
|
||
|
||
/* Running tool row: two grow/shrink brand dots */
|
||
.ai-tool-chip-spinner {
|
||
flex-shrink: 0;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 2px;
|
||
height: 12px;
|
||
}
|
||
|
||
.ai-tool-chip-spinner::before,
|
||
.ai-tool-chip-spinner::after {
|
||
content: '';
|
||
width: 12px;
|
||
height: 12px;
|
||
border-radius: 50%;
|
||
background: var(--color-brand-secondary);
|
||
}
|
||
|
||
.ai-tool-chip-spinner::before {
|
||
animation: ai-tool-dot-grow 2s infinite;
|
||
}
|
||
|
||
.ai-tool-chip-spinner::after {
|
||
animation: ai-tool-dot-shrink 2s infinite;
|
||
}
|
||
|
||
@keyframes ai-tool-dot-grow {
|
||
0%,
|
||
100% {
|
||
transform: scale(0.333);
|
||
opacity: 0.45;
|
||
}
|
||
50% {
|
||
transform: scale(1);
|
||
opacity: 1;
|
||
}
|
||
}
|
||
|
||
@keyframes ai-tool-dot-shrink {
|
||
0%,
|
||
100% {
|
||
transform: scale(1);
|
||
opacity: 1;
|
||
}
|
||
50% {
|
||
transform: scale(0.333);
|
||
opacity: 0.45;
|
||
}
|
||
}
|
||
|
||
@media (prefers-reduced-motion: reduce) {
|
||
.ai-tool-chip-spinner::before,
|
||
.ai-tool-chip-spinner::after {
|
||
animation: none;
|
||
opacity: 0.65;
|
||
}
|
||
}
|
||
|
||
/* Elapsed run time next to the typing indicator */
|
||
.ai-typing-row {
|
||
display: inline-flex;
|
||
align-items: baseline;
|
||
gap: 8px;
|
||
}
|
||
|
||
.ai-elapsed {
|
||
font-size: 14px;
|
||
color: var(--text-dim);
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
|
||
/* caret: text glyph right after the label, always visible, rotates open */
|
||
.ai-tool-chip-caret {
|
||
margin-left: 4px;
|
||
opacity: 0.7;
|
||
display: inline-block;
|
||
transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
||
}
|
||
|
||
.ai-tool-chip-caret.open {
|
||
transform: rotate(90deg);
|
||
}
|
||
|
||
/* stream rows ease in */
|
||
@keyframes ai-row-ease-in {
|
||
from {
|
||
opacity: 0;
|
||
transform: translateY(5px);
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
transform: translateY(0);
|
||
}
|
||
}
|
||
|
||
/* expanded step detail: subtle gray card, no border */
|
||
.ai-tool-output {
|
||
background: var(--color-bg-subtle);
|
||
border: none;
|
||
border-radius: 12px;
|
||
font-family:
|
||
ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
|
||
font-size: 14px;
|
||
color: var(--text-primary);
|
||
max-height: 300px;
|
||
overflow-y: auto;
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.ai-tool-output-pre {
|
||
padding: 12px 16px;
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
line-height: 1.5;
|
||
}
|
||
|
||
/* streaming typing indicator */
|
||
/* Thinking indicator (white background, no container):
|
||
* phase one = two bouncing blue dots (alternating small/large); phase two = shimmering "Thinking…" text + streaming caret block */
|
||
.ai-typing {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
padding: 4px 0;
|
||
font-size: 15px;
|
||
} /* Thinking indicator: shimmer label above two grow/shrink dots */
|
||
.ai-typing {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: flex-start;
|
||
gap: 6px;
|
||
padding: 4px 0;
|
||
}
|
||
|
||
.ai-typing-label {
|
||
display: inline-block;
|
||
position: relative;
|
||
font-size: 14px;
|
||
line-height: 1;
|
||
letter-spacing: 0.01em;
|
||
color: var(--docs-shimmer-base);
|
||
-webkit-text-fill-color: transparent;
|
||
background: var(--docs-shimmer-base)
|
||
linear-gradient(
|
||
to left,
|
||
var(--docs-shimmer-base),
|
||
var(--docs-shimmer-hi) 50%,
|
||
var(--docs-shimmer-base)
|
||
);
|
||
background-clip: text;
|
||
-webkit-background-clip: text;
|
||
background-repeat: no-repeat;
|
||
background-size: 70% 100%;
|
||
animation: ai-thinking-shimmer 1.2s infinite alternate linear;
|
||
}
|
||
|
||
.ai-typing-elapsed {
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
|
||
@keyframes ai-thinking-shimmer {
|
||
0% {
|
||
background-position: -100% top;
|
||
}
|
||
100% {
|
||
background-position: 250% top;
|
||
}
|
||
}
|
||
|
||
.ai-typing-dots {
|
||
height: 12px;
|
||
display: flex;
|
||
gap: 2px;
|
||
}
|
||
|
||
.ai-typing-dot-slot {
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
width: 12px;
|
||
}
|
||
|
||
.ai-typing-dot-grow,
|
||
.ai-typing-dot-shrink {
|
||
background: var(--color-brand-secondary);
|
||
border-radius: 50%;
|
||
}
|
||
|
||
.ai-typing-dot-grow {
|
||
animation: ai-dot-grow 2s infinite;
|
||
}
|
||
|
||
.ai-typing-dot-shrink {
|
||
animation: ai-dot-shrink 2s infinite;
|
||
}
|
||
|
||
@keyframes ai-dot-grow {
|
||
0%,
|
||
100% {
|
||
width: 4px;
|
||
height: 4px;
|
||
opacity: 0.45;
|
||
}
|
||
50% {
|
||
width: 12px;
|
||
height: 12px;
|
||
opacity: 1;
|
||
}
|
||
}
|
||
|
||
@keyframes ai-dot-shrink {
|
||
0%,
|
||
100% {
|
||
width: 12px;
|
||
height: 12px;
|
||
opacity: 1;
|
||
}
|
||
50% {
|
||
width: 4px;
|
||
height: 4px;
|
||
opacity: 0.45;
|
||
}
|
||
}
|
||
|
||
/* streaming caret at the tail of streaming assistant text */
|
||
.ai-msg-streaming .ai-md > :last-child::after {
|
||
content: '';
|
||
display: inline-block;
|
||
width: 6px;
|
||
height: 1em;
|
||
margin-left: 2px;
|
||
border-radius: 1px;
|
||
background: var(--color-text-secondary);
|
||
vertical-align: text-bottom;
|
||
animation: ai-caret-blink 900ms steps(1, end) infinite;
|
||
}
|
||
|
||
@keyframes ai-caret-blink {
|
||
0%,
|
||
50% {
|
||
opacity: 1;
|
||
}
|
||
51%,
|
||
100% {
|
||
opacity: 0;
|
||
}
|
||
}
|
||
|
||
@media (prefers-reduced-motion: reduce) {
|
||
.ai-typing-label,
|
||
.ai-msg-streaming .ai-md > :last-child::after {
|
||
animation: none;
|
||
}
|
||
}
|
||
|
||
/* hover actions under assistant messages (copy / regenerate):
|
||
* borderless 30px icon buttons, radius 8, hover = subtle gray fill */
|
||
.ai-msg-toolbar {
|
||
display: flex;
|
||
gap: 4px;
|
||
margin-top: 8px;
|
||
}
|
||
|
||
.ai-msg-tool-btn {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 3px;
|
||
height: 30px;
|
||
min-width: 30px;
|
||
padding: 5px;
|
||
border: none;
|
||
border-radius: 8px;
|
||
background: transparent;
|
||
color: var(--color-text-secondary);
|
||
font-size: 13px;
|
||
cursor: pointer;
|
||
transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
||
}
|
||
|
||
.ai-msg-tool-btn svg {
|
||
width: 20px;
|
||
height: 20px;
|
||
}
|
||
|
||
.ai-msg-tool-btn:hover:not(:disabled) {
|
||
background: var(--color-bg-subtle);
|
||
}
|
||
|
||
.ai-msg-tool-btn:disabled {
|
||
opacity: 0.45;
|
||
cursor: default;
|
||
}
|
||
|
||
/* Hairline before the roll-back action; hidden unless an icon action precedes it */
|
||
.ai-rollback-sep {
|
||
display: none;
|
||
width: 1px;
|
||
height: 14px;
|
||
align-self: center;
|
||
background: var(--border);
|
||
}
|
||
|
||
.ai-msg-tool-btn ~ .ai-rollback-sep {
|
||
display: block;
|
||
}
|
||
|
||
/* Quiet roll-back in the message toolbar (after copy/regenerate): dim at rest, solid on hover */
|
||
.ai-rollback-btn {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
flex-shrink: 0;
|
||
height: 30px;
|
||
border: none;
|
||
background: none;
|
||
color: var(--text-dim);
|
||
font-size: 12px;
|
||
font-family: inherit;
|
||
padding: 0 8px;
|
||
border-radius: 6px;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ai-rollback-btn:hover:not(:disabled) {
|
||
color: var(--text);
|
||
background: var(--hover);
|
||
}
|
||
|
||
.ai-rollback-btn:disabled {
|
||
opacity: 0.5;
|
||
cursor: default;
|
||
}
|
||
|
||
.ai-msg-tool-btn:focus-visible {
|
||
outline: none;
|
||
box-shadow: 0 0 0 3px var(--docs-focus-ring-blue);
|
||
}
|
||
|
||
/* Tooltip: dark pill under the button, 0.3s hover delay */
|
||
.ai-msg-tool-btn {
|
||
position: relative;
|
||
}
|
||
|
||
/* Global press feedback */
|
||
.ai-msg-tool-btn:active {
|
||
filter: brightness(0.88);
|
||
transform: scale(0.98);
|
||
}
|
||
|
||
.ai-continue-btn {
|
||
margin-top: 8px;
|
||
padding: 5px 12px;
|
||
border: 1px solid var(--word-blue);
|
||
border-radius: 6px;
|
||
background: var(--word-blue);
|
||
color: var(--docs-on-accent);
|
||
font-size: 13px;
|
||
font-weight: 600;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ai-continue-btn:hover {
|
||
filter: brightness(0.94);
|
||
}
|
||
|
||
.ai-msg-error {
|
||
margin-top: 6px;
|
||
color: var(--docs-ai-error);
|
||
font-size: 13px;
|
||
}
|
||
|
||
.ai-msg-actions {
|
||
margin-top: 8px;
|
||
display: flex;
|
||
gap: 6px;
|
||
}
|
||
|
||
.ai-msg-raw {
|
||
margin-top: 6px;
|
||
font-size: 11px;
|
||
}
|
||
|
||
.ai-msg-raw summary {
|
||
cursor: pointer;
|
||
color: var(--text-dim);
|
||
border-radius: 4px;
|
||
padding: 1px 4px;
|
||
margin: 0 -4px;
|
||
user-select: none;
|
||
}
|
||
|
||
.ai-msg-raw summary:hover {
|
||
background: var(--hover);
|
||
color: var(--text);
|
||
}
|
||
|
||
.ai-msg-raw pre {
|
||
margin: 4px 0 0;
|
||
padding: 6px 8px;
|
||
border-radius: 6px;
|
||
background: var(--color-bg-subtle);
|
||
border: 1px solid var(--border);
|
||
max-height: 200px;
|
||
overflow: auto;
|
||
white-space: pre-wrap;
|
||
word-break: break-all;
|
||
font-size: 10.5px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.ai-applied-tag {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
font-size: 11px;
|
||
color: var(--docs-ok-ink);
|
||
background: var(--docs-ok-bg);
|
||
border-radius: 999px;
|
||
padding: 2px 9px;
|
||
}
|
||
|
||
.ai-applied-tag::before {
|
||
content: '✓';
|
||
font-size: 10px;
|
||
}
|
||
|
||
/* Composer floats over the chat scroll area — no top border (agent-shell §4.6) */
|
||
.ai-composer {
|
||
border-top: none;
|
||
padding: 8px 12px 12px;
|
||
background: var(--color-bg-page);
|
||
}
|
||
|
||
.ai-composer-top {
|
||
display: flex;
|
||
align-items: center;
|
||
flex-wrap: wrap;
|
||
gap: 5px;
|
||
margin-bottom: 7px;
|
||
}
|
||
|
||
/* scope chip — guidance accent (blue is reserved for guidance/onboarding) */
|
||
.ai-scope-hint {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
padding: 3px 10px;
|
||
border-radius: var(--radius-30);
|
||
background: var(--docs-brand-ghost);
|
||
font-size: var(--text-caption);
|
||
color: var(--color-brand-secondary);
|
||
font-weight: 500;
|
||
}
|
||
|
||
.ai-scope-hint::before {
|
||
content: '';
|
||
width: 5px;
|
||
height: 5px;
|
||
border-radius: 50%;
|
||
background: currentColor;
|
||
}
|
||
|
||
.ai-scope-row {
|
||
margin-bottom: 7px;
|
||
}
|
||
|
||
.ai-scope-hint .ai-scope-label,
|
||
.ai-scope-hint .ai-scope-clear {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
border: none;
|
||
background: none;
|
||
padding: 0;
|
||
font: inherit;
|
||
color: inherit;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ai-scope-hint .ai-scope-clear {
|
||
opacity: 0.65;
|
||
}
|
||
|
||
.ai-scope-hint .ai-scope-clear:hover {
|
||
opacity: 1;
|
||
}
|
||
|
||
.ai-scope-preview {
|
||
margin-top: 6px;
|
||
padding: 7px 10px;
|
||
border: 1px solid var(--color-border-default);
|
||
border-radius: var(--radius-8);
|
||
background: var(--color-bg-page);
|
||
font-size: var(--text-caption);
|
||
line-height: 1.5;
|
||
color: var(--color-text-secondary);
|
||
max-height: 96px;
|
||
overflow-y: auto;
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
}
|
||
|
||
/* in-answer citation links: click selects and scrolls to the cited block */
|
||
.ai-md .ai-md-nav {
|
||
color: var(--accent);
|
||
text-decoration: underline dotted;
|
||
text-underline-offset: 2px;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ai-md .ai-md-nav:hover {
|
||
text-decoration-style: solid;
|
||
}
|
||
|
||
/* queued-edit anchor highlight inside the document (decoration, never document data) */
|
||
.ai-queue-anchor {
|
||
background: var(--docs-paper-ai-anchor-bg);
|
||
border-bottom: 2px dashed var(--docs-paper-ai-anchor-line);
|
||
cursor: pointer;
|
||
}
|
||
|
||
/* floating Ask-AI entry that follows the text selection */
|
||
.ai-ask-trigger {
|
||
position: fixed;
|
||
z-index: 59;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
padding: 5px 10px;
|
||
border: 1px solid var(--border);
|
||
border-radius: 999px;
|
||
background: var(--surface);
|
||
color: var(--color-ai-action);
|
||
font-size: 14px;
|
||
font-weight: 500;
|
||
box-shadow: var(--docs-shadow-menu);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ai-ask-trigger:hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
/* anchored ask popover (shared look with the slides one, docs tokens) */
|
||
.ai-ask-pop {
|
||
position: fixed;
|
||
z-index: 60;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8px;
|
||
padding: 12px;
|
||
border: 1px solid var(--border);
|
||
border-radius: var(--radius-12);
|
||
background: var(--surface);
|
||
box-shadow: var(--docs-shadow-menu);
|
||
}
|
||
|
||
.ai-ask-pop-close {
|
||
position: absolute;
|
||
top: 10px;
|
||
right: 10px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 20px;
|
||
height: 20px;
|
||
padding: 0;
|
||
border: none;
|
||
border-radius: 6px;
|
||
background: transparent;
|
||
color: var(--text-dim);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ai-ask-pop-close:hover {
|
||
background: var(--hover);
|
||
color: var(--text);
|
||
}
|
||
|
||
.ai-ask-pop-close:focus-visible {
|
||
outline: 2px solid var(--accent);
|
||
outline-offset: 1px;
|
||
}
|
||
|
||
.ai-ask-pop-title {
|
||
padding-right: 24px;
|
||
font-size: 12.5px;
|
||
font-weight: 600;
|
||
color: var(--text);
|
||
}
|
||
|
||
.ai-ask-pop-sub {
|
||
margin-top: -4px;
|
||
font-size: 11.5px;
|
||
color: var(--text-dim);
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.ai-ask-pop-input {
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
padding: 7px 10px;
|
||
border: 1px solid var(--border);
|
||
border-radius: var(--radius-8);
|
||
background: var(--color-bg-page);
|
||
color: var(--text);
|
||
font-family: inherit;
|
||
font-size: 13px;
|
||
outline: none;
|
||
}
|
||
|
||
.ai-ask-pop-input:focus {
|
||
border-color: var(--accent);
|
||
}
|
||
|
||
.ai-ask-pop-chips {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 6px;
|
||
}
|
||
|
||
.ai-ask-chip {
|
||
padding: 3px 9px;
|
||
border: 1px solid var(--border);
|
||
border-radius: 999px;
|
||
background: transparent;
|
||
color: var(--color-text-secondary);
|
||
font-size: 11.5px;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ai-ask-chip:hover {
|
||
background: var(--hover);
|
||
color: var(--text);
|
||
}
|
||
|
||
.ai-ask-pop-foot {
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
gap: 8px;
|
||
}
|
||
|
||
.ai-ask-cancel,
|
||
.ai-ask-confirm {
|
||
padding: 5px 12px;
|
||
border-radius: var(--radius-6);
|
||
font-size: 12px;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ai-ask-cancel {
|
||
border: 1px solid var(--border);
|
||
background: transparent;
|
||
color: var(--color-text-secondary);
|
||
}
|
||
|
||
.ai-ask-cancel:hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.ai-ask-cancel:disabled {
|
||
opacity: 0.45;
|
||
cursor: default;
|
||
}
|
||
|
||
.ai-ask-confirm {
|
||
border: 1px solid transparent;
|
||
background: var(--color-ai-action);
|
||
color: var(--color-ai-action-text);
|
||
}
|
||
|
||
.ai-ask-confirm:hover:not(:disabled) {
|
||
background: var(--color-ai-action-hover);
|
||
}
|
||
|
||
.ai-ask-confirm:disabled {
|
||
opacity: 0.45;
|
||
cursor: default;
|
||
}
|
||
|
||
/* queue card above the composer */
|
||
.ai-queue {
|
||
margin-bottom: 8px;
|
||
border: 1px solid var(--border);
|
||
border-radius: var(--radius-12);
|
||
background: var(--color-bg-subtle);
|
||
overflow: hidden;
|
||
}
|
||
|
||
.ai-queue-head {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
padding: 8px 10px;
|
||
}
|
||
|
||
.ai-queue-title {
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
color: var(--text);
|
||
}
|
||
|
||
.ai-queue-count {
|
||
font-size: 11px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.ai-queue-fold {
|
||
margin-left: auto;
|
||
display: inline-flex;
|
||
padding: 2px;
|
||
border: none;
|
||
background: transparent;
|
||
color: var(--color-text-secondary);
|
||
cursor: pointer;
|
||
transition: transform var(--transition-fast);
|
||
}
|
||
|
||
.ai-queue-fold.folded {
|
||
transform: rotate(-90deg);
|
||
}
|
||
|
||
.ai-queue-hint {
|
||
padding: 0 10px 6px;
|
||
font-size: 11px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.ai-queue-list {
|
||
margin: 0;
|
||
padding: 0 6px 4px;
|
||
list-style: none;
|
||
max-height: 168px;
|
||
overflow-y: auto;
|
||
}
|
||
|
||
.ai-queue-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 4px 4px 4px 6px;
|
||
border-radius: var(--radius-6);
|
||
font-size: 12px;
|
||
color: var(--text);
|
||
cursor: default;
|
||
}
|
||
|
||
.ai-queue-row:hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.ai-queue-row.stale {
|
||
opacity: 0.5;
|
||
text-decoration: line-through;
|
||
}
|
||
|
||
.ai-queue-ord {
|
||
flex-shrink: 0;
|
||
width: 14px;
|
||
text-align: center;
|
||
font-size: 11px;
|
||
color: var(--color-text-tertiary);
|
||
}
|
||
|
||
.ai-queue-text {
|
||
flex: 1;
|
||
min-width: 0;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.ai-queue-target {
|
||
margin-right: 5px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.ai-queue-target::after {
|
||
content: ' ·';
|
||
}
|
||
|
||
.ai-queue-edit-input {
|
||
flex: 1;
|
||
min-width: 0;
|
||
padding: 2px 6px;
|
||
border: 1px solid var(--accent);
|
||
border-radius: var(--radius-6);
|
||
background: var(--color-bg-page);
|
||
color: var(--text);
|
||
font-family: inherit;
|
||
font-size: 12px;
|
||
outline: none;
|
||
}
|
||
|
||
.ai-queue-row-actions {
|
||
display: flex;
|
||
gap: 2px;
|
||
flex-shrink: 0;
|
||
opacity: 0;
|
||
}
|
||
|
||
.ai-queue-row:hover .ai-queue-row-actions {
|
||
opacity: 1;
|
||
}
|
||
|
||
.ai-queue-row-btn {
|
||
display: inline-flex;
|
||
padding: 2px;
|
||
border: none;
|
||
border-radius: var(--radius-6);
|
||
background: transparent;
|
||
color: var(--color-text-secondary);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ai-queue-row-btn:hover {
|
||
background: var(--active-bg);
|
||
color: var(--text);
|
||
}
|
||
|
||
.ai-queue-foot {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
padding: 6px 10px 8px;
|
||
}
|
||
|
||
.ai-queue-confirm {
|
||
flex: 1;
|
||
min-width: 0;
|
||
font-size: 11.5px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.ai-queue-discard {
|
||
padding: 4px 10px;
|
||
border: 1px solid var(--border);
|
||
border-radius: var(--radius-6);
|
||
background: transparent;
|
||
color: var(--color-text-secondary);
|
||
font-size: 11.5px;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ai-queue-discard:hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.ai-queue-send {
|
||
margin-left: auto;
|
||
padding: 4px 12px;
|
||
border: 1px solid transparent;
|
||
border-radius: var(--radius-6);
|
||
background: var(--accent);
|
||
color: var(--docs-on-accent);
|
||
font-size: 11.5px;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ai-queue-send:disabled,
|
||
.ai-queue-discard:disabled {
|
||
opacity: 0.45;
|
||
cursor: default;
|
||
}
|
||
|
||
/* composer card — 16px radius, default border, production float shadow */
|
||
.ai-input-box {
|
||
border: 1px solid var(--color-border-default);
|
||
border-radius: var(--radius-16);
|
||
background: var(--color-bg-page);
|
||
box-shadow: var(--docs-shadow-composer);
|
||
transition:
|
||
border-color var(--transition-fast),
|
||
box-shadow var(--transition-fast);
|
||
}
|
||
|
||
/* textarea: 16px / 24px fixed line-height (chat body size), auto-grow band
|
||
* (resting height matches the sheets panel, 25% taller than default) */
|
||
.ai-input-box textarea {
|
||
display: block;
|
||
width: 100%;
|
||
resize: none;
|
||
border: none;
|
||
background: none;
|
||
border-radius: var(--radius-16) var(--radius-16) 0 0;
|
||
/* vertical gaps live on margin, not padding: textarea padding scrolls away
|
||
* with the content, so clipped lines would sit flush against chips/footer */
|
||
padding: 0 14px;
|
||
margin: 12px 0 4px;
|
||
font-size: 16px;
|
||
font-family: inherit;
|
||
line-height: 24px;
|
||
outline: none;
|
||
color: var(--color-text-primary);
|
||
min-height: 48px;
|
||
max-height: 168px;
|
||
overflow-y: auto;
|
||
}
|
||
|
||
.ai-input-box textarea::placeholder {
|
||
color: var(--color-text-tertiary);
|
||
}
|
||
|
||
.ai-input-footer {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
padding: 4px 8px 8px 10px;
|
||
}
|
||
|
||
.ai-input-footer .ai-send-btn {
|
||
margin-left: auto;
|
||
}
|
||
|
||
/* attach — brand-supplied paperclip art, 20×20 (5/9 of the 36px enter button), same as the sheets panel */
|
||
.ai-attach-btn {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 20px;
|
||
height: 20px;
|
||
flex-shrink: 0;
|
||
border: none;
|
||
background: transparent;
|
||
cursor: pointer;
|
||
padding: 0;
|
||
transition: all var(--transition-fast);
|
||
}
|
||
|
||
.ai-attach-btn img {
|
||
display: block;
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
|
||
.ai-attach-btn:hover {
|
||
filter: brightness(0.7);
|
||
}
|
||
|
||
/* track-changes pill: quiet gray when off, guide-blue tinted when on */
|
||
.ai-track-btn {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
height: 24px;
|
||
padding: 0 10px;
|
||
flex-shrink: 0;
|
||
border: 1px solid var(--color-border-default);
|
||
border-radius: var(--radius-30);
|
||
background: none;
|
||
color: var(--color-text-secondary);
|
||
font-size: var(--text-caption);
|
||
font-weight: 500;
|
||
cursor: pointer;
|
||
transition: all var(--transition-fast);
|
||
}
|
||
|
||
.ai-track-btn:hover {
|
||
background: var(--color-bg-subtle);
|
||
color: var(--color-text-primary);
|
||
}
|
||
|
||
.ai-track-btn .ai-track-dot {
|
||
width: 6px;
|
||
height: 6px;
|
||
border-radius: 50%;
|
||
background: var(--color-border-strong);
|
||
}
|
||
|
||
.ai-track-btn.on {
|
||
border-color: var(--docs-brand-ring);
|
||
background: var(--docs-brand-ghost-weak);
|
||
color: var(--color-brand-secondary);
|
||
}
|
||
|
||
.ai-track-btn.on .ai-track-dot {
|
||
background: var(--color-brand-secondary);
|
||
}
|
||
|
||
/* attachment chips above the composer */
|
||
.ai-attachments {
|
||
display: flex;
|
||
gap: 8px;
|
||
/* single row inside the prompt box, above the textarea (Genspark composer style):
|
||
extra images run past the box edge and scroll horizontally.
|
||
scroll (not auto) + zero bottom padding: the always-present 4px scrollbar lane
|
||
doubles as the bottom padding, so overflowing never grows the strip and
|
||
shifts its content up */
|
||
overflow-x: scroll;
|
||
/* side insets are transparent borders, not padding: overflow clips at the
|
||
padding edge, so side padding would let scrolled items slide flush against
|
||
the box edges — borders keep the 14px gaps while scrolling */
|
||
padding: 13px 0 0;
|
||
border-inline: 14px solid transparent;
|
||
margin-bottom: -6px;
|
||
}
|
||
|
||
.ai-attachments > * {
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
/* The 4px scrollbar lane is always reserved (no layout jump when it appears);
|
||
the thumb is painted only while scrolling (.is-scrolling from the strip's onScroll) */
|
||
.ai-attachments::-webkit-scrollbar {
|
||
height: 4px;
|
||
}
|
||
|
||
.ai-attachments::-webkit-scrollbar-thumb {
|
||
border-radius: 2px;
|
||
background: transparent;
|
||
}
|
||
|
||
.ai-attachments.is-scrolling::-webkit-scrollbar-thumb {
|
||
background: var(--docs-scroll-thumb);
|
||
}
|
||
|
||
/* Image attachments: square thumbnail with a round dark remove button on its corner */
|
||
.ai-attachment-thumb {
|
||
position: relative;
|
||
}
|
||
|
||
.ai-attachment-thumb img {
|
||
display: block;
|
||
width: 56px;
|
||
height: 56px;
|
||
object-fit: cover;
|
||
border-radius: 12px;
|
||
}
|
||
|
||
.ai-attachment-thumb-remove {
|
||
position: absolute;
|
||
top: -10px;
|
||
right: -2px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 18px;
|
||
height: 18px;
|
||
padding: 0;
|
||
border: none;
|
||
border-radius: 50%;
|
||
background: var(--docs-chip-remove-bg);
|
||
color: var(--docs-chip-remove-ink);
|
||
font-size: 15px;
|
||
font-weight: 700;
|
||
line-height: 1;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ai-attachment-thumb-remove:hover {
|
||
background: var(--docs-chip-remove-hover);
|
||
}
|
||
|
||
/* The card's 1px border shifts its absolutely-positioned button inward by 1px
|
||
on both axes; land the borderless thumbs' button on the exact same spot */
|
||
.ai-attachment-thumb .ai-attachment-thumb-remove {
|
||
top: -9px;
|
||
right: -1px;
|
||
}
|
||
|
||
/* image thumb before its preview arrives (or when reading fails): neutral tile + type icon */
|
||
.ai-attachment-thumb-pending {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 56px;
|
||
height: 56px;
|
||
border-radius: 12px;
|
||
background: var(--bg-content);
|
||
}
|
||
|
||
.ai-attachment-thumb .ai-attachment-thumb-pending img {
|
||
width: 26px;
|
||
height: 26px;
|
||
}
|
||
|
||
/* Non-image attachments (pdf, xlsx, …): fixed-width bordered card — brand type
|
||
icon + truncated name and size, same height and remove button as the thumbs */
|
||
.ai-attachment-card {
|
||
position: relative;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
width: 190px;
|
||
height: 56px;
|
||
padding: 0 14px 0 8px;
|
||
border: 1px solid var(--color-border-default);
|
||
border-radius: 12px;
|
||
background: var(--bg-content);
|
||
}
|
||
|
||
/* the type icon sits in its own bordered white tile, like the Genspark card */
|
||
.ai-attachment-card-icon {
|
||
display: flex;
|
||
flex-shrink: 0;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 40px;
|
||
height: 40px;
|
||
border-radius: 10px;
|
||
background: var(--surface);
|
||
}
|
||
|
||
.ai-attachment-card-icon img {
|
||
display: block;
|
||
width: 26px;
|
||
height: 26px;
|
||
}
|
||
|
||
.ai-attachment-card-meta {
|
||
display: flex;
|
||
flex: 1;
|
||
flex-direction: column;
|
||
gap: 1px;
|
||
min-width: 0;
|
||
}
|
||
|
||
.ai-attachment-card-name {
|
||
overflow: hidden;
|
||
font-size: 13px;
|
||
font-weight: 500;
|
||
color: var(--text-primary);
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.ai-attachment-card-size {
|
||
margin-top: 4px;
|
||
font-size: 11px;
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
/* attachments echoed on a sent user message (read-only: no remove button, smaller thumbs) */
|
||
.ai-msg-attachments {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 6px;
|
||
margin-bottom: 6px;
|
||
}
|
||
|
||
.ai-msg-attachments .ai-attachment-thumb img {
|
||
width: 44px;
|
||
height: 44px;
|
||
border-radius: 8px;
|
||
}
|
||
|
||
.ai-msg-attachments .ai-attachment-card {
|
||
width: auto;
|
||
max-width: 190px;
|
||
height: 44px;
|
||
background: var(--surface);
|
||
}
|
||
|
||
.ai-msg-attachments .ai-attachment-card-icon {
|
||
width: 32px;
|
||
height: 32px;
|
||
background: var(--surface-subtle);
|
||
}
|
||
|
||
.ai-msg-attachments .ai-attachment-card-icon img {
|
||
width: 22px;
|
||
height: 22px;
|
||
}
|
||
|
||
.ai-attachment-chip {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
padding: 2px 4px 2px 9px;
|
||
border-radius: 999px;
|
||
border: 1px solid var(--border);
|
||
background: var(--docs-chip-bg);
|
||
font-size: 11.5px;
|
||
color: var(--text);
|
||
max-width: 100%;
|
||
}
|
||
|
||
.ai-attachment-chip svg {
|
||
flex-shrink: 0;
|
||
color: var(--word-blue);
|
||
}
|
||
|
||
.ai-attachment-remove {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 16px;
|
||
height: 16px;
|
||
border: none;
|
||
border-radius: 50%;
|
||
background: none;
|
||
color: var(--text-dim);
|
||
font-size: 13px;
|
||
line-height: 1;
|
||
cursor: pointer;
|
||
padding: 0;
|
||
}
|
||
|
||
.ai-attachment-remove:hover {
|
||
background: var(--hover);
|
||
color: var(--text);
|
||
}
|
||
|
||
.ai-attach-notice {
|
||
margin-bottom: 7px;
|
||
font-size: 11.5px;
|
||
color: var(--docs-ai-error);
|
||
}
|
||
|
||
/* whole-panel drop target highlight */
|
||
.ai-panel-dragover {
|
||
outline: 2px dashed var(--word-blue);
|
||
outline-offset: -4px;
|
||
}
|
||
|
||
.ai-input-hint {
|
||
font-size: var(--text-caption);
|
||
color: var(--color-text-tertiary);
|
||
user-select: none;
|
||
min-width: 0;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
/* icon-only enter key: transparent button chrome, visuals come from brand-supplied PNGs
|
||
* (gray arrow = disabled, black arrow = enabled), 36×36, same as the sheets panel */
|
||
.ai-send-btn {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 36px;
|
||
height: 36px;
|
||
padding: 0;
|
||
flex-shrink: 0;
|
||
border: none;
|
||
border-radius: 35%;
|
||
background: transparent;
|
||
cursor: pointer;
|
||
transition: all var(--transition-fast);
|
||
}
|
||
|
||
.ai-send-btn img {
|
||
display: block;
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
|
||
.ai-send-btn:hover:not(:disabled) {
|
||
filter: brightness(0.92);
|
||
}
|
||
|
||
.ai-send-btn:active:not(:disabled) {
|
||
filter: brightness(0.88);
|
||
transform: scale(0.98);
|
||
}
|
||
|
||
.ai-send-btn:disabled {
|
||
cursor: default;
|
||
}
|
||
|
||
/* Stop button while generating: brand-supplied art (white square on black), transparent button chrome */
|
||
.ai-send-btn.ai-stop-btn {
|
||
background: transparent;
|
||
}
|
||
|
||
.ai-send-btn.ai-stop-btn:hover {
|
||
filter: brightness(0.92);
|
||
}
|
||
|
||
/* ================= status bar ================= */
|
||
|
||
.status-bar {
|
||
flex-shrink: 0;
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
padding: 0 12px;
|
||
height: 24px;
|
||
font-size: 11.5px;
|
||
/* neutral chrome, unified with slides/sheets — no app-brand tint */
|
||
color: var(--text-dim);
|
||
background: var(--docs-statusbar-bg);
|
||
border-top: 1px solid var(--docs-statusbar-border);
|
||
}
|
||
|
||
.status-left {
|
||
display: flex;
|
||
align-items: center;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.status-item {
|
||
margin-right: 14px;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
/* Word: clicking the word count in the status bar opens the word-count dialog */
|
||
.status-wordcount {
|
||
border: none;
|
||
background: none;
|
||
color: inherit;
|
||
font: inherit;
|
||
padding: 0;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.status-wordcount:hover {
|
||
text-decoration: underline;
|
||
}
|
||
|
||
.status-msg {
|
||
opacity: 0.85;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.status-right {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.zoom-btn {
|
||
border: none;
|
||
background: none;
|
||
color: inherit;
|
||
font-size: 14px;
|
||
cursor: pointer;
|
||
width: 20px;
|
||
height: 20px;
|
||
border-radius: 3px;
|
||
line-height: 1;
|
||
}
|
||
|
||
.zoom-btn:hover {
|
||
background: var(--docs-statusbar-hover);
|
||
}
|
||
|
||
.zoom-slider {
|
||
width: 110px;
|
||
accent-color: var(--docs-zoom-slider);
|
||
height: 3px;
|
||
}
|
||
|
||
.zoom-value {
|
||
min-width: 38px;
|
||
text-align: right;
|
||
}
|
||
|
||
/* ================= modal ================= */
|
||
|
||
.modal-backdrop {
|
||
position: fixed;
|
||
inset: 0;
|
||
background: var(--docs-overlay);
|
||
backdrop-filter: blur(4px);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
z-index: 100;
|
||
}
|
||
|
||
.modal {
|
||
width: 440px;
|
||
background: var(--surface);
|
||
border-radius: 16px;
|
||
padding: 22px 24px;
|
||
box-shadow: var(--docs-shadow-modal);
|
||
}
|
||
|
||
.modal h2 {
|
||
margin: 0 0 16px;
|
||
font-size: 17px;
|
||
}
|
||
|
||
.modal label {
|
||
display: block;
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
margin-bottom: 12px;
|
||
}
|
||
|
||
.modal input {
|
||
display: block;
|
||
width: 100%;
|
||
margin-top: 4px;
|
||
height: 34px;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 4px;
|
||
padding: 0 10px;
|
||
font-size: 13px;
|
||
outline: none;
|
||
}
|
||
|
||
.modal input:focus {
|
||
border-color: var(--word-blue);
|
||
}
|
||
|
||
.modal select {
|
||
display: block;
|
||
width: 100%;
|
||
margin-top: 4px;
|
||
height: 34px;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 4px;
|
||
padding: 0 6px;
|
||
font-size: 13px;
|
||
outline: none;
|
||
background: var(--surface);
|
||
}
|
||
|
||
/* Genspark DS modal footer buttons: secondary = bg-subtle, primary = black (#232425) */
|
||
.modal-actions button {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
height: 32px;
|
||
padding: 0 14px;
|
||
border: 1px solid var(--color-border-default);
|
||
border-radius: 12px;
|
||
background: var(--color-bg-page);
|
||
color: var(--color-text-primary);
|
||
font-size: 13px;
|
||
font-weight: 500;
|
||
cursor: pointer;
|
||
transition: all var(--transition-fast);
|
||
}
|
||
|
||
.modal-actions button:hover:not(:disabled) {
|
||
background: var(--color-bg-subtle);
|
||
color: var(--color-text-primary);
|
||
}
|
||
|
||
.modal-actions button:active:not(:disabled) {
|
||
filter: brightness(0.88);
|
||
transform: scale(0.98);
|
||
}
|
||
|
||
.modal-actions button:focus-visible {
|
||
outline: none;
|
||
box-shadow: 0 0 0 3px var(--docs-focus-ring);
|
||
}
|
||
|
||
.modal-actions button:disabled {
|
||
opacity: 0.4;
|
||
cursor: not-allowed;
|
||
}
|
||
|
||
.modal-actions button.primary,
|
||
.modal-actions .btn-primary {
|
||
border-color: var(--color-btn-primary);
|
||
background: var(--color-btn-primary);
|
||
color: var(--color-btn-primary-text);
|
||
}
|
||
|
||
.modal-actions button.primary:hover:not(:disabled),
|
||
.modal-actions .btn-primary:hover:not(:disabled) {
|
||
border-color: var(--color-btn-primary-hover);
|
||
background: var(--color-btn-primary-hover);
|
||
color: var(--color-btn-primary-text);
|
||
}
|
||
|
||
/* ---- keyboard shortcuts sheet ---- */
|
||
|
||
.modal-shortcuts {
|
||
width: 620px;
|
||
max-height: min(78vh, 720px);
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.modal-shortcuts .sc-filter {
|
||
display: block;
|
||
width: 100%;
|
||
height: 34px;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 8px;
|
||
padding: 0 10px;
|
||
font-size: 13px;
|
||
outline: none;
|
||
}
|
||
|
||
.modal-shortcuts .sc-filter:focus {
|
||
border-color: var(--word-blue);
|
||
}
|
||
|
||
.modal-shortcuts .sc-list {
|
||
flex: 1;
|
||
overflow-y: auto;
|
||
margin-top: 14px;
|
||
padding-right: 4px;
|
||
}
|
||
|
||
.modal-shortcuts .sc-group + .sc-group {
|
||
margin-top: 18px;
|
||
}
|
||
|
||
.modal-shortcuts .sc-group h3 {
|
||
margin: 0 0 6px;
|
||
font-size: 11px;
|
||
font-weight: 600;
|
||
letter-spacing: 0.04em;
|
||
text-transform: uppercase;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.modal-shortcuts .sc-row {
|
||
display: flex;
|
||
align-items: baseline;
|
||
justify-content: space-between;
|
||
gap: 16px;
|
||
padding: 5px 0;
|
||
border-bottom: 1px solid var(--border);
|
||
font-size: 13px;
|
||
}
|
||
|
||
.modal-shortcuts .sc-row:last-child {
|
||
border-bottom: none;
|
||
}
|
||
|
||
.modal-shortcuts .sc-keys {
|
||
flex: none;
|
||
font-family: inherit;
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
background: var(--hover);
|
||
border-radius: 6px;
|
||
padding: 2px 8px;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.modal-shortcuts .sc-empty {
|
||
margin: 24px 0;
|
||
text-align: center;
|
||
font-size: 13px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.modal-actions {
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
gap: 8px;
|
||
margin-top: 18px;
|
||
}
|
||
|
||
/* ---- Genspark DS form dialogs (password prompts + Protect Document) ---- */
|
||
|
||
.modal.gs-form {
|
||
padding: 24px;
|
||
box-shadow: var(--docs-shadow-modal-gs);
|
||
}
|
||
|
||
.modal.gs-form h2 {
|
||
margin: 0 0 8px;
|
||
font-size: 16px;
|
||
font-weight: 600;
|
||
letter-spacing: -0.01em;
|
||
}
|
||
|
||
.gs-form .modal-desc {
|
||
font-size: 13px;
|
||
line-height: 1.6;
|
||
color: var(--color-text-secondary);
|
||
margin: 0 0 20px;
|
||
}
|
||
|
||
.gs-form label.fld {
|
||
display: block;
|
||
font-size: 13px;
|
||
font-weight: 500;
|
||
color: var(--color-text-primary);
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
/* the "(optional)" suffix stays lighter than the label itself */
|
||
.gs-form .fld-opt {
|
||
font-weight: 400;
|
||
color: var(--color-text-tertiary);
|
||
}
|
||
|
||
.gs-form .fld input {
|
||
display: block;
|
||
width: 100%;
|
||
margin-top: 0;
|
||
height: 38px;
|
||
border: 1px solid var(--color-border-default);
|
||
border-radius: 12px;
|
||
padding: 0 12px;
|
||
font-size: 13px;
|
||
background: var(--surface);
|
||
color: var(--color-text-primary);
|
||
outline: none;
|
||
transition:
|
||
border-color var(--transition-fast),
|
||
box-shadow var(--transition-fast);
|
||
}
|
||
|
||
.gs-form .fld input:hover:not(:focus):not(.invalid) {
|
||
border-color: var(--border-strong);
|
||
}
|
||
|
||
.gs-form .fld input:focus {
|
||
border-color: var(--docs-input-focus);
|
||
box-shadow: 0 0 0 3px var(--docs-input-ring);
|
||
}
|
||
|
||
.gs-form .fld input.invalid {
|
||
border-color: var(--color-error);
|
||
}
|
||
|
||
.gs-form .fld input.invalid:focus {
|
||
box-shadow: 0 0 0 3px var(--docs-error-ring);
|
||
}
|
||
|
||
/* side-by-side password + confirm pair */
|
||
.gs-form .fld-row {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 12px;
|
||
}
|
||
|
||
/* wrapper positioning the shared .pwd-eye toggle (defined below) inside a
|
||
gs-form field */
|
||
.pwd-wrap {
|
||
position: relative;
|
||
display: block;
|
||
margin-top: 6px;
|
||
}
|
||
|
||
.gs-form .pwd-wrap input {
|
||
padding-right: 40px;
|
||
}
|
||
|
||
.fld-error {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
font-size: 12px;
|
||
color: var(--color-error);
|
||
margin: 6px 0 0;
|
||
}
|
||
|
||
.fld-error svg {
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.gs-form .fld-hint {
|
||
font-size: 12px;
|
||
line-height: 1.6;
|
||
color: var(--color-text-tertiary);
|
||
margin: -8px 0 16px;
|
||
}
|
||
|
||
/* mockup g-actions spec: 36px buttons, 12px gap, 24px above the footer */
|
||
.gs-form .modal-actions {
|
||
gap: 12px;
|
||
margin-top: 24px;
|
||
}
|
||
|
||
.gs-form .modal-actions button {
|
||
height: 36px;
|
||
padding: 0 18px;
|
||
}
|
||
|
||
.modal select {
|
||
display: block;
|
||
width: 100%;
|
||
margin-top: 4px;
|
||
height: 34px;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 4px;
|
||
padding: 0 6px;
|
||
font-size: 13px;
|
||
outline: none;
|
||
background: var(--surface);
|
||
}
|
||
|
||
.modal select:focus {
|
||
border-color: var(--word-blue);
|
||
}
|
||
|
||
/* Shared dropdown (@genoffice/ui gs-dd) app sizing: modal dialogs keep the old
|
||
`.modal select` footprint; ribbon/table/page-number rows scope their own
|
||
width/height below */
|
||
.modal .gs-dd {
|
||
display: flex;
|
||
width: 100%;
|
||
margin-top: 4px;
|
||
}
|
||
|
||
.modal .gs-dd-btn {
|
||
height: 34px;
|
||
border-radius: 4px;
|
||
padding: 0 6px 0 8px;
|
||
font-size: 13px;
|
||
}
|
||
|
||
.pgnum-row .gs-dd {
|
||
width: 180px;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
/* wrap-text picker on the Picture Format tab (was select.rb-select) */
|
||
.rb-wrap-dd {
|
||
width: 128px;
|
||
}
|
||
|
||
.rb-wrap-dd .gs-dd-btn {
|
||
height: 28px;
|
||
}
|
||
|
||
.rb-wrap-dd .gs-dd-btn:disabled {
|
||
opacity: 0.55;
|
||
}
|
||
|
||
.table-border-opts .gs-dd {
|
||
width: 72px;
|
||
}
|
||
|
||
.table-border-opts .gs-dd-btn {
|
||
height: 22px;
|
||
}
|
||
|
||
/* ---- Protect Document dialog (Review > Protect, Word's Password Protect layout) ---- */
|
||
|
||
.modal.protect-dialog {
|
||
width: 520px;
|
||
max-height: calc(100vh - 80px);
|
||
overflow-y: auto;
|
||
}
|
||
|
||
.protect-dialog .protect-section-title {
|
||
margin: 24px 0 14px;
|
||
padding-top: 16px;
|
||
border-top: 1px solid var(--color-border-default);
|
||
font-size: 13px;
|
||
font-weight: 600;
|
||
color: var(--color-text-primary);
|
||
}
|
||
|
||
.protect-dialog .modal-desc + .protect-section-title {
|
||
margin-top: 0;
|
||
padding-top: 0;
|
||
border-top: none;
|
||
}
|
||
|
||
/* checkbox / radio rows: the native input is visually replaced by the .ctl
|
||
box (18px, black checked state per the Genspark DS palette) */
|
||
.protect-dialog label.protect-check {
|
||
position: relative;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
margin-bottom: 10px;
|
||
font-size: 13px;
|
||
color: var(--color-text-primary);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.protect-dialog label.protect-check input {
|
||
position: absolute;
|
||
opacity: 0;
|
||
width: 18px;
|
||
height: 18px;
|
||
margin: 0;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.protect-dialog .protect-check .ctl {
|
||
flex: 0 0 18px;
|
||
width: 18px;
|
||
height: 18px;
|
||
border: 1.5px solid var(--border-strong);
|
||
background: var(--surface);
|
||
position: relative;
|
||
transition:
|
||
border-color var(--transition-fast),
|
||
background var(--transition-fast),
|
||
box-shadow var(--transition-fast);
|
||
}
|
||
|
||
.protect-dialog .protect-check input[type='checkbox'] + .ctl {
|
||
border-radius: 5px;
|
||
}
|
||
|
||
.protect-dialog .protect-check input[type='checkbox']:checked + .ctl {
|
||
border-color: var(--color-btn-primary);
|
||
background: var(--color-btn-primary);
|
||
}
|
||
|
||
.protect-dialog .protect-check input[type='checkbox']:checked + .ctl::after {
|
||
content: '';
|
||
position: absolute;
|
||
left: 5px;
|
||
top: 1.5px;
|
||
width: 4px;
|
||
height: 8px;
|
||
border: solid var(--color-btn-primary-text);
|
||
border-width: 0 2px 2px 0;
|
||
transform: rotate(45deg);
|
||
}
|
||
|
||
.protect-dialog .protect-check input[type='radio'] + .ctl {
|
||
border-radius: 50%;
|
||
}
|
||
|
||
.protect-dialog .protect-check input[type='radio']:checked + .ctl {
|
||
border-color: var(--color-btn-primary);
|
||
box-shadow: inset 0 0 0 4.5px var(--color-btn-primary);
|
||
}
|
||
|
||
.protect-dialog .protect-check input:focus-visible + .ctl {
|
||
box-shadow: 0 0 0 3px var(--docs-focus-ring);
|
||
}
|
||
|
||
.protect-dialog .protect-check input[type='radio']:checked:focus-visible + .ctl {
|
||
/* the checked dot and the focus ring are both box-shadows: they must be combined */
|
||
box-shadow:
|
||
inset 0 0 0 4.5px var(--color-btn-primary),
|
||
0 0 0 3px var(--docs-focus-ring);
|
||
}
|
||
|
||
.protect-dialog .protect-check input:disabled + .ctl {
|
||
opacity: 0.4;
|
||
}
|
||
|
||
.protect-dialog label.protect-check:has(> input:disabled) {
|
||
color: var(--color-text-tertiary);
|
||
cursor: default;
|
||
}
|
||
|
||
/* the four Word protection modes, indented under the enable checkbox */
|
||
.protect-dialog .protect-modes {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 2px 16px;
|
||
margin: 0 0 14px 26px;
|
||
}
|
||
|
||
.protect-dialog .protect-modes .protect-check {
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
/* ---- password prompt dialog (open password / password to modify) ---- */
|
||
|
||
/* the quoted file name in the description can be arbitrarily long */
|
||
.pwd-dialog .modal-desc {
|
||
overflow-wrap: anywhere;
|
||
}
|
||
|
||
/* wrong password: shake the field; the red border / ring / error line come
|
||
from the shared gs-form invalid + fld-error rules */
|
||
.pwd-dialog .fld.has-error .pwd-wrap {
|
||
animation: pwd-shake 0.4s ease;
|
||
}
|
||
|
||
@keyframes pwd-shake {
|
||
0%,
|
||
100% {
|
||
transform: translateX(0);
|
||
}
|
||
20% {
|
||
transform: translateX(-6px);
|
||
}
|
||
40% {
|
||
transform: translateX(6px);
|
||
}
|
||
60% {
|
||
transform: translateX(-4px);
|
||
}
|
||
80% {
|
||
transform: translateX(4px);
|
||
}
|
||
}
|
||
|
||
/* show/hide toggle inside the field */
|
||
.pwd-eye {
|
||
position: absolute;
|
||
top: 50%;
|
||
right: 6px;
|
||
transform: translateY(-50%);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 28px;
|
||
height: 28px;
|
||
padding: 0;
|
||
border: none;
|
||
border-radius: 8px;
|
||
background: none;
|
||
color: var(--color-text-tertiary);
|
||
cursor: pointer;
|
||
transition:
|
||
color var(--transition-fast),
|
||
background var(--transition-fast);
|
||
}
|
||
|
||
.pwd-eye:hover:not(:disabled) {
|
||
background: var(--color-bg-subtle);
|
||
color: var(--color-text-primary);
|
||
}
|
||
|
||
.pwd-eye:focus-visible {
|
||
outline: none;
|
||
box-shadow: 0 0 0 3px var(--docs-focus-ring);
|
||
}
|
||
|
||
.pwd-eye:disabled {
|
||
opacity: 0.4;
|
||
cursor: default;
|
||
}
|
||
|
||
/* ---- print dialog (Word-style: page preview + range options) ---- */
|
||
|
||
.modal.print-dialog {
|
||
width: min(880px, calc(100vw - 64px));
|
||
}
|
||
|
||
.print-dialog-body {
|
||
display: flex;
|
||
gap: 18px;
|
||
height: min(600px, calc(100vh - 220px));
|
||
}
|
||
|
||
/* while the dialog is open the pagination preview is only its (hidden) print source */
|
||
@media screen {
|
||
.app:has(.modal.print-dialog) .pagination-preview {
|
||
visibility: hidden;
|
||
}
|
||
}
|
||
|
||
.print-preview-pane {
|
||
flex: 1;
|
||
min-width: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
border: 1px solid var(--border);
|
||
border-radius: 8px;
|
||
background: var(--hover);
|
||
overflow: hidden;
|
||
}
|
||
|
||
.print-preview-page {
|
||
flex: 1;
|
||
min-height: 0;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* the cloned .pv-page keeps its own paper background/shadow; only the flow margin goes */
|
||
.print-preview-page .pv-page {
|
||
margin: 0;
|
||
}
|
||
|
||
.print-preview-nav {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 12px;
|
||
padding: 7px 10px;
|
||
border-top: 1px solid var(--border);
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.print-preview-nav button {
|
||
width: 26px;
|
||
height: 24px;
|
||
border: 1px solid var(--border);
|
||
border-radius: 6px;
|
||
background: var(--surface);
|
||
color: var(--text);
|
||
font-size: 15px;
|
||
line-height: 1;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.print-preview-nav button:hover:not(:disabled) {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.print-preview-nav button:disabled {
|
||
opacity: 0.4;
|
||
cursor: default;
|
||
}
|
||
|
||
.print-preview-empty {
|
||
flex: 1;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: var(--text-dim);
|
||
font-size: 13px;
|
||
}
|
||
|
||
.print-options {
|
||
width: 240px;
|
||
flex-shrink: 0;
|
||
overflow-y: auto;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 12px;
|
||
}
|
||
|
||
.print-options fieldset {
|
||
margin: 0;
|
||
padding: 8px 10px 6px;
|
||
border: 1px solid var(--border);
|
||
border-radius: 8px;
|
||
}
|
||
|
||
.print-options legend {
|
||
padding: 0 4px;
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.print-options .print-radio {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 7px;
|
||
margin: 0 0 7px;
|
||
font-size: 13px;
|
||
color: var(--text);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.print-options .print-radio input {
|
||
display: inline-block;
|
||
width: auto;
|
||
height: auto;
|
||
margin: 0;
|
||
accent-color: var(--accent);
|
||
}
|
||
|
||
.print-options .print-range-input {
|
||
display: block;
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
height: 28px;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 4px;
|
||
padding: 0 6px;
|
||
font-size: 12px;
|
||
outline: none;
|
||
background: var(--surface);
|
||
}
|
||
|
||
.print-options .print-range-input:focus {
|
||
border-color: var(--accent);
|
||
}
|
||
|
||
.print-options .print-range-input:disabled {
|
||
opacity: 0.55;
|
||
}
|
||
|
||
.print-options .print-range-input.invalid {
|
||
border-color: var(--danger);
|
||
}
|
||
|
||
.print-page-count {
|
||
margin-top: auto;
|
||
padding: 2px 2px 0;
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
/* provider tabs in AI settings */
|
||
|
||
.provider-tabs {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 6px;
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
.provider-tab {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
border: 1px solid var(--border-strong);
|
||
background: var(--surface);
|
||
border-radius: 999px;
|
||
padding: 5px 13px;
|
||
font-size: 12.5px;
|
||
cursor: pointer;
|
||
color: inherit;
|
||
}
|
||
|
||
.provider-tab:hover {
|
||
border-color: var(--word-blue);
|
||
}
|
||
|
||
.provider-tab-active {
|
||
border-color: var(--word-blue);
|
||
background: color-mix(in srgb, var(--word-blue) 10%, var(--surface));
|
||
color: var(--word-blue);
|
||
font-weight: 600;
|
||
}
|
||
|
||
.provider-dot {
|
||
width: 6px;
|
||
height: 6px;
|
||
border-radius: 50%;
|
||
background: var(--docs-ok-dot);
|
||
}
|
||
|
||
/* ProseMirror basics */
|
||
|
||
/* pre-wrap, NOT prosemirror-view's break-spaces (its runtime-injected sheet
|
||
loads after this one, so the selector is doubled to win): Word hangs the
|
||
space at a line break into the margin, while break-spaces reserves width
|
||
for it — every line wraps a word early and a space that fits nowhere takes
|
||
a whole blank line (narrow table cells), inflating layout vs Word. */
|
||
.ProseMirror.ProseMirror {
|
||
white-space: pre-wrap;
|
||
}
|
||
|
||
/* The pagination-preview clone must lay out exactly like the editor canvas it
|
||
was measured on. ProseMirror's whitespace/ligature rules are part of that
|
||
layout: without them whitespace-only lines collapse in the clone, every
|
||
following page window drifts upward, and page-boundary content prints twice
|
||
(once clipped at a page bottom, once at the next page top). */
|
||
.pv-content {
|
||
word-wrap: break-word;
|
||
white-space: pre-wrap;
|
||
-webkit-font-variant-ligatures: none;
|
||
font-variant-ligatures: none;
|
||
font-feature-settings: 'liga' 0;
|
||
}
|
||
|
||
/* Word pair-kerns only under w:kern; doc-style-css turns kerning back on where
|
||
the document asks (Chromium would otherwise kern every Latin run). */
|
||
.page-wrap,
|
||
.doc-page,
|
||
.pv-page {
|
||
font-kerning: none;
|
||
}
|
||
|
||
.ProseMirror:focus {
|
||
outline: none;
|
||
}
|
||
|
||
/* ---- find & replace ---- */
|
||
|
||
.find-panel {
|
||
position: absolute;
|
||
top: 8px;
|
||
right: 20px;
|
||
z-index: 60;
|
||
/* the panel overlaps the ribbon-tabs row, which is a window drag region;
|
||
* drag regions hit-test by rectangle regardless of z-order and would
|
||
* swallow every click (notably the × close button) */
|
||
-webkit-app-region: no-drag;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 6px;
|
||
box-shadow: var(--docs-shadow-menu);
|
||
padding: 8px 10px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 6px;
|
||
}
|
||
|
||
.workspace {
|
||
position: relative;
|
||
}
|
||
|
||
.find-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
}
|
||
|
||
.find-input {
|
||
width: 200px;
|
||
height: 28px;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 4px;
|
||
padding: 0 8px;
|
||
font-size: 13px;
|
||
outline: none;
|
||
}
|
||
|
||
.find-input:focus {
|
||
border-color: var(--word-blue);
|
||
}
|
||
|
||
.find-count {
|
||
min-width: 44px;
|
||
font-size: 11px;
|
||
color: var(--text-dim);
|
||
text-align: center;
|
||
}
|
||
|
||
.find-btn {
|
||
width: 24px;
|
||
height: 24px;
|
||
border: none;
|
||
background: none;
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
font-size: 15px;
|
||
line-height: 1;
|
||
color: var(--text);
|
||
}
|
||
|
||
.find-btn:hover:not(:disabled) {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.find-btn:disabled {
|
||
color: var(--border-strong);
|
||
cursor: default;
|
||
}
|
||
|
||
.find-close {
|
||
font-size: 12px;
|
||
}
|
||
|
||
.find-action {
|
||
height: 26px;
|
||
padding: 0 10px;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 4px;
|
||
background: var(--surface);
|
||
cursor: pointer;
|
||
font-size: 12px;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.find-action:hover:not(:disabled) {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.find-action:disabled {
|
||
color: var(--border-strong);
|
||
cursor: default;
|
||
}
|
||
|
||
.search-hit {
|
||
background: var(--docs-paper-hit-bg);
|
||
border-radius: 2px;
|
||
}
|
||
|
||
.search-hit-active {
|
||
background: var(--docs-paper-hit-active-bg);
|
||
color: var(--docs-paper-hit-active-ink);
|
||
}
|
||
|
||
/* ---- autosave toggle (pill in the title bar) ---- */
|
||
|
||
.autosave-toggle {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
cursor: pointer;
|
||
margin-left: 4px;
|
||
margin-right: 4px;
|
||
-webkit-app-region: no-drag;
|
||
user-select: none;
|
||
}
|
||
|
||
.autosave-toggle input {
|
||
display: none;
|
||
}
|
||
|
||
.autosave-knob {
|
||
width: 26px;
|
||
height: 14px;
|
||
border-radius: 7px;
|
||
background: var(--border-strong);
|
||
position: relative;
|
||
transition: background 0.15s;
|
||
}
|
||
|
||
.autosave-knob::after {
|
||
content: '';
|
||
position: absolute;
|
||
top: 2px;
|
||
left: 2px;
|
||
width: 10px;
|
||
height: 10px;
|
||
border-radius: 50%;
|
||
background: var(--docs-knob-dot);
|
||
transition: left 0.15s;
|
||
}
|
||
|
||
.autosave-toggle.on .autosave-knob {
|
||
background: var(--word-blue);
|
||
}
|
||
|
||
.autosave-toggle.on .autosave-knob::after {
|
||
left: 14px;
|
||
}
|
||
|
||
.autosave-text {
|
||
font-size: 11px;
|
||
color: var(--text-dim);
|
||
white-space: nowrap;
|
||
}
|
||
|
||
/* ---- editable table cells ---- */
|
||
|
||
.doc-table td[contenteditable='true'] {
|
||
cursor: text;
|
||
user-select: text;
|
||
-webkit-user-select: text;
|
||
}
|
||
|
||
.doc-table td[contenteditable='true']:focus {
|
||
outline: 2px solid var(--word-blue);
|
||
outline-offset: -2px;
|
||
}
|
||
|
||
/* ---- print / export PDF: only the document itself ---- */
|
||
|
||
@media print {
|
||
html,
|
||
body,
|
||
#root {
|
||
height: auto !important;
|
||
overflow: visible !important;
|
||
background: none !important;
|
||
}
|
||
|
||
.ribbon,
|
||
.status-bar,
|
||
.ai-dock,
|
||
.nav-pane,
|
||
.ruler,
|
||
.find-panel {
|
||
display: none !important;
|
||
}
|
||
|
||
/* editor-only affordance chips: Word/LibreOffice print the object (or nothing),
|
||
never a type label — the label text must not leak into exported PDFs */
|
||
.doc-protected-label {
|
||
display: none !important;
|
||
}
|
||
|
||
/* header/footer measuring probe (hf-dom.ts): a body-level .doc-page box.
|
||
Chromium print fragmentation counts it as content after the last visible
|
||
sheet, materializing that sheet's forced break-after into a trailing blank
|
||
page in every grouped mixed-paper export. */
|
||
#hf-strip-probe {
|
||
display: none !important;
|
||
}
|
||
|
||
/* more editor-only markers whose text leaks into the exported text layer:
|
||
transparent ink still emits glyphs into the PDF, so they must not paint at
|
||
all. visibility (not display) keeps their layout box — pagination sliced
|
||
the canvas with these boxes in the flow. */
|
||
.doc-sectbreak-label {
|
||
visibility: hidden !important;
|
||
}
|
||
|
||
/* content-control chrome: Word prints the content only, no box or alias tag */
|
||
.has-sdt {
|
||
outline: none !important;
|
||
background: none !important;
|
||
}
|
||
|
||
.has-sdt::before {
|
||
display: none !important;
|
||
}
|
||
|
||
/* degraded blocks (passthrough chips): no dashed box or chip fill in print.
|
||
Geometry (padding/margin) must stay — pagination sliced the canvas with
|
||
these boxes in the flow. */
|
||
.doc-protected {
|
||
border-color: transparent !important;
|
||
background: none !important;
|
||
}
|
||
|
||
.app,
|
||
.workspace,
|
||
.editor-scroll {
|
||
display: block !important;
|
||
overflow: visible !important;
|
||
height: auto !important;
|
||
padding: 0 !important;
|
||
background: none !important;
|
||
}
|
||
|
||
.doc-zoom {
|
||
zoom: 1 !important;
|
||
width: auto !important;
|
||
}
|
||
|
||
.page-wrap {
|
||
margin: 0 !important;
|
||
}
|
||
|
||
.doc-page {
|
||
width: auto !important;
|
||
min-height: 0 !important;
|
||
box-shadow: none !important;
|
||
margin: 0 !important;
|
||
}
|
||
|
||
/* Direct PDF uses the same section page box as the editor. Preview export
|
||
already supplies one fixed-size .pv-page per sheet and keeps its clone fluid. */
|
||
.app:not(:has(.pagination-preview)) .doc-page {
|
||
min-height: var(--page-h, 1056px) !important;
|
||
}
|
||
|
||
.page-break-before {
|
||
break-before: page;
|
||
}
|
||
|
||
.doc-field-pagebreak {
|
||
break-after: page;
|
||
visibility: hidden;
|
||
height: 0;
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
.img-resize-handle,
|
||
.doc-image-anchor-marker {
|
||
display: none !important;
|
||
}
|
||
|
||
/* opacity:0 chrome still emits glyphs into the PDF text layer */
|
||
.doc-move-handle {
|
||
display: none !important;
|
||
}
|
||
|
||
/* selection highlight is UI state: the auto-selected first node must not
|
||
print a blue plate/border */
|
||
.ProseMirror-focused .doc-protected.ProseMirror-selectednode {
|
||
border-color: transparent !important;
|
||
outline: none !important;
|
||
background: none !important;
|
||
}
|
||
|
||
/* continuous-flow printing still delegates to Chromium auto-pagination; canvas page gaps don't take part */
|
||
.page-gap,
|
||
.page-float-host {
|
||
display: none !important;
|
||
}
|
||
|
||
/* margin annotations are canvas-only chrome */
|
||
.page-margin-annotations {
|
||
display: none !important;
|
||
}
|
||
|
||
/* header/footer guide line is editor chrome: Word never prints it.
|
||
Keep the 2px padding so pagination geometry doesn't shift. */
|
||
.page-hf-header,
|
||
.page-hf-footer {
|
||
border-color: transparent !important;
|
||
}
|
||
|
||
.page-wrap.has-markup-area {
|
||
padding-right: 0 !important;
|
||
}
|
||
|
||
/* mixed-paper grouped export: pages outside the current group don't print */
|
||
.pv-page.pv-print-skip {
|
||
display: none !important;
|
||
}
|
||
|
||
/* with the pagination preview open, print its output: each .pv-page is exactly one sheet */
|
||
.app:has(.pagination-preview) > *:not(.pagination-preview) {
|
||
display: none !important;
|
||
}
|
||
|
||
/* print fragmentation supports flex containers poorly; preview shells all degrade to plain blocks.
|
||
The zoom mirrors the screen's device scale (print-zoom.ts): the job prints at
|
||
the inverse scale, so font metrics round like the measured canvas did */
|
||
.pagination-preview {
|
||
position: static;
|
||
background: none;
|
||
display: block;
|
||
zoom: var(--pv-print-zoom, 1);
|
||
}
|
||
|
||
.pv-scroll {
|
||
display: block;
|
||
}
|
||
|
||
.pv-toolbar {
|
||
display: none !important;
|
||
}
|
||
|
||
.pv-scroll {
|
||
overflow: visible;
|
||
padding: 0;
|
||
}
|
||
|
||
.pv-page {
|
||
margin: 0;
|
||
box-shadow: none;
|
||
break-after: page;
|
||
/* 2px shorter than the paper, so print rounding overflow doesn't produce blank pages */
|
||
height: calc(var(--pv-page-h, 1056px) - 2px) !important;
|
||
}
|
||
|
||
.pv-page:last-child {
|
||
break-after: auto;
|
||
}
|
||
|
||
/* grouped export: the job's last page is rarely :last-child; its forced
|
||
break emitted one trailing blank sheet per merged chunk */
|
||
.pv-page.pv-print-tail {
|
||
break-after: auto;
|
||
}
|
||
|
||
.pv-pageno {
|
||
display: none;
|
||
}
|
||
|
||
/* forced breaks are disabled inside the clone, and page-break fields keep placeholders matching canvas measurement */
|
||
.pv-clip .page-break-before {
|
||
break-before: auto;
|
||
}
|
||
|
||
.pv-clip .doc-field-pagebreak {
|
||
break-after: auto;
|
||
height: auto;
|
||
}
|
||
|
||
.editor-area {
|
||
display: block !important;
|
||
overflow: visible !important;
|
||
height: auto !important;
|
||
}
|
||
|
||
.split-pane,
|
||
.read-exit {
|
||
display: none !important;
|
||
}
|
||
}
|
||
|
||
/* ================= View tab: view modes / gridlines / split / windows ================= */
|
||
|
||
/* editor column: document scroller on top, optional split pane below */
|
||
.editor-area {
|
||
flex: 1;
|
||
min-width: 0;
|
||
min-height: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
/* ---- Read mode: chrome hidden, document only, Esc to exit ---- */
|
||
|
||
.read-mode .ribbon,
|
||
.read-mode .ai-dock,
|
||
.read-mode .nav-pane,
|
||
.read-mode .find-panel,
|
||
.read-mode .comments-pane,
|
||
.read-mode .split-pane {
|
||
display: none !important;
|
||
}
|
||
|
||
.read-mode .editor-scroll {
|
||
background: var(--docs-pv-canvas);
|
||
padding-top: 44px;
|
||
}
|
||
|
||
.read-exit {
|
||
position: fixed;
|
||
top: 52px;
|
||
right: 24px;
|
||
z-index: 60;
|
||
height: 30px;
|
||
padding: 0 14px;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 15px;
|
||
background: var(--surface);
|
||
box-shadow: var(--docs-shadow-chip);
|
||
font-size: 12px;
|
||
color: var(--text);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.read-exit:hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
/* ---- Web Layout: document fills the window width, no page chrome ---- */
|
||
|
||
.view-web {
|
||
width: 100%;
|
||
}
|
||
|
||
.view-web .doc-page {
|
||
width: auto;
|
||
min-height: 0;
|
||
box-shadow: none;
|
||
padding: 24px 40px 80px;
|
||
}
|
||
|
||
.view-web .page-hf {
|
||
display: none;
|
||
}
|
||
|
||
/* ---- Outline view: headings only, still editable ---- */
|
||
|
||
.view-outline .doc-page > :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
|
||
display: none;
|
||
}
|
||
|
||
.view-outline .doc-page {
|
||
min-height: 400px;
|
||
column-count: auto;
|
||
}
|
||
|
||
.view-outline .doc-page h1,
|
||
.view-outline .doc-page h2,
|
||
.view-outline .doc-page h3,
|
||
.view-outline .doc-page h4,
|
||
.view-outline .doc-page h5,
|
||
.view-outline .doc-page h6 {
|
||
position: relative;
|
||
padding-left: 22px;
|
||
}
|
||
|
||
.view-outline .doc-page h1 {
|
||
margin-left: 0;
|
||
}
|
||
.view-outline .doc-page h2 {
|
||
margin-left: 26px;
|
||
}
|
||
.view-outline .doc-page h3 {
|
||
margin-left: 52px;
|
||
}
|
||
.view-outline .doc-page h4 {
|
||
margin-left: 78px;
|
||
}
|
||
.view-outline .doc-page h5 {
|
||
margin-left: 104px;
|
||
}
|
||
.view-outline .doc-page h6 {
|
||
margin-left: 130px;
|
||
}
|
||
|
||
/* Word outline view marks each heading with a ⊕ handle */
|
||
.view-outline .doc-page h1::before,
|
||
.view-outline .doc-page h2::before,
|
||
.view-outline .doc-page h3::before,
|
||
.view-outline .doc-page h4::before,
|
||
.view-outline .doc-page h5::before,
|
||
.view-outline .doc-page h6::before {
|
||
content: '⊕';
|
||
position: absolute;
|
||
left: 0;
|
||
color: var(--docs-paper-ink-faint);
|
||
font-size: 0.8em;
|
||
top: 0.25em;
|
||
}
|
||
|
||
/* ---- Gridlines: alignment grid inside the text area (content-box = inside margins) ---- */
|
||
|
||
.show-grid .doc-page {
|
||
background-image:
|
||
linear-gradient(to right, var(--docs-paper-grid) 1px, transparent 1px),
|
||
linear-gradient(to bottom, var(--docs-paper-grid) 1px, transparent 1px);
|
||
background-size: 24px 24px;
|
||
background-origin: content-box;
|
||
background-clip: content-box;
|
||
}
|
||
|
||
/* ---- Split: read-only second pane with independent scrolling ---- */
|
||
|
||
.split-pane {
|
||
height: 42%;
|
||
min-height: 160px;
|
||
flex: none;
|
||
display: flex;
|
||
flex-direction: column;
|
||
border-top: 3px solid var(--border-strong);
|
||
background: var(--canvas);
|
||
}
|
||
|
||
.split-pane-bar {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 3px 12px;
|
||
font-size: 11.5px;
|
||
color: var(--text-dim);
|
||
background: var(--surface);
|
||
border-bottom: 1px solid var(--border);
|
||
}
|
||
|
||
.split-pane-close {
|
||
border: none;
|
||
background: none;
|
||
cursor: pointer;
|
||
font-size: 15px;
|
||
line-height: 1;
|
||
color: var(--text);
|
||
padding: 0 4px;
|
||
}
|
||
|
||
.split-pane-close:hover {
|
||
color: var(--word-blue);
|
||
}
|
||
|
||
.split-pane-scroll {
|
||
flex: 1;
|
||
overflow-y: auto;
|
||
padding: 18px 24px 60px;
|
||
}
|
||
|
||
/* preview copy: not interactive (clicks/links disabled) */
|
||
.split-doc {
|
||
pointer-events: none;
|
||
}
|
||
|
||
/* ---- Design → Watermark: diagonal ghost text across the page ---- */
|
||
|
||
.page-watermark {
|
||
position: absolute;
|
||
inset: 0;
|
||
z-index: 2;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
transform: rotate(-35deg);
|
||
font-size: 84px;
|
||
font-weight: 600;
|
||
letter-spacing: 0.1em;
|
||
color: var(--docs-paper-watermark);
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
pointer-events: none;
|
||
user-select: none;
|
||
}
|
||
|
||
/* ---- Design → Themes/Colors: accent color preview dots in dropdowns ---- */
|
||
|
||
.theme-accent-row {
|
||
display: inline-flex;
|
||
gap: 2px;
|
||
margin-right: 8px;
|
||
vertical-align: middle;
|
||
}
|
||
|
||
.theme-accent-dot {
|
||
display: inline-block;
|
||
width: 10px;
|
||
height: 10px;
|
||
border-radius: 2px;
|
||
border: 1px solid var(--docs-swatch-outline);
|
||
}
|
||
|
||
/* ---- References → Footnotes/Endnotes: reference marker + page-bottom notes area ---- */
|
||
|
||
/* bare superscript number inheriting body ink (Word parity: brackets/color would leak into
|
||
exports and change line widths); accent is a hover/selection-only affordance */
|
||
.doc-note-ref {
|
||
cursor: default;
|
||
/* Word's reference-mark superscript is ~65% of the run size; the UA default
|
||
(font-size:smaller) rendered it visibly larger and taller than Word */
|
||
font-size: 0.65em;
|
||
}
|
||
|
||
.doc-note-ref:hover {
|
||
color: var(--docs-paper-accent);
|
||
}
|
||
|
||
.ProseMirror-focused .doc-note-ref.ProseMirror-selectednode {
|
||
color: var(--docs-paper-accent);
|
||
outline: 2px solid var(--word-blue);
|
||
border-radius: 2px;
|
||
}
|
||
|
||
/* ---- Phonetic guide (w:ruby): native ruby, kept from stretching the line ---- */
|
||
|
||
ruby.doc-ruby {
|
||
ruby-position: over;
|
||
}
|
||
|
||
ruby.doc-ruby rt {
|
||
font-size: 0.5em;
|
||
line-height: 1;
|
||
}
|
||
|
||
.ProseMirror-focused ruby.doc-ruby.ProseMirror-selectednode {
|
||
outline: 2px solid var(--word-blue);
|
||
border-radius: 2px;
|
||
}
|
||
|
||
/* ---- Inline equations: atomic MathML node flowing with the text ---- */
|
||
|
||
.doc-inline-math {
|
||
display: inline-block;
|
||
vertical-align: baseline;
|
||
padding: 0 1px;
|
||
border-radius: 2px;
|
||
cursor: default;
|
||
}
|
||
|
||
.doc-inline-math:hover {
|
||
background: color-mix(in srgb, var(--word-blue) 10%, transparent);
|
||
}
|
||
|
||
.ProseMirror-focused .doc-inline-math.ProseMirror-selectednode {
|
||
outline: 2px solid var(--word-blue);
|
||
background: color-mix(in srgb, var(--word-blue) 14%, transparent);
|
||
}
|
||
|
||
.doc-inline-math math {
|
||
font-size: 1em;
|
||
}
|
||
|
||
.doc-formula-edit {
|
||
position: absolute;
|
||
top: 2px;
|
||
right: 2px;
|
||
padding: 1px 6px;
|
||
font-size: 11px;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 4px;
|
||
background: var(--surface);
|
||
color: var(--text-dim);
|
||
cursor: pointer;
|
||
opacity: 0;
|
||
transition: opacity 0.12s;
|
||
}
|
||
|
||
.doc-protected-formula {
|
||
position: relative;
|
||
}
|
||
|
||
.doc-protected-formula:hover .doc-formula-edit {
|
||
opacity: 1;
|
||
}
|
||
|
||
.doc-formula-edit:hover {
|
||
background: var(--active-bg);
|
||
color: var(--text);
|
||
}
|
||
|
||
.page-notes {
|
||
position: relative;
|
||
box-sizing: border-box;
|
||
width: var(--page-w, 816px);
|
||
margin: -100px auto 0;
|
||
padding: 8px 96px 28px;
|
||
background: var(--page-bg, var(--docs-paper));
|
||
font-size: 9pt;
|
||
line-height: 1.5;
|
||
color: var(--docs-paper-ink-dim);
|
||
}
|
||
|
||
/* canvas twin of the pv separators: Word's 2in rule, drawn at the row's bottom */
|
||
.page-notes::before {
|
||
content: '';
|
||
display: block;
|
||
width: min(2in, 100%);
|
||
height: 11px;
|
||
border-bottom: 1px solid var(--docs-paper-ink-faint);
|
||
margin-bottom: 6px;
|
||
}
|
||
|
||
/* endnotes follow the footnote block as their own area: cancel the pull-up overlap and stack below */
|
||
.page-notes + .page-endnotes {
|
||
margin-top: 0;
|
||
padding-top: 0;
|
||
}
|
||
|
||
/* Word: endnotes sit right after the last body line, not at the page bottom —
|
||
anchored at the measured flow end (inline top), over the paper's padded tail */
|
||
.page-endnotes-anchored {
|
||
position: absolute;
|
||
left: 0;
|
||
right: 0;
|
||
width: auto;
|
||
margin: 0;
|
||
padding-top: 8px;
|
||
background: none;
|
||
}
|
||
|
||
.page-note {
|
||
display: flex;
|
||
align-items: baseline;
|
||
gap: 6px;
|
||
padding: 1px 0;
|
||
}
|
||
|
||
/* Word parity: area markers are superscript body-ink; the flex row ignores
|
||
vertical-align, so raise off the shared baseline instead */
|
||
.page-note sup {
|
||
flex: none;
|
||
position: relative;
|
||
top: -0.33em;
|
||
font-size: 0.65em;
|
||
}
|
||
|
||
.page-note-text {
|
||
flex: 1;
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
}
|
||
|
||
.page-note-btn {
|
||
flex: none;
|
||
border: none;
|
||
background: none;
|
||
padding: 0 3px;
|
||
font-size: 11px;
|
||
color: var(--docs-paper-ink-faint);
|
||
cursor: pointer;
|
||
visibility: hidden;
|
||
}
|
||
|
||
.page-note:hover .page-note-btn {
|
||
visibility: visible;
|
||
}
|
||
|
||
.page-note-btn:hover {
|
||
color: var(--word-blue);
|
||
}
|
||
|
||
/* ---- References → Index: XE marks (invisible in Word, a small chip on screen) ---- */
|
||
|
||
.doc-xe-mark {
|
||
display: inline-block;
|
||
font-size: 9px;
|
||
line-height: 1.3;
|
||
color: var(--docs-paper-xe-ink);
|
||
background: var(--docs-paper-xe-bg);
|
||
border: 1px dashed var(--docs-paper-xe-border);
|
||
border-radius: 2px;
|
||
padding: 0 3px;
|
||
margin: 0 1px;
|
||
vertical-align: baseline;
|
||
cursor: default;
|
||
}
|
||
|
||
.doc-xe-mark::before {
|
||
content: 'XE:' attr(data-xe-term);
|
||
}
|
||
|
||
.ProseMirror-focused .doc-xe-mark.ProseMirror-selectednode {
|
||
outline: 2px solid var(--word-blue);
|
||
}
|
||
|
||
/* ---- Context menu: editor right-click menu ---- */
|
||
|
||
.ctx-menu {
|
||
position: fixed;
|
||
z-index: 200;
|
||
padding: 5px 0;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 8px;
|
||
box-shadow: var(--docs-shadow-ctx);
|
||
font-size: 13px;
|
||
}
|
||
|
||
.ctx-item {
|
||
display: flex;
|
||
align-items: center;
|
||
width: 100%;
|
||
border: none;
|
||
background: none;
|
||
padding: 6px 14px;
|
||
font-size: 13px;
|
||
color: var(--text);
|
||
cursor: pointer;
|
||
text-align: left;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.ctx-item:hover:not(:disabled) {
|
||
background: var(--word-blue);
|
||
color: var(--docs-on-accent);
|
||
}
|
||
|
||
.ctx-item:hover:not(:disabled) .ctx-key {
|
||
color: var(--docs-on-accent-dim);
|
||
}
|
||
|
||
.ctx-item:disabled {
|
||
color: var(--text-dim);
|
||
opacity: 0.55;
|
||
cursor: default;
|
||
}
|
||
|
||
.ctx-label {
|
||
flex: 1;
|
||
margin-right: 28px;
|
||
}
|
||
|
||
.ctx-key {
|
||
color: var(--text-dim);
|
||
font-size: 12px;
|
||
}
|
||
|
||
.ctx-arrow {
|
||
margin-left: 6px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.ctx-sep {
|
||
height: 1px;
|
||
margin: 4px 10px;
|
||
background: var(--border);
|
||
}
|
||
|
||
.ctx-item-wrap {
|
||
position: relative;
|
||
}
|
||
|
||
.ctx-submenu {
|
||
position: absolute;
|
||
top: -5px;
|
||
left: calc(100% - 4px);
|
||
min-width: 150px;
|
||
padding: 5px 0;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 8px;
|
||
box-shadow: var(--docs-shadow-ctx);
|
||
}
|
||
|
||
/* ---- Font / Paragraph dialogs ---- */
|
||
|
||
.font-dialog-row {
|
||
display: flex;
|
||
gap: 12px;
|
||
align-items: flex-end;
|
||
}
|
||
|
||
.font-dialog-row > label {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
.font-check {
|
||
display: flex !important;
|
||
align-items: center;
|
||
gap: 5px;
|
||
white-space: nowrap;
|
||
flex: none !important;
|
||
padding-bottom: 8px;
|
||
}
|
||
|
||
.font-check input[type='checkbox'] {
|
||
display: inline-block;
|
||
width: auto;
|
||
height: auto;
|
||
margin: 0;
|
||
}
|
||
|
||
.font-color-input {
|
||
padding: 2px !important;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.font-preview {
|
||
margin: 4px 0 14px;
|
||
padding: 14px 10px;
|
||
border: 1px solid var(--border);
|
||
border-radius: 4px;
|
||
text-align: center;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.para-num {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
margin-top: 4px;
|
||
}
|
||
|
||
.para-num input {
|
||
margin-top: 0 !important;
|
||
}
|
||
|
||
.para-unit {
|
||
color: var(--text-dim);
|
||
font-size: 12px;
|
||
}
|
||
|
||
.prompt-textarea {
|
||
display: block;
|
||
width: 100%;
|
||
margin-top: 4px;
|
||
border: 1px solid var(--border-strong);
|
||
border-radius: 4px;
|
||
padding: 8px 10px;
|
||
font-size: 13px;
|
||
font-family: inherit;
|
||
outline: none;
|
||
resize: vertical;
|
||
}
|
||
|
||
.prompt-textarea:focus {
|
||
border-color: var(--word-blue);
|
||
}
|
||
|
||
/* ---- Draw (ink annotations) ---- */
|
||
|
||
.ink-overlay {
|
||
position: absolute;
|
||
inset: 0;
|
||
z-index: 3;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.ink-overlay.ink-active {
|
||
pointer-events: auto;
|
||
touch-action: none;
|
||
}
|
||
|
||
.ink-tool-pen,
|
||
.ink-tool-highlighter {
|
||
cursor: crosshair;
|
||
}
|
||
|
||
.ink-tool-eraser {
|
||
cursor: cell;
|
||
}
|
||
|
||
.ink-svg {
|
||
width: 100%;
|
||
height: 100%;
|
||
display: block;
|
||
overflow: visible;
|
||
}
|
||
|
||
.ink-settings {
|
||
flex-direction: column;
|
||
gap: 4px;
|
||
justify-content: center;
|
||
}
|
||
|
||
/* 6px so the active swatch's outline (2px + 1px offset) keeps clear air */
|
||
.ink-swatches {
|
||
display: flex;
|
||
gap: 6px;
|
||
}
|
||
|
||
.ink-swatch {
|
||
width: 16px;
|
||
height: 16px;
|
||
border: 1px solid var(--docs-swatch-outline-strong);
|
||
border-radius: 3px;
|
||
cursor: pointer;
|
||
padding: 0;
|
||
}
|
||
|
||
.ink-swatch.active {
|
||
outline: 2px solid var(--accent);
|
||
outline-offset: 1px;
|
||
}
|
||
|
||
.ink-widths {
|
||
display: flex;
|
||
gap: 3px;
|
||
}
|
||
|
||
.ink-width {
|
||
width: 24px;
|
||
height: 22px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border: 1px solid transparent;
|
||
border-radius: 3px;
|
||
background: none;
|
||
cursor: pointer;
|
||
padding: 0;
|
||
}
|
||
|
||
.ink-width:hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.ink-width.active {
|
||
border-color: var(--accent);
|
||
background: var(--hover);
|
||
}
|
||
|
||
.ink-width-dot {
|
||
border-radius: 50%;
|
||
display: inline-block;
|
||
}
|
||
|
||
/* Page Number Format dialog */
|
||
.pgnum-row {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 16px;
|
||
margin: 10px 0;
|
||
font-size: 13px;
|
||
}
|
||
|
||
.pgnum-row select,
|
||
.pgnum-row input {
|
||
width: 180px;
|
||
padding: 4px 6px;
|
||
}
|
||
|
||
.pgnum-hint {
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
margin: 6px 0 0;
|
||
}
|
||
|
||
/* table border / size tools */
|
||
.table-border-opts {
|
||
display: flex;
|
||
gap: 6px;
|
||
align-items: center;
|
||
margin-top: 4px;
|
||
}
|
||
|
||
.table-border-opts input[type='color'] {
|
||
width: 28px;
|
||
height: 22px;
|
||
padding: 0;
|
||
border: 1px solid var(--border);
|
||
border-radius: 3px;
|
||
}
|
||
|
||
.table-border-opts select {
|
||
font-size: 12px;
|
||
padding: 2px 4px;
|
||
}
|
||
|
||
.table-size-inputs {
|
||
display: flex;
|
||
flex-direction: column;
|
||
/* height/width rows + the reset button must fit in the 84px ribbon-body; too much line spacing stretches it and causes jumps */
|
||
gap: 2px;
|
||
}
|
||
|
||
.table-size-inputs label {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.table-size-inputs input {
|
||
width: 56px;
|
||
padding: 2px 4px;
|
||
font-size: 12px;
|
||
}
|
||
|
||
.table-tool-button.active {
|
||
background: var(--accent-soft);
|
||
}
|
||
|
||
/* run-level format revision (w:rPrChange): amber underline hint */
|
||
.has-rpr-change {
|
||
text-decoration: underline wavy var(--docs-paper-rpr);
|
||
text-decoration-skip-ink: none;
|
||
text-underline-offset: 3px;
|
||
}
|
||
|
||
/* inline table-break cut point: zero-height dashed page-break marker (spans the page, takes no layout height) */
|
||
.page-gap-cut {
|
||
display: inline-block;
|
||
width: 0;
|
||
height: 0;
|
||
position: relative;
|
||
pointer-events: none;
|
||
}
|
||
|
||
/* safety net: a cut marker misplaced as a direct table/row child would otherwise be
|
||
wrapped in an anonymous table row, adding one line-height of phantom table height
|
||
that skews pagination measurement (#86 line shear / #93 page-count inflation) */
|
||
table > .page-gap-cut,
|
||
tbody > .page-gap-cut,
|
||
tr > .page-gap-cut {
|
||
display: none;
|
||
}
|
||
|
||
.page-gap-cut::before {
|
||
content: '';
|
||
position: absolute;
|
||
top: 0;
|
||
left: -100vw;
|
||
width: 200vw;
|
||
border-top: 2px dashed var(--docs-gap-cut);
|
||
}
|
||
|
||
/* cut markers for anchors inside read-only nested-table DOM (no PM position):
|
||
absolute overlays on the page wrap instead of inline widgets */
|
||
.page-cut-overlays {
|
||
position: absolute;
|
||
inset: 0;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.page-cut-overlay {
|
||
position: absolute;
|
||
left: 0;
|
||
width: 100%;
|
||
}
|
||
|
||
.page-cut-overlay::before {
|
||
left: 0;
|
||
width: 100%;
|
||
}
|
||
|
||
/* Word-style margin annotations: comment bubbles right of the paper + revision
|
||
change bars in the left page margin (absolute overlay, no layout height) */
|
||
.page-margin-annotations {
|
||
position: absolute;
|
||
inset: 0;
|
||
pointer-events: none;
|
||
}
|
||
|
||
/* the markup column takes real wrap width so captures include it; the paper
|
||
(in-flow, content box) keeps its position */
|
||
.page-wrap.has-markup-area {
|
||
padding-right: var(--markup-w, 0px);
|
||
}
|
||
|
||
/* percentage-centered wrap overlays must keep centering on the paper, not the widened padding box */
|
||
.page-wrap.has-markup-area .page-hf,
|
||
.page-wrap.has-markup-area .hf-variant-chips {
|
||
left: calc((100% - var(--markup-w, 0px)) / 2);
|
||
}
|
||
|
||
/* box-hosting edge strips center by offset (no translate, see .page-hf-has-boxes) on the padded wrap */
|
||
.page-wrap.has-markup-area .page-hf.page-hf-has-boxes {
|
||
left: calc(
|
||
(100% - var(--markup-w, 0px) - var(--section-content-w, calc(var(--page-w, 816px) - 120px))) / 2
|
||
);
|
||
}
|
||
|
||
/* gap strips position against the unpadded page gap: paper-centered, no markup offset */
|
||
.page-wrap.has-markup-area .page-gap-hf.page-hf-has-boxes {
|
||
left: calc((100% - var(--section-content-w, calc(var(--page-w, 816px) - 120px))) / 2);
|
||
}
|
||
|
||
.page-wrap.has-markup-area .page-watermark {
|
||
right: var(--markup-w, 0px);
|
||
}
|
||
|
||
.change-bar {
|
||
position: absolute;
|
||
width: 2px;
|
||
background: var(--docs-paper-rev-ink);
|
||
}
|
||
|
||
.comment-leaders {
|
||
position: absolute;
|
||
inset: 0;
|
||
overflow: visible;
|
||
}
|
||
|
||
.comment-leaders path {
|
||
fill: none;
|
||
stroke: var(--docs-paper-comment-line);
|
||
stroke-dasharray: 3 2;
|
||
}
|
||
|
||
.comment-bubble {
|
||
position: absolute;
|
||
box-sizing: border-box;
|
||
pointer-events: auto;
|
||
cursor: pointer;
|
||
background: var(--surface);
|
||
border: 1px solid var(--border-strong);
|
||
border-left: 3px solid var(--docs-paper-comment-line);
|
||
border-radius: 4px;
|
||
padding: 5px 8px;
|
||
font-size: 10px;
|
||
line-height: 1.35;
|
||
color: var(--text);
|
||
}
|
||
|
||
.comment-bubble-author {
|
||
font-weight: 700;
|
||
}
|
||
|
||
.comment-bubble-text {
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
}
|
||
|
||
.comment-bubble-reply {
|
||
margin-top: 4px;
|
||
padding-top: 3px;
|
||
border-top: 1px solid var(--border);
|
||
}
|
||
|
||
/* revision balloons (Deleted:/Formatted:) share the bubble frame, keyed by revision ink */
|
||
.rev-bubble {
|
||
cursor: default;
|
||
border-left-color: var(--docs-paper-rev-ink);
|
||
}
|
||
|
||
.rev-bubble .rev-bubble-label {
|
||
font-weight: 700;
|
||
}
|
||
|
||
.rev-bubble .rev-bubble-text {
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
}
|
||
|
||
.rev-bubble-del .rev-bubble-text {
|
||
text-decoration: line-through;
|
||
}
|
||
|
||
/* nested table inside a cell (read-only child table) */
|
||
/* anchored shapes/textboxes inside a cell: in-flow spacer sized to the boxes'
|
||
extent (Word grows the row), boxes positioned absolutely within it */
|
||
.doc-cell-boxes {
|
||
position: relative;
|
||
float: left;
|
||
width: 0;
|
||
overflow: visible;
|
||
}
|
||
|
||
/* the zero-width host must not collapse an absolutely-positioned box:
|
||
its own width (from the anchor extent) wins over the 100% cap */
|
||
.doc-cell-boxes > .doc-textbox {
|
||
max-width: none;
|
||
}
|
||
|
||
.doc-nested-table .doc-table {
|
||
max-width: 100%;
|
||
}
|
||
|
||
/* picture-only cell paragraph (line-height 0 inline): the image sits on the line bottom */
|
||
.doc-table .doc-p-picture > .doc-inline-img {
|
||
vertical-align: bottom;
|
||
}
|
||
|
||
/* list library galleries (bullets/numbering/multilevel) */
|
||
.list-gallery {
|
||
display: grid;
|
||
grid-template-columns: repeat(3, 1fr);
|
||
gap: 4px;
|
||
padding: 6px;
|
||
min-width: 180px;
|
||
}
|
||
|
||
/* doubled class strength: .layout-menu button (0,1,1) sets border: none and
|
||
would erase the card frame (bit the old gallery too) */
|
||
.list-gallery .list-gallery-card {
|
||
border: 1px solid var(--border);
|
||
border-radius: 4px;
|
||
background: var(--surface);
|
||
padding: 6px 8px;
|
||
font-size: 13px;
|
||
cursor: pointer;
|
||
text-align: left;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.list-gallery .list-gallery-card:hover {
|
||
border-color: var(--accent);
|
||
}
|
||
|
||
/* Word-style bullet/numbering library: header row, a "None" card, bordered
|
||
preview cards and a define-new footer (matches the multilevel gallery) */
|
||
.list-gallery-word {
|
||
grid-template-columns: repeat(3, 1fr);
|
||
min-width: 232px;
|
||
}
|
||
|
||
.list-gallery-title {
|
||
grid-column: 1 / -1;
|
||
padding: 2px 2px 0;
|
||
font-size: 11px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.list-gallery-word .list-gallery-card {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
min-height: 56px;
|
||
}
|
||
|
||
.list-gallery-word .list-gallery-card.selected {
|
||
border-color: var(--accent);
|
||
box-shadow: inset 0 0 0 1px var(--accent);
|
||
background: var(--hover);
|
||
}
|
||
|
||
.list-gallery-none {
|
||
font-size: 13px;
|
||
}
|
||
|
||
.list-gallery-glyph {
|
||
font-size: 17px;
|
||
}
|
||
|
||
.list-gallery-word .list-gallery-preview {
|
||
flex-direction: column;
|
||
align-items: stretch;
|
||
justify-content: center;
|
||
gap: 5px;
|
||
padding: 8px 9px;
|
||
}
|
||
|
||
.list-gallery-preview-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
font-size: 10px;
|
||
line-height: 1;
|
||
color: var(--text);
|
||
}
|
||
|
||
.list-gallery-preview-prefix {
|
||
min-width: 16px;
|
||
text-align: left;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.list-gallery-preview-line {
|
||
flex: 1;
|
||
height: 2px;
|
||
border-radius: 1px;
|
||
background: var(--border);
|
||
}
|
||
|
||
.list-gallery-multi {
|
||
grid-template-columns: repeat(3, 1fr);
|
||
min-width: 320px;
|
||
}
|
||
|
||
.list-gallery-card-multi {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 2px;
|
||
font-size: 10px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.list-gallery .list-gallery-define {
|
||
grid-column: 1 / -1;
|
||
border: none;
|
||
border-top: 1px solid var(--border);
|
||
background: none;
|
||
padding: 6px 8px;
|
||
font-size: 12px;
|
||
cursor: pointer;
|
||
text-align: left;
|
||
}
|
||
|
||
.list-gallery .list-gallery-define:hover {
|
||
color: var(--accent);
|
||
}
|
||
|
||
/* Define New Multilevel List dialog */
|
||
.list-define-modal {
|
||
width: 560px;
|
||
max-width: 90vw;
|
||
}
|
||
|
||
.list-define-head,
|
||
.list-define-row {
|
||
display: grid;
|
||
grid-template-columns: 36px 110px 1fr 84px 110px;
|
||
gap: 6px;
|
||
align-items: center;
|
||
}
|
||
|
||
.list-define-head {
|
||
font-size: 11px;
|
||
color: var(--text-dim);
|
||
padding: 4px 0;
|
||
}
|
||
|
||
.list-define-rows {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 4px;
|
||
max-height: 320px;
|
||
overflow-y: auto;
|
||
}
|
||
|
||
.list-define-row input,
|
||
.list-define-row select {
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
padding: 2px 4px;
|
||
}
|
||
|
||
.list-define-preview {
|
||
font-size: 12px;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
/* table style gallery cards */
|
||
.table-style-gallery {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 3px;
|
||
flex-wrap: nowrap;
|
||
max-width: 500px;
|
||
overflow-x: auto;
|
||
padding-bottom: 2px;
|
||
scrollbar-width: none;
|
||
}
|
||
|
||
.table-style-gallery::-webkit-scrollbar {
|
||
display: none;
|
||
}
|
||
|
||
.table-style-card {
|
||
display: flex;
|
||
box-sizing: border-box;
|
||
flex: 0 0 76px;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 3px;
|
||
padding: 4px 5px;
|
||
border: 1px solid transparent;
|
||
border-radius: 7px;
|
||
background: transparent;
|
||
cursor: pointer;
|
||
font-size: 10px;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.table-style-card span:last-child {
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
max-width: 68px;
|
||
}
|
||
|
||
.table-style-card:hover {
|
||
border-color: var(--border);
|
||
background: var(--hover);
|
||
}
|
||
|
||
.table-style-card.active {
|
||
border-color: var(--accent);
|
||
background: var(--accent-soft);
|
||
color: var(--text);
|
||
}
|
||
|
||
.table-style-card-grid {
|
||
box-sizing: border-box;
|
||
width: 44px;
|
||
height: 24px;
|
||
border: 1px solid var(--docs-tstyle-border);
|
||
border-top: 5px solid var(--docs-tstyle-header);
|
||
background: repeating-linear-gradient(var(--surface) 0 4px, var(--docs-tstyle-row) 4px 8px);
|
||
border-radius: 3px;
|
||
box-shadow: var(--docs-shadow-chip);
|
||
}
|
||
|
||
.table-style-card-grid.plain {
|
||
border-top: 1px solid var(--docs-tstyle-border);
|
||
background: var(--surface);
|
||
}
|
||
|
||
.table-properties-dialog {
|
||
width: min(620px, calc(100vw - 48px));
|
||
max-height: calc(100vh - 64px);
|
||
overflow-y: auto;
|
||
}
|
||
|
||
.table-properties-header {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
margin-bottom: 18px;
|
||
}
|
||
|
||
.table-properties-header-icon {
|
||
display: inline-flex;
|
||
flex: 0 0 40px;
|
||
width: 40px;
|
||
height: 40px;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border-radius: 11px;
|
||
background: var(--accent-soft);
|
||
color: var(--accent);
|
||
}
|
||
|
||
.table-properties-header .modal-desc {
|
||
margin: 2px 0 0;
|
||
}
|
||
|
||
.table-properties-card {
|
||
margin-top: 10px;
|
||
padding: 14px;
|
||
border: 1px solid var(--border);
|
||
border-radius: 10px;
|
||
background: var(--surface);
|
||
}
|
||
|
||
.table-properties-dialog h3 {
|
||
margin: 0 0 12px;
|
||
font-size: 13px;
|
||
font-weight: 600;
|
||
color: var(--text);
|
||
}
|
||
|
||
.table-properties-segments {
|
||
display: grid;
|
||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||
gap: 3px;
|
||
padding: 3px;
|
||
border-radius: 9px;
|
||
background: var(--hover);
|
||
}
|
||
|
||
.table-properties-segment {
|
||
position: relative;
|
||
min-width: 0;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.table-properties-segment input {
|
||
position: absolute;
|
||
opacity: 0;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.table-properties-segment span {
|
||
display: flex;
|
||
min-height: 32px;
|
||
padding: 0 8px;
|
||
align-items: center;
|
||
justify-content: center;
|
||
border: 1px solid transparent;
|
||
border-radius: 7px;
|
||
color: var(--text-dim);
|
||
font-size: 12px;
|
||
text-align: center;
|
||
transition:
|
||
background var(--transition-fast),
|
||
border-color var(--transition-fast),
|
||
color var(--transition-fast);
|
||
}
|
||
|
||
.table-properties-segment input:checked + span {
|
||
border-color: var(--border);
|
||
background: var(--surface);
|
||
box-shadow: var(--docs-shadow-chip);
|
||
color: var(--text);
|
||
}
|
||
|
||
.table-properties-segment input:focus-visible + span {
|
||
box-shadow: 0 0 0 3px var(--docs-focus-ring);
|
||
}
|
||
|
||
.table-properties-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
gap: 10px 16px;
|
||
margin-top: 12px;
|
||
}
|
||
|
||
.table-properties-grid > label {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 10px;
|
||
color: var(--text-dim);
|
||
font-size: 12px;
|
||
}
|
||
|
||
.table-properties-grid label > span {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
}
|
||
|
||
.table-properties-grid input {
|
||
box-sizing: border-box;
|
||
width: 70px;
|
||
height: 30px;
|
||
padding: 0 8px;
|
||
border: 1px solid var(--border);
|
||
border-radius: 6px;
|
||
background: var(--surface);
|
||
color: var(--text);
|
||
outline: none;
|
||
}
|
||
|
||
.table-properties-grid input:hover {
|
||
border-color: var(--border-strong);
|
||
}
|
||
|
||
.table-properties-grid input:focus {
|
||
border-color: var(--accent);
|
||
box-shadow: 0 0 0 3px var(--docs-focus-ring);
|
||
}
|
||
|
||
.table-properties-margin-layout {
|
||
display: grid;
|
||
grid-template-columns: minmax(0, 1fr) 148px;
|
||
align-items: center;
|
||
gap: 20px;
|
||
}
|
||
|
||
.table-properties-margin-layout .table-properties-grid {
|
||
margin-top: 0;
|
||
}
|
||
|
||
.table-margin-preview {
|
||
position: relative;
|
||
box-sizing: border-box;
|
||
width: 132px;
|
||
height: 96px;
|
||
border: 1px solid var(--border);
|
||
border-radius: 8px;
|
||
background: var(--hover);
|
||
}
|
||
|
||
.table-margin-preview-cell {
|
||
position: absolute;
|
||
inset: 24px 30px;
|
||
border: 1px solid var(--accent);
|
||
border-radius: 4px;
|
||
background: var(--accent-soft);
|
||
}
|
||
|
||
.table-margin-value {
|
||
position: absolute;
|
||
color: var(--text-dim);
|
||
font-size: 10px;
|
||
line-height: 1;
|
||
}
|
||
|
||
.table-margin-value.top,
|
||
.table-margin-value.bottom {
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
}
|
||
|
||
.table-margin-value.top {
|
||
top: 8px;
|
||
}
|
||
|
||
.table-margin-value.bottom {
|
||
bottom: 8px;
|
||
}
|
||
|
||
.table-margin-value.left,
|
||
.table-margin-value.right {
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
}
|
||
|
||
.table-margin-value.left {
|
||
left: 8px;
|
||
}
|
||
|
||
.table-margin-value.right {
|
||
right: 8px;
|
||
}
|
||
|
||
@media (max-width: 620px) {
|
||
.table-properties-segments {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
|
||
.table-properties-margin-layout {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
|
||
.table-margin-preview {
|
||
display: none;
|
||
}
|
||
}
|
||
|
||
/* comment threads: replies and resolution */
|
||
.comment-thread {
|
||
border-bottom: 1px solid var(--border);
|
||
padding-bottom: 6px;
|
||
margin-bottom: 6px;
|
||
}
|
||
|
||
.comment-thread.resolved {
|
||
opacity: 0.55;
|
||
}
|
||
|
||
.comments-resolved-group {
|
||
margin-top: 4px;
|
||
}
|
||
|
||
.comments-resolved-toggle {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
width: 100%;
|
||
padding: 6px 8px;
|
||
border: none;
|
||
background: none;
|
||
font-size: 12px;
|
||
color: var(--text-dim);
|
||
cursor: pointer;
|
||
text-align: left;
|
||
}
|
||
|
||
.comments-resolved-toggle:hover {
|
||
background: var(--hover);
|
||
}
|
||
|
||
.comments-resolved-caret {
|
||
display: inline-block;
|
||
transition: transform 0.15s;
|
||
}
|
||
|
||
.comments-resolved-caret.open {
|
||
transform: rotate(90deg);
|
||
}
|
||
|
||
.comment-resolved-badge {
|
||
font-size: 10px;
|
||
color: var(--docs-ok-ink);
|
||
border: 1px solid var(--docs-ok-border);
|
||
border-radius: 3px;
|
||
padding: 0 4px;
|
||
}
|
||
|
||
.comment-reply {
|
||
margin: 4px 8px 4px 26px;
|
||
padding: 6px 8px;
|
||
border-left: 2px solid var(--border);
|
||
background: var(--surface);
|
||
border-radius: 4px;
|
||
font-size: 12px;
|
||
}
|
||
|
||
.comment-thread-actions {
|
||
display: flex;
|
||
gap: 8px;
|
||
margin: 2px 8px 0 26px;
|
||
}
|
||
|
||
.comment-thread-actions > button {
|
||
font-size: 11px;
|
||
padding: 2px 8px;
|
||
border: 1px solid var(--border);
|
||
border-radius: 4px;
|
||
background: var(--surface);
|
||
cursor: pointer;
|
||
color: var(--text-dim);
|
||
}
|
||
|
||
.comment-reply-compose {
|
||
flex: 1;
|
||
}
|
||
|
||
.comment-reply-compose textarea {
|
||
width: 100%;
|
||
min-height: 48px;
|
||
font-size: 12px;
|
||
padding: 6px;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
/* Sliding AI dock: one persistent wrapper animates between the panel width and
|
||
* the 34px collapsed rail (Excel-parity 180ms ease); --ai-panel-width tracks
|
||
* the panel's drag-resizer */
|
||
.ai-dock {
|
||
display: flex;
|
||
flex-shrink: 0;
|
||
min-height: 0;
|
||
width: var(--ai-panel-width, 360px);
|
||
overflow: hidden;
|
||
transition: width 180ms cubic-bezier(0.4, 0, 0.2, 1);
|
||
}
|
||
|
||
.ai-dock.collapsed {
|
||
width: 34px;
|
||
}
|
||
|
||
/* while dragging the resizer, follow the pointer without easing */
|
||
.ai-dock:has(.ai-panel-resizing) {
|
||
transition: none;
|
||
}
|
||
|
||
/* the rail stretches to fill the dock while the width animates */
|
||
.ai-dock .ai-rail {
|
||
flex: 1;
|
||
width: auto;
|
||
}
|
||
|
||
@media (prefers-reduced-motion: reduce) {
|
||
.ai-dock {
|
||
transition: none;
|
||
}
|
||
}
|
||
|
||
.ai-login-btn {
|
||
margin-top: 8px;
|
||
border: 1px solid var(--accent);
|
||
border-radius: 6px;
|
||
background: var(--accent);
|
||
padding: 4px 14px;
|
||
font-size: 13px;
|
||
color: var(--docs-on-accent);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.ai-login-btn:hover {
|
||
opacity: 0.88;
|
||
}
|
||
|
||
/* ================= transient toast (save feedback) ================= */
|
||
|
||
.app-toast {
|
||
position: fixed;
|
||
top: 64px;
|
||
left: 50%;
|
||
transform: translate(-50%, -8px);
|
||
z-index: 2000;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
padding: 8px 16px;
|
||
border-radius: 8px;
|
||
background: var(--docs-toast-bg);
|
||
color: var(--docs-toast-ink);
|
||
font-size: 13px;
|
||
box-shadow: var(--docs-shadow-toast);
|
||
opacity: 0;
|
||
pointer-events: none;
|
||
transition:
|
||
opacity 0.18s ease,
|
||
transform 0.18s ease;
|
||
max-width: 60vw;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.app-toast.show {
|
||
opacity: 1;
|
||
transform: translate(-50%, 0);
|
||
}
|
||
|
||
.app-toast.error {
|
||
background: var(--docs-toast-error-bg);
|
||
}
|
||
|
||
.app-toast-icon {
|
||
width: 16px;
|
||
height: 16px;
|
||
flex: none;
|
||
}
|
||
|
||
.app-toast.success .app-toast-icon {
|
||
color: var(--docs-toast-ok);
|
||
}
|
||
|
||
/* body row (AI dock + content column) — the status bar spans only the content
|
||
column so the dock runs the full height of the window */
|
||
.app-main {
|
||
display: flex;
|
||
flex: 1;
|
||
min-height: 0;
|
||
}
|
||
|
||
.app-content {
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
/* Shape draw mode (Word parity): crosshair over the whole document while armed */
|
||
.ProseMirror.doc-shape-drawing,
|
||
.ProseMirror.doc-shape-drawing * {
|
||
cursor: crosshair !important;
|
||
}
|
||
|
||
/* Shape gallery dropdown (slides parity: grouped, outline-icon grid) */
|
||
.rb-drop-title {
|
||
font-size: 11px;
|
||
font-weight: 600;
|
||
color: var(--text-dim);
|
||
padding: 4px 2px 3px;
|
||
}
|
||
|
||
.rb-shape-gallery {
|
||
width: 264px;
|
||
max-height: 320px;
|
||
overflow-y: auto;
|
||
}
|
||
|
||
.rb-shape-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(8, 28px);
|
||
gap: 3px;
|
||
margin-bottom: 4px;
|
||
}
|
||
|
||
.rb-shape-cell {
|
||
width: 28px;
|
||
height: 28px;
|
||
border: 1px solid transparent;
|
||
border-radius: 4px;
|
||
background: none;
|
||
font-size: 15px;
|
||
line-height: 1;
|
||
color: var(--text);
|
||
cursor: pointer;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 0;
|
||
}
|
||
|
||
.rb-shape-cell:hover {
|
||
border-color: var(--accent);
|
||
background: var(--hover);
|
||
}
|
||
|
||
/* Gallery variant keeps .shape-palette's anchored-card chrome but stacks grouped grids */
|
||
.shape-palette.rb-shape-gallery {
|
||
display: block;
|
||
}
|
||
|
||
/* Whitespace-only runs: Word ignores their font size for line height (tdf#137335).
|
||
Only the run's own [data-doc-style] span carries the oversized font-size — outer
|
||
comment/ins/del spans inherit the paragraph size and contribute nothing — so zero
|
||
that span and everything nested inside it (intermediate marks, the decoration),
|
||
without touching ancestor spans that may also wrap real text. */
|
||
.doc-page .doc-ws-run,
|
||
.doc-page span[data-doc-style]:has(.doc-ws-run),
|
||
.doc-page span[data-doc-style]:has(.doc-ws-run) span {
|
||
line-height: 0;
|
||
}
|
||
|
||
/* Curly quotes in w:hint="eastAsia" runs: Word draws them with the East Asian
|
||
font at a fullwidth advance, while every macOS Chinese system face keeps them
|
||
proportional — only the bundled Noto subset matches Word's 1em cell. */
|
||
.doc-ea-quotes {
|
||
font-family: 'Noto Serif CJK SC';
|
||
}
|