.editor-page { position: fixed; top: 49px; /* navbar height */ left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; } .editor-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 1rem; border-bottom: 1px solid var(--border); background: var(--bg-card); flex-shrink: 0; } .toolbar-actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; } @media (max-width: 600px) { .editor-toolbar { flex-wrap: wrap; gap: 0.4rem; padding: 0.4rem 0.75rem; } .breadcrumb { flex: 1 1 100%; min-width: 0; } .toolbar-actions { flex: 1 1 100%; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.1rem; } } .btn-outline.active { background: var(--primary); color: #fff; } .title-input { background: transparent; border: none; border-bottom: 1px solid transparent; color: var(--text); font-size: 0.9rem; padding: 0.1rem 0.25rem; min-width: 12rem; max-width: 30rem; outline: none; } .title-input:hover, .title-input:focus { border-bottom-color: var(--border); } .editor-split { display: flex; flex: 1; overflow: hidden; min-height: 0; } .editor-pane { flex: 1; overflow: hidden; min-height: 0; border-right: 1px solid var(--border); } #editor { height: 100%; } .editor-pane .cm-editor { height: 100%; } .preview-pane { flex: 1; overflow: auto; padding: 1.5rem; background: var(--bg-card); } /* Rich text (WYSIWYG) editor container */ .editor-rich { flex: 1; overflow: auto; padding: 2rem 1.5rem; display: flex; flex-direction: column; align-items: center; background: var(--bg); } .editor-rich .milkdown { width: 100%; max-width: 720px; outline: none; cursor: text; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 2px 12px rgba(0,0,0,0.08); padding: 3rem 3.5rem; } /* Milkdown prose styles — match markdown.css */ .editor-rich .milkdown .ProseMirror { outline: none; min-height: 60vh; } .editor-rich .milkdown .ProseMirror p { margin-bottom: 1.25em; } .editor-rich .milkdown .ProseMirror ul, .editor-rich .milkdown .ProseMirror ol { padding-left: 1.5rem; } .editor-rich .milkdown .ProseMirror li { margin-bottom: 0.25em; } .editor-rich .milkdown .ProseMirror li > p { margin-bottom: 0; } /* Source/Wrap/Preview buttons hidden in rich text mode */ .source-only { display: none; } /* Link editing tooltip */ .link-tooltip { position: fixed; z-index: 200; display: none; align-items: center; gap: 0.4rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.35rem 0.5rem; box-shadow: 0 4px 16px rgba(0,0,0,0.15); } .link-tooltip.visible { display: flex; } .link-tooltip input { width: 260px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); padding: 0.2rem 0.5rem; font-size: 0.83rem; outline: none; } .link-tooltip input:focus { border-color: var(--primary); } .link-tooltip button { background: none; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-muted); cursor: pointer; font-size: 0.8rem; padding: 0.2rem 0.45rem; white-space: nowrap; line-height: 1.4; } .link-tooltip button:first-of-type { background: var(--primary); border-color: var(--primary); color: #fff; } .link-tooltip button:hover { opacity: 0.8; } /* ── Collaboration: Presence ─────────────────────────────────────────────── */ .presence-list { display: flex; align-items: center; gap: 4px; } .presence-avatar { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--bg-card); box-shadow: 0 0 0 1px var(--border); flex-shrink: 0; transition: transform 0.15s; } .presence-avatar:hover { transform: scale(1.15); } /* ── Collaboration: Comment sidebar ──────────────────────────────────────── */ .comment-sidebar { position: fixed; right: 0; top: 49px; /* below navbar */ bottom: 0; width: 260px; background: var(--bg-card); border-left: 1px solid var(--border); display: flex; flex-direction: column; z-index: 50; overflow: hidden; } .comment-sidebar-header { padding: 0.75rem 1rem; font-size: 0.85rem; font-weight: 600; border-bottom: 1px solid var(--border); flex-shrink: 0; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; } .comment-threads { flex: 1; overflow-y: auto; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.75rem; } .comment-empty { color: var(--text-muted); font-size: 0.85rem; text-align: center; margin-top: 2rem; } .comment-thread { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; } .comment-thread-label { font-size: 0.75rem; color: var(--text-muted); padding: 0.3rem 0.6rem; background: var(--border); border-bottom: 1px solid var(--border); } .comment-item { padding: 0.5rem 0.6rem; border-top: 1px solid var(--border); } .comment-item:first-of-type { border-top: none; } .comment-author { font-size: 0.75rem; font-weight: 600; color: var(--primary); margin-bottom: 0.2rem; } .comment-text { font-size: 0.85rem; line-height: 1.45; word-break: break-word; } .comment-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.25rem; } /* ── Collaboration: Comment button & form ────────────────────────────────── */ .comment-btn { position: fixed; z-index: 100; padding: 0.25rem 0.6rem; font-size: 0.78rem; background: var(--primary); color: #fff; border: none; border-radius: var(--radius); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.15); } .comment-btn:hover { opacity: 0.88; } .comment-form { position: fixed; z-index: 110; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 20px rgba(0,0,0,0.15); padding: 0.75rem; width: 280px; } .comment-form textarea { width: 100%; box-sizing: border-box; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); padding: 0.4rem 0.5rem; font-size: 0.85rem; resize: vertical; outline: none; font-family: inherit; } .comment-form textarea:focus { border-color: var(--primary); } .comment-form-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; justify-content: flex-end; } /* When comment sidebar is visible, shrink editor to avoid overlap */ .editor-page:has(~ .comment-sidebar) { right: 260px; } /* ── Collaboration: Invite modal ─────────────────────────────────────────── */ .invite-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 200; } .invite-modal-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 32px rgba(0,0,0,0.2); width: 440px; max-width: calc(100vw - 2rem); } .invite-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 0.9rem; } .invite-modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; padding: 0.1rem 0.3rem; line-height: 1; } .invite-modal-close:hover { color: var(--text); } .invite-modal-body { padding: 1rem; }