/* Markdown Editor Styling - using Rose Pine theme variables */ .editor-page { width: 100%; height: 100%; background: var(--color-base); overflow: hidden; } .markdown-editor-container { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto 1fr; height: 100%; max-width: calc(95ch + 100px); margin: 0 auto; padding: 0 20px; font-family: var(--font-body); background: var(--color-base); color: var(--color-text); gap: 0 8px; } /* Title bar */ .editor-title-bar { grid-column: 1; padding: 16px 0 8px 0; } .editor-title-bar .title-input { width: 100%; padding: 8px 0; border: none; border-bottom: 2px solid var(--color-border); background: transparent; color: var(--color-text); font-family: var(--font-heading); font-size: 24px; font-weight: 500; outline: none; } .editor-title-bar .title-input:focus { border-bottom-color: var(--color-primary); } .editor-title-bar .title-input::placeholder { color: var(--color-muted); } /* Meta row - path, tags, and publish inline */ .editor-meta-row { grid-column: 1; display: flex; gap: 24px; padding: 8px 0 16px 0; align-items: flex-end; } .editor-meta-row label { display: block; font-size: 11px; font-weight: 500; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; } .meta-path { flex-shrink: 0; } .meta-path .path-input { padding: 4px 8px; border: 1px solid var(--color-border); border-radius: 4px; background: var(--color-surface); color: var(--color-text); font-family: var(--font-mono); font-size: 13px; min-width: 150px; } .meta-path .path-input:focus { outline: none; border-color: var(--color-primary); } .meta-tags { flex: 1; } .tags-container { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .tag-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; background: var(--color-overlay); border-radius: 12px; font-size: 13px; color: var(--color-text); } .tag-remove { background: none; border: none; color: var(--color-muted); cursor: pointer; padding: 0 2px; font-size: 14px; line-height: 1; } .tag-remove:hover { color: var(--color-love); } .tag-input { padding: 4px 8px; border: 1px dashed var(--color-border); border-radius: 12px; background: transparent; color: var(--color-text); font-family: var(--font-ui); font-size: 13px; min-width: 80px; } .tag-input:focus { outline: none; border-color: var(--color-primary); border-style: solid; } /* Editor content wrapper */ .editor-content-wrapper { grid-column: 1; display: flex; flex-direction: column; min-height: 0; position: relative; /* For remote cursor overlay positioning */ } .editor-content { flex: 1; padding: 20px; overflow-y: auto; outline: none; min-height: 700px; line-height: var(--spacing-line-height); background: var(--color-base); border: 1px solid var(--color-overlay); color: var(--color-text); /* break-spaces ensures trailing whitespace takes up space and allows cursor placement */ white-space-collapse: break-spaces; /* Wrap long words/URLs only when they would overflow */ overflow-wrap: break-word; } .editor-content:focus { border: 1px solid var(--color-border); } /* Override entry CSS margins - break-spaces already renders newlines visually */ .editor-content p { margin-bottom: 0 !important; } .editor-content h1, .editor-content h2, .editor-content h3, .editor-content h4, .editor-content h5, .editor-content h6 { margin-top: 0 !important; margin-bottom: 0 !important; } .editor-content pre { margin-bottom: 0 !important; } .editor-content blockquote { margin-top: 0 !important; margin-bottom: 0 !important; } .editor-content ul, .editor-content ol { margin-bottom: 0 !important; } .editor-toolbar { grid-column: 2; grid-row: 3; display: flex; flex-direction: column; gap: 4px; padding: 8px; background: var(--color-base); align-self: start; min-width: 60px; } .toolbar-button { padding: 8px 12px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); border-radius: 4px; cursor: pointer; font-weight: 600; text-align: center; transition: background 0.2s ease; } .toolbar-button:hover { background: var(--color-overlay); } .toolbar-separator { height: 1px; background: var(--color-border); margin: 4px 0; } .editor-debug { padding: 8px; padding-inline-end: 0; background: var(--color-base); font-family: var(--font-mono); font-size: 12px; width: 100%; display: flex; flex-direction: row; justify-content: space-between; color: var(--color-muted); } /* Markdown syntax characters - inline (**, *, ~~, `, etc) */ .md-syntax-inline { color: var(--color-muted); opacity: 0.6; } /* Markdown syntax characters - block level (#, >, -, etc) */ .md-syntax-block { color: var(--color-muted); opacity: 0.7; font-weight: normal; } /* Hidden syntax spans - collapsed when cursor is not near */ .md-syntax-inline.hidden, .md-syntax-block.hidden, .image-alt.hidden, .math-source.hidden { display: none; } /* Math source is hidden by default, shown when syntax is visible */ .math-source { display: none; color: var(--color-text); font-family: var(--font-mono); white-space: pre-wrap; background: color-mix(in srgb, var(--color-primary) 10%, transparent); padding: 0 2px; border-radius: 2px; } /* When syntax is visible (cursor nearby), show source too */ .math-source:not(.hidden) { display: inline; } /* Rendered math is always visible */ .math-rendered { display: inline; } .math-display.math-rendered { display: block; text-align: center; margin: 0.5rem 0; } /* Clickable math - click to edit */ .math-clickable { cursor: pointer; } /* Math error styling */ .math-error { border: 1px dashed var(--color-error, #eb6f92); border-radius: 4px; padding: 2px 6px; background: color-mix(in srgb, var(--color-error, #eb6f92) 10%, transparent); } .math-error code { font-family: var(--font-mono); font-size: 0.9em; } /* Hide HTML list markers when markdown syntax is visible (not hidden) */ /* This prevents double bullets/numbers when showing "- " or "1. " */ li:has(.md-syntax-block:not(.hidden)) { list-style-type: none; } /* Cursor positioning helper after
*/ .br-cursor { display: inline-block; font-size: 0; width: 0; height: 1em; /* force height so cursor is visible */ line-height: 1em; vertical-align: baseline; } /* Editor page header with report button */ .editor-header { padding-inline-start: 6rem; background: var(--color-base); } .editor-header h1 { margin: 0; color: var(--color-text); } /* Bug report button and dialog */ .report-bug-button { padding: 0.5rem 1rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 4px; color: var(--color-text); cursor: pointer; font-size: 0.9rem; font-family: var(--font-ui); } .report-bug-button:hover { background: var(--color-overlay); } .report-dialog-overlay { position: fixed; inset-inline: 0; top: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; } .report-dialog { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 1.5rem; max-width: 1000px; width: 90%; max-height: 80vh; overflow-y: auto; color: var(--color-text); } .report-dialog h2 { margin: 0 0 1rem 0; color: var(--color-emphasis); } .report-section { margin-bottom: 1rem; } .report-section label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--color-text); } .report-section h4 { margin: 0.5rem 0; color: var(--color-subtle); } .report-section pre { background: var(--color-base); padding: 1rem; border-radius: 4px; overflow-x: auto; font-size: 0.8rem; font-family: var(--font-mono); overflow-y: auto; color: var(--color-text); } .report-comment { width: 100%; padding: 1rem; border: 1px solid var(--color-border); border-radius: 4px; background: var(--color-base); color: var(--color-text); font-family: var(--font-ui); resize: vertical; } .report-details { margin: 1rem 0; } .report-details summary { cursor: pointer; color: var(--color-muted); } .report-actions { display: flex; gap: 1rem; justify-content: flex-end; margin-top: 1rem; } .report-cancel { padding: 0.5rem 1rem; background: transparent; border: 1px solid var(--color-border); border-radius: 4px; color: var(--color-text); cursor: pointer; font-family: var(--font-ui); } .report-cancel:hover { background: var(--color-overlay); } .report-submit { padding: 0.5rem 1rem; background: var(--color-primary); border: none; border-radius: 4px; color: var(--color-base); cursor: pointer; font-weight: 500; font-family: var(--font-ui); } .report-submit:hover { opacity: 0.9; } /* Publish button and dialog - matches report dialog theming */ /* Actions container for sync status + publish button */ .meta-actions { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; flex-shrink: 0; } .publish-button { padding: 0.5rem 1rem; background: var(--color-primary); border: none; border-radius: 4px; color: var(--color-base); cursor: pointer; font-weight: 500; font-family: var(--font-ui); } .publish-button:hover:not(:disabled) { opacity: 0.9; } .publish-button:disabled { opacity: 0.5; cursor: not-allowed; } .publish-dialog-overlay { position: fixed; inset-inline: 0; top: 0; bottom: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; } .publish-dialog { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 1.5rem; max-width: 500px; width: 90%; color: var(--color-text); } .publish-dialog h2 { margin: 0 0 1rem 0; color: var(--color-emphasis); } .publish-field { margin-bottom: 1rem; } .publish-field label { display: block; margin-bottom: 0.5rem; font-size: 12px; font-weight: 500; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.05em; } .publish-input { width: 100%; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: 4px; background: var(--color-base); color: var(--color-text); font-family: var(--font-ui); font-size: 14px; box-sizing: border-box; } .publish-input:focus { outline: none; border-color: var(--color-primary); } .publish-preview { background: var(--color-base); padding: 1rem; border-radius: 4px; margin-bottom: 1rem; font-size: 0.9rem; } .publish-preview p { margin: 0.25rem 0; color: var(--color-subtle); } .publish-error { background: var(--color-love); color: var(--color-base); padding: 0.75rem; border-radius: 4px; margin-bottom: 1rem; font-size: 0.9rem; } .publish-success { text-align: center; padding: 1rem 0; } .publish-success p { color: var(--color-foam); margin-bottom: 1rem; } .publish-success a { color: var(--color-primary); text-decoration: none; } .publish-success a:hover { text-decoration: underline; } .publish-done { margin-top: 1rem; padding: 0.5rem 1.5rem; background: var(--color-primary); border: none; border-radius: 4px; color: var(--color-base); cursor: pointer; font-family: var(--font-ui); } .publish-actions { display: flex; gap: 1rem; justify-content: flex-end; } .publish-cancel { padding: 0.5rem 1rem; background: transparent; border: 1px solid var(--color-border); border-radius: 4px; color: var(--color-text); cursor: pointer; font-family: var(--font-ui); } .publish-cancel:hover:not(:disabled) { background: var(--color-overlay); } .publish-cancel:disabled { opacity: 0.5; cursor: not-allowed; } .publish-submit { padding: 0.5rem 1rem; background: var(--color-primary); border: none; border-radius: 4px; color: var(--color-base); cursor: pointer; font-weight: 500; font-family: var(--font-ui); } .publish-submit:hover:not(:disabled) { opacity: 0.9; } .publish-submit:disabled { opacity: 0.5; cursor: not-allowed; } /* Image upload dialog */ .image-preview-container { display: flex; justify-content: center; margin-bottom: 1rem; } .image-preview { max-width: 100%; max-height: 300px; border-radius: 4px; object-fit: contain; } .image-alt-input-container { display: flex; flex-direction: column; gap: 0.5rem; } .image-alt-input-container label { font-weight: 500; color: var(--color-text); } .image-alt-input { width: 100%; padding: 0.75rem; border: 1px solid var(--color-border); border-radius: 4px; background: var(--color-base); color: var(--color-text); font-family: var(--font-ui); resize: vertical; } .image-alt-input::placeholder { color: var(--color-muted); } .dialog-actions { display: flex; gap: 1rem; justify-content: flex-end; margin-top: 1rem; } /* Sync status indicator */ .sync-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 12px; font-size: 12px; cursor: pointer; transition: background 0.2s ease, opacity 0.2s ease; user-select: none; } .sync-status:hover { opacity: 0.8; } .sync-status .sync-icon { font-size: 10px; line-height: 1; } .sync-status .sync-label { font-weight: 500; } /* Synced state - subtle success */ .sync-status.synced { background: color-mix(in srgb, var(--color-success) 15%, transparent); color: var(--color-success); } /* Syncing state - in progress */ .sync-status.syncing { background: color-mix(in srgb, var(--color-warning) 15%, transparent); color: var(--color-warning); cursor: wait; } .sync-status.syncing .sync-icon { animation: spin 1s linear infinite; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* Unsynced state - has pending changes */ .sync-status.unsynced { background: color-mix(in srgb, var(--color-warning) 20%, transparent); color: var(--color-warning); } /* Remote changes available - collaborator updates */ .sync-status.remote-changes { background: color-mix(in srgb, var(--color-primary) 20%, transparent); color: var(--color-primary); animation: pulse-subtle 2s ease-in-out infinite; } .sync-status.remote-changes:hover { animation: none; } /* Error state */ .sync-status.error { background: color-mix(in srgb, var(--color-error) 15%, transparent); color: var(--color-error); } /* Disabled state */ .sync-status.disabled { background: var(--color-overlay); color: var(--color-muted); cursor: default; opacity: 0.6; } .sync-status.disabled:hover { opacity: 0.6; } @keyframes pulse-subtle { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } } /* ========================================================================== COLLABORATORS ========================================================================== */ /* Inline avatars in meta row */ .collaborator-avatars { display: flex; align-items: center; cursor: pointer; padding: 2px; } .collaborator-avatars:hover .collab-avatar { border-color: var(--color-primary); } .collab-avatar { width: 24px; height: 24px; background: var(--color-surface); color: var(--color-muted); display: flex; border-radius: 4px; align-items: center; justify-content: center; font-size: 11px; font-weight: 500; font-family: var(--font-mono); text-transform: uppercase; margin-inline-start: -6px; position: relative; overflow: hidden; } .collab-avatar-img { width: 100%; height: 100%; object-fit: cover; } .collab-avatar:first-child { margin-inline-start: 0; } .collab-avatar.collab-overflow { background: var(--color-overlay); color: var(--color-subtle); font-size: 10px; } .collab-avatar.collab-add { background: transparent; border: 1px solid var(--color-border); color: var(--color-muted); font-size: 14px; } .collab-avatar.collab-add:hover { border-color: var(--color-primary); color: var(--color-primary); } /* Collaborators panel overlay */ .collaborators-overlay { position: fixed; inset-inline: 0; top: 0; bottom: 0; background: rgba(0, 0, 0, 0.4); display: flex; align-items: center; justify-content: center; z-index: 1000; } @media (prefers-color-scheme: dark) { .collaborators-overlay { background: rgba(0, 0, 0, 0.6); } } .collaborators-modal { background: var(--color-surface); border: 1px solid var(--color-border); padding: 0; max-width: 400px; width: 90%; max-height: 80vh; overflow-y: auto; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1); } @media (prefers-color-scheme: dark) { .collaborators-modal { box-shadow: none; } } /* Collaborators panel content */ .collaborators-panel { padding: 1rem; } .collaborators-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--color-border); } .collaborators-header h4 { margin: 0; font-size: 14px; font-weight: 600; color: var(--color-text); } .collaborators-header-actions { display: flex; gap: 4px; } .collaborators-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 0.75rem; } .collaborator { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: var(--color-overlay); border: 1px solid transparent; } .collaborator.pending { border-style: dashed; border-color: var(--color-border); background: transparent; } .collaborator-did { font-family: var(--font-mono); font-size: 12px; color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; } .collaborator-status { font-size: 12px; color: var(--color-muted); } .collaborator.accepted .collaborator-status { color: var(--color-success); } .collaborators-summary { font-size: 11px; color: var(--color-muted); text-align: right; } .collaborators-panel .empty-state { color: var(--color-muted); font-size: 13px; text-align: center; padding: 1.5rem 0; margin: 0; } /* ========================================================================== INVITE DIALOG ========================================================================== */ .invite-dialog-overlay { position: fixed; inset-inline: 0; top: 0; bottom: 0; background: rgba(0, 0, 0, 0.4); display: flex; align-items: center; justify-content: center; z-index: 1001; } @media (prefers-color-scheme: dark) { .invite-dialog-overlay { background: rgba(0, 0, 0, 0.6); } } .invite-dialog { background: var(--color-surface); border: 1px solid var(--color-border); padding: 1.25rem; max-width: 420px; width: 90%; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1); } @media (prefers-color-scheme: dark) { .invite-dialog { box-shadow: none; } } .invite-dialog h3 { margin: 0 0 1rem 0; font-size: 15px; font-weight: 600; color: var(--color-text); } .invite-dialog .invite-resource-info { font-size: 12px; color: var(--color-muted); margin-bottom: 1rem; padding: 8px 10px; background: var(--color-overlay); border: 1px solid var(--color-border); } .invite-field { margin-bottom: 1rem; } .invite-field label { display: block; font-size: 11px; font-weight: 500; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; } .invite-field input, .invite-field textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--color-border); background: var(--color-base); color: var(--color-text); font-family: var(--font-ui); font-size: 13px; box-sizing: border-box; } .invite-field input:focus, .invite-field textarea:focus { outline: none; border-color: var(--color-primary); } .invite-field textarea { min-height: 60px; resize: vertical; } .invite-error { background: color-mix(in srgb, var(--color-error) 10%, var(--color-surface)); border: 1px solid var(--color-error); color: var(--color-error); padding: 8px 10px; margin-bottom: 1rem; font-size: 13px; } .invite-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--color-border); } /* ========================================================================== INVITES LIST ========================================================================== */ .invites-list { display: flex; flex-direction: column; gap: 1.5rem; } .invites-section h3 { font-size: 13px; font-weight: 600; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.75rem 0; padding-bottom: 0.5rem; border-bottom: 1px solid var(--color-border); } .invites-section .empty-state { color: var(--color-muted); font-size: 13px; padding: 1rem 0; margin: 0; } .invite-card { padding: 12px; background: var(--color-surface); border: 1px solid var(--color-border); margin-bottom: 8px; } .invite-card:last-child { margin-bottom: 0; } .invite-info { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; } .invite-from, .invite-to { font-size: 13px; color: var(--color-text); } .invite-resource { font-size: 11px; font-family: var(--font-mono); color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .invite-message { font-size: 13px; color: var(--color-subtle); margin: 6px 0 0 0; padding: 8px; background: var(--color-overlay); border-inline-start: 2px solid var(--color-border); } .invite-actions, .invite-status { display: flex; align-items: center; gap: 8px; } .invite-status .status-badge { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; padding: 3px 8px; } .status-badge.pending { background: color-mix(in srgb, var(--color-warning) 15%, transparent); color: var(--color-warning); border: 1px solid var(--color-warning); } .status-badge.accepted { background: color-mix(in srgb, var(--color-success) 15%, transparent); color: var(--color-success); border: 1px solid var(--color-success); } .invite-card .error-message { background: color-mix(in srgb, var(--color-error) 10%, var(--color-surface)); border: 1px solid var(--color-error); color: var(--color-error); padding: 6px 8px; margin-bottom: 8px; font-size: 12px; } .invite-status.accepted { color: var(--color-success); font-size: 12px; font-weight: 500; } /* ========================================================================== Remote Collaborator Cursors ========================================================================== */ .remote-cursors-overlay { position: absolute; inset-inline: 0; top: 0; bottom: 0; pointer-events: none; z-index: 10; } .remote-cursor { position: absolute; pointer-events: none; } .remote-selection { position: absolute; pointer-events: none; border-radius: 2px; } .remote-cursor-caret { width: 2px; height: var(--cursor-height, 18px); background: var(--cursor-color, #4ecdc4); border-radius: 1px; animation: cursor-blink 1.2s ease-in-out infinite; } .remote-cursor-label { position: absolute; top: -18px; left: 0; padding: 2px 6px; background: var(--cursor-color, #4ecdc4); color: #fff; font-size: 10px; font-weight: 500; line-height: 1.2; border-radius: 3px 3px 3px 0; white-space: nowrap; opacity: 0.9; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); } @keyframes cursor-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } /* ========================================================================== Footnotes (Editor Mode) - styled but visible, no reordering ========================================================================== */ /* Inline footnote reference [^name] */ .footnote-ref { font-family: var(--font-mono); font-size: 0.9rem; color: var(--color-subtle); background: color-mix(in srgb, var(--color-surface) 10%, transparent); padding: 0 2px; } /* Footnote definition wrapper - stays in place, no reordering */ .footnote-def-editor { margin-bottom: 1rem; margin-top: -1rem; margin-inline-start: 2rem; padding: 0 0.5rem; border-inline-start: 2px solid var(--color-border); } /* The [^name]: prefix in definitions */ .footnote-def-syntax { font-family: var(--font-mono); font-size: 0.9rem; color: var(--color-subtle); } /* Inner paragraphs in footnote defs */ .footnote-def-editor p { margin: 0; display: inline; }