* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; overflow: hidden; height: 100vh; } .hidden { display: none !important; } .container { display: flex; flex-direction: column; height: 100vh; } /* Tab Bar */ .tab-bar { display: flex; align-items: center; background: var(--bg-tertiary, #f0f0f0); border-bottom: 1px solid var(--border-color, #ddd); padding: 0 8px; min-height: 36px; } .tab { display: flex; align-items: center; padding: 6px 12px; background: var(--gray-200, #e8e8e8); border: 1px solid var(--border-color-strong, #ccc); border-bottom: none; border-radius: 6px 6px 0 0; margin-right: 2px; cursor: pointer; user-select: none; max-width: 200px; min-width: 120px; } .tab.active { background: var(--bg-primary, #fff); border-color: var(--gray-500, #999); z-index: 1; } .tab-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; } .tab-close { background: none; border: none; font-size: 16px; font-weight: bold; cursor: pointer; padding: 0; margin-left: 8px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 4px; color: #666; transition: background 0.15s, color 0.15s; } .tab-close:hover { background: #ddd; color: #000; } .tab-close:focus-visible { outline: 2px solid #5661b3; outline-offset: 2px; } .new-tab-button { background: none; border: 1px solid #ccc; border-radius: 4px; padding: 4px 8px; cursor: pointer; font-size: 14px; margin-left: 8px; color: #666; } .new-tab-button:hover { background: #e8e8e8; } .new-tab-button:focus-visible { outline: 2px solid #5661b3; outline-offset: 2px; } /* PDF Tab Styles */ .tab.pdf-tab { background: #e3f2fd; border-color: #90caf9; } .tab.pdf-tab.active { background: #fff; border-color: #1976d2; } .tab.pdf-tab .tab-title { color: #1565c0; } /* PDF Tab Container */ .pdf-tab-container { display: flex; flex-direction: column; height: 100%; background: var(--bg-primary, #fff); } .pdf-tab-container .pdf-controls { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: #f5f5f5; border-bottom: 1px solid #ddd; } .pdf-tab-container .pdf-nav-btn, .pdf-tab-container .pdf-zoom-btn, .pdf-tab-container .pdf-rotate-btn { background: #fff; border: 1px solid #ccc; border-radius: 4px; padding: 4px 8px; cursor: pointer; font-size: 14px; min-width: 28px; text-align: center; } .pdf-tab-container .pdf-nav-btn:hover, .pdf-tab-container .pdf-zoom-btn:hover, .pdf-tab-container .pdf-rotate-btn:hover { background: #e0e0e0; } .pdf-tab-container .pdf-page-input { width: 50px; text-align: center; padding: 4px; border: 1px solid #ccc; border-radius: 4px; } .pdf-tab-container .pdf-page-info { color: #666; font-size: 13px; } .pdf-tab-container .pdf-zoom-level { min-width: 50px; text-align: center; font-size: 13px; color: #666; } .pdf-tab-container .pdf-canvas-container { flex: 1; overflow: auto; display: flex; justify-content: center; padding: 20px; background: #525659; } .pdf-tab-container .pdf-canvas-container canvas { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); } /* Dark theme PDF tab */ body.dark .tab.pdf-tab { background: #1a237e; border-color: #3949ab; } body.dark .tab.pdf-tab .tab-title { color: #90caf9; } body.dark .pdf-tab-container .pdf-controls { background: #2d2d2d; border-color: #444; } /* Tab Content */ .tab-content { display: flex; flex: 1; overflow: hidden; } .tab-content:not(.active) { display: none; } /* Toolbar */ .toolbar { display: flex; align-items: center; padding: 8px 12px; background: #f5f5f5; border-bottom: 1px solid #ddd; gap: 4px; } .toolbar button { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid transparent; background: transparent; border-radius: 4px; cursor: pointer; transition: all 0.2s; } .toolbar button:hover { background: #e0e0e0; border-color: #ccc; } .toolbar button:active { background: #d0d0d0; } .toolbar button:focus-visible { outline: 2px solid #5661b3; outline-offset: 2px; } .toolbar-group { display: flex; align-items: center; gap: 2px; } .toolbar-separator { width: 1px; height: 20px; background: var(--border-color, rgba(0, 0, 0, 0.12)); margin: 0 6px; align-self: center; flex-shrink: 0; } /* Editor Container */ .editor-container { display: flex; flex: 1; overflow: hidden; } .pane { flex: 1; overflow: auto; min-width: 0; } .pane:first-child { border-right: none; } /* Pane Resizer */ .pane-resizer { width: 6px; background: var(--gray-200, #e0e0e0); cursor: col-resize; position: relative; flex-shrink: 0; transition: background 0.2s; } .pane-resizer:hover { background: var(--gray-500, #999); } .pane-resizer:active { background: var(--gray-600, #666); } .editor-textarea { width: 100%; height: 100%; padding: 20px; font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Monaco, 'Courier New', monospace; font-size: 15px; line-height: 1.6; border: none; outline: none; resize: none; } /* CodeMirror container */ .codemirror-container { height: 100%; overflow: auto; } .codemirror-container .cm-editor { height: 100%; font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace; font-size: 14px; } .codemirror-container .cm-scroller { overflow: auto; } .pane:last-child { padding: 0; background: #fff; } .preview-content { max-width: none; margin: 0; padding: 20px 24px 24px 24px; line-height: 1.6; font-size: 14px; } /* Legacy support for old selectors */ #editor-pane { border-right: 1px solid #ddd; } #editor { width: 100%; height: 100%; padding: 20px; font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Monaco, 'Courier New', monospace; font-size: 15px; line-height: 1.6; border: none; outline: none; resize: none; } #preview-pane { padding: 20px; background: #fff; } /* GitHub Light Theme for Preview (Default) */ #preview, [id^='preview-'], .preview-content { max-width: 800px; margin: 0 auto; font-size: 15px; padding: 20px; background: #ffffff; color: #24292f; line-height: 1.6; } /* ============================================ Error & Loading State Components ============================================ */ /* Preview Error State */ .preview-error { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; color: #dc3545; text-align: center; min-height: 200px; } .preview-error-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.8; } .preview-error-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; } .preview-error-message { font-size: 14px; color: #666; max-width: 400px; line-height: 1.5; } /* Loading State */ .loading-spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--gray-200, #e5e7eb); border-top-color: var(--primary-dark, #5661b3); border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } .loading-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, 0.8); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; z-index: 100; } .loading-text { font-size: 14px; color: var(--gray-600, #4b5563); } /* Skeleton Loading */ .skeleton { background: linear-gradient( 90deg, var(--gray-100, #f3f4f6) 25%, var(--gray-200, #e5e7eb) 50%, var(--gray-100, #f3f4f6) 75% ); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; } @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } .skeleton-text { height: 14px; margin-bottom: 8px; } .skeleton-text:last-child { width: 60%; } /* Success State */ .success-message { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #d1fae5; color: #065f46; border-radius: 6px; font-size: 14px; } .success-message svg { width: 18px; height: 18px; flex-shrink: 0; } /* Warning State */ .warning-message { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #fef3c7; color: #92400e; border-radius: 6px; font-size: 14px; } .warning-message svg { width: 18px; height: 18px; flex-shrink: 0; } /* Info State */ .info-message { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #dbeafe; color: #1e40af; border-radius: 6px; font-size: 14px; } .info-message svg { width: 18px; height: 18px; flex-shrink: 0; } .app-toast-container { position: fixed; top: 16px; right: 16px; display: flex; flex-direction: column; gap: 10px; z-index: var(--z-toast, 500); pointer-events: none; } .app-toast { min-width: 260px; max-width: 420px; padding: 12px 14px; border-radius: 8px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); color: #111827; background: #ffffff; border-left: 4px solid #3b82f6; opacity: 0; transform: translateY(-8px); transition: opacity 0.18s ease, transform 0.18s ease; pointer-events: auto; cursor: pointer; font-size: 13px; line-height: 1.4; } .app-toast.visible { opacity: 1; transform: translateY(0); } .app-toast-info { border-left-color: #2563eb; } .app-toast-success { border-left-color: #059669; background: #ecfdf5; } .app-toast-warning { border-left-color: #d97706; background: #fffbeb; } /* Dark theme adjustments for states */ body[class*='dark'] .preview-error-message { color: #9ca3af; } body[class*='dark'] .loading-overlay { background: rgba(0, 0, 0, 0.8); } body[class*='dark'] .loading-text { color: #9ca3af; } /* Bottom Panel (REPL Output) */ .bottom-panel { display: flex; flex-direction: column; border-top: 1px solid var(--gray-200, #e5e7eb); flex-shrink: 0; } .bottom-panel.collapsed { height: 0; overflow: hidden; border: none; } .bottom-panel:not(.collapsed) { height: 200px; } .bottom-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; background: var(--gray-50, #f9fafb); border-bottom: 1px solid var(--gray-200); } .bottom-panel-title { font-size: 13px; font-weight: 600; color: var(--gray-600); } .bottom-panel-actions { display: flex; gap: 4px; } .bottom-panel-btn { font-size: 12px; padding: 4px 8px; border: 1px solid var(--gray-300); border-radius: 4px; background: white; cursor: pointer; } .bottom-panel-content { flex: 1; overflow-y: auto; padding: 12px; font-family: 'JetBrains Mono', monospace; font-size: 13px; background: #1e1e1e; color: #d4d4d4; } .repl-entry { margin-bottom: 8px; } .repl-command { color: #569cd6; margin-bottom: 2px; } .repl-stdout { color: #d4d4d4; white-space: pre-wrap; } .repl-stderr { color: #f44747; white-space: pre-wrap; } .repl-error { color: #f44747; } /* Code Run Button */ .code-run-btn { position: absolute; top: 6px; right: 6px; padding: 4px 10px; font-size: 12px; background: var(--primary-dark, #5661b3); color: white; border: none; border-radius: 4px; cursor: pointer; opacity: 0; transition: opacity 0.2s; } pre:hover .code-run-btn { opacity: 1; } /* Dark theme bottom panel */ body[class*='dark'] .bottom-panel-header { background: #1e1e1e; border-color: #333; } body[class*='dark'] .bottom-panel-btn { background: #2d2d2d; border-color: #444; color: #ccc; } body[class*='dark'] .bottom-panel-title { color: #ccc; } /* Status Bar */ .status-bar { display: flex; justify-content: space-between; align-items: center; padding: 2px 12px; background: var(--bg-tertiary, #f5f5f5); border-top: 1px solid var(--border-color, #ddd); font-size: 12px; color: var(--text-secondary, #666); min-height: 24px; flex-shrink: 0; } .status-bar-left, .status-bar-right { display: flex; align-items: center; gap: 4px; } .status-separator { color: var(--gray-300, #d1d5db); margin: 0 2px; } .status-item { white-space: nowrap; } /* Preview Styles */ #preview h1, #preview h2, #preview h3, #preview h4, #preview h5, #preview h6, .preview-content h1, .preview-content h2, .preview-content h3, .preview-content h4, .preview-content h5, .preview-content h6 { margin-top: 24px; margin-bottom: 16px; font-weight: 600; line-height: 1.25; } #preview h1, .preview-content h1 { font-size: 2em; border-bottom: 1px solid #eaecef; padding-bottom: 0.3em; margin-top: 0; } #preview h2, .preview-content h2 { font-size: 1.5em; border-bottom: 1px solid #eaecef; padding-bottom: 0.3em; } #preview p, .preview-content p { margin-bottom: 16px; line-height: 1.6; } #preview code, .preview-content code, [id^='preview-'] code { padding: 0.2em 0.4em; margin: 0; font-size: 85%; background-color: #f6f8fa; border: 1px solid #d0d7de; border-radius: 6px; font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace; color: #24292f; } #preview pre, .preview-content pre, [id^='preview-'] pre { padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: #f6f8fa; border: 1px solid #d0d7de; border-radius: 6px; margin-bottom: 16px; } #preview pre code, .preview-content pre code { display: inline; max-width: auto; padding: 0; margin: 0; overflow: visible; line-height: inherit; word-wrap: normal; background-color: transparent; border: 0; } #preview blockquote, .preview-content blockquote { padding: 0 1em; color: #6a737d; border-left: 0.25em solid #dfe2e5; margin-bottom: 16px; } /* GitHub Dark Theme for Preview (matches all dark themes) */ body[class*='dark'] #preview, body[class*='dark'] [id^='preview-'], body[class*='dark'] .preview-content { background: #0d1117; color: #c9d1d9; } body[class*='dark'] #preview h1, body[class*='dark'] [id^='preview-'] h1, body[class*='dark'] .preview-content h1 { color: #c9d1d9; border-bottom-color: #21262d; } body[class*='dark'] #preview h2, body[class*='dark'] [id^='preview-'] h2, body[class*='dark'] .preview-content h2 { color: #c9d1d9; border-bottom-color: #21262d; } body[class*='dark'] #preview h3, body[class*='dark'] #preview h4, body[class*='dark'] #preview h5, body[class*='dark'] #preview h6, body[class*='dark'] [id^='preview-'] h3, body[class*='dark'] [id^='preview-'] h4, body[class*='dark'] [id^='preview-'] h5, body[class*='dark'] [id^='preview-'] h6, body[class*='dark'] .preview-content h3, body[class*='dark'] .preview-content h4, body[class*='dark'] .preview-content h5, body[class*='dark'] .preview-content h6 { color: #c9d1d9; } body[class*='dark'] #preview p, body[class*='dark'] [id^='preview-'] p, body[class*='dark'] .preview-content p { color: #c9d1d9; } body[class*='dark'] #preview code, body[class*='dark'] [id^='preview-'] code, body[class*='dark'] .preview-content code { background-color: #161b22; border-color: #30363d; color: #c9d1d9; } body[class*='dark'] #preview pre, body[class*='dark'] [id^='preview-'] pre, body[class*='dark'] .preview-content pre { background-color: #161b22; border-color: #30363d; } body[class*='dark'] #preview blockquote, body[class*='dark'] [id^='preview-'] blockquote, body[class*='dark'] .preview-content blockquote { color: #8b949e; border-left-color: #3b434b; } body[class*='dark'] #preview a, body[class*='dark'] [id^='preview-'] a, body[class*='dark'] .preview-content a { color: #58a6ff; } body[class*='dark'] #preview a:hover, body[class*='dark'] [id^='preview-'] a:hover, body[class*='dark'] .preview-content a:hover { color: #79c0ff; } body[class*='dark'] #preview table, body[class*='dark'] [id^='preview-'] table, body[class*='dark'] .preview-content table { border-color: #30363d; } body[class*='dark'] #preview table th, body[class*='dark'] [id^='preview-'] table th, body[class*='dark'] .preview-content table th { background-color: #161b22; color: #c9d1d9; border-color: #30363d; } body[class*='dark'] #preview table td, body[class*='dark'] [id^='preview-'] table td, body[class*='dark'] .preview-content table td { border-color: #30363d; color: #c9d1d9; } body[class*='dark'] #preview hr, body[class*='dark'] [id^='preview-'] hr, body[class*='dark'] .preview-content hr { background-color: #21262d; border-color: #21262d; } body[class*='dark'] #preview ul, body[class*='dark'] #preview ol, body[class*='dark'] [id^='preview-'] ul, body[class*='dark'] [id^='preview-'] ol, body[class*='dark'] .preview-content ul, body[class*='dark'] .preview-content ol { color: #c9d1d9; } body[class*='dark'] #preview li, body[class*='dark'] [id^='preview-'] li, body[class*='dark'] .preview-content li { color: #c9d1d9; } #preview ul, #preview ol, .preview-content ul, .preview-content ol { padding-left: 2em; margin-bottom: 16px; } #preview li, .preview-content li { margin-bottom: 4px; } #preview a, .preview-content a { color: #0366d6; text-decoration: none; } #preview a:hover, .preview-content a:hover { text-decoration: underline; } #preview img, .preview-content img { max-width: 100%; height: auto; } #preview table, .preview-content table { border-collapse: collapse; margin-bottom: 16px; width: 100%; } #preview table th, #preview table td, .preview-content table th, .preview-content table td { padding: 6px 13px; border: 1px solid #dfe2e5; } #preview table th, .preview-content table th { font-weight: 600; background-color: #f6f8fa; } #preview table tr:nth-child(2n), .preview-content table tr:nth-child(2n) { background-color: #ffffff; } /* Theme: Dark */ body[class*='dark'] { background: #1e1e1e; color: #d4d4d4; } body[class*='dark'] .tab-bar { background: #2d2d30; border-bottom-color: #3e3e42; } body[class*='dark'] .tab { background: #3c3c3c; border-color: #555; color: #d4d4d4; } body[class*='dark'] .tab.active { background: #1e1e1e; border-color: #666; } body[class*='dark'] .tab-close { color: #ccc; } body[class*='dark'] .tab-close:hover { background: #555; color: #fff; } body[class*='dark'] .new-tab-button { border-color: #555; color: #ccc; } body[class*='dark'] .new-tab-button:hover { background: #3c3c3c; } body[class*='dark'] .toolbar { background: #2d2d30; border-bottom-color: #3e3e42; } body[class*='dark'] .toolbar button { color: #cccccc; } body[class*='dark'] .toolbar button:hover { background: #3e3e42; border-color: #464647; } body[class*='dark'] .toolbar-separator { background: #3e3e42; } body[class*='dark'] .pane:first-child { border-right-color: #3e3e42; } body[class*='dark'] .editor-textarea { background: #1e1e1e; color: #d4d4d4; } body[class*='dark'] .pane:last-child { background: #1e1e1e; } /* Legacy support */ body[class*='dark'] #editor-pane { border-right-color: #3e3e42; } body[class*='dark'] #editor { background: #1e1e1e; color: #d4d4d4; } body[class*='dark'] #preview-pane { background: #252526; } body[class*='dark'] #preview, body[class*='dark'] .preview-content { color: #d4d4d4; } body[class*='dark'] #preview h1, body[class*='dark'] #preview h2, body[class*='dark'] .preview-content h1, body[class*='dark'] .preview-content h2 { border-bottom-color: #3e3e42; } body[class*='dark'] #preview code, body[class*='dark'] .preview-content code { background-color: rgba(255, 255, 255, 0.1); } body[class*='dark'] #preview pre, body[class*='dark'] .preview-content pre { background-color: #2d2d30; } body[class*='dark'] #preview blockquote, body[class*='dark'] .preview-content blockquote { color: #808080; border-left-color: #3e3e42; } body[class*='dark'] #preview a, body[class*='dark'] .preview-content a { color: #569cd6; } body[class*='dark'] #preview table th, body[class*='dark'] #preview table td, body[class*='dark'] .preview-content table th, body[class*='dark'] .preview-content table td { border-color: #3e3e42; } body[class*='dark'] #preview table tr:nth-child(2n), body[class*='dark'] .preview-content table tr:nth-child(2n) { background-color: #2d2d30; } body[class*='dark'] .status-bar { background: #2d2d30; border-top-color: #3e3e42; color: #969696; } /* Hide preview pane by default */ .pane.hidden { display: none; } .pane.full-width { border-right: none; } /* Legacy support */ #preview-pane.hidden { display: none; } #editor-pane.full-width { border-right: none; } /* Editor Wrapper with Line Numbers */ .editor-wrapper { position: relative; display: flex; height: 100%; } .line-numbers { min-width: 40px; padding: 8px 4px; background: #f8f8f8; border-right: 1px solid #ddd; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; font-size: 13px; line-height: 1.4; color: #666; text-align: right; user-select: none; overflow: hidden; } .line-numbers.hidden { display: none; } .line-numbers .line-number { display: block; white-space: nowrap; } /* Adjust editor when line numbers are shown */ .editor-wrapper #editor { flex: 1; } body[class*='dark'] .line-numbers { background: #2a2a2a; border-right-color: #555; color: #888; } /* Additional theme support for line numbers */ /* Export Presets Styles */ .export-presets { border-bottom: 1px solid #ddd; padding-bottom: 15px; margin-bottom: 15px; } .preset-controls { display: flex; gap: 8px; align-items: center; margin-top: 8px; } .preset-dropdown { flex: 1; position: relative; } .preset-dropdown button { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; background: #f5f5f5; cursor: pointer; font-size: 13px; transition: all 0.2s; } .preset-dropdown button:hover { background: #e8e8e8; } #preset-dropdown-toggle { width: 100%; text-align: left; } .preset-dropdown-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; max-height: 220px; overflow-y: auto; background: #fff; border: 1px solid #ddd; border-radius: 4px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); z-index: 10; } .preset-dropdown-list.hidden { display: none; } .preset-row { display: flex; align-items: center; gap: 6px; padding: 4px 8px; } .preset-row.selected { background: #eef4fb; } .preset-row:hover { background: #f0f0f0; } .preset-row-select { flex: 1; border: none; background: none; text-align: left; padding: 6px 4px; cursor: pointer; font-size: 13px; } .preset-format { font-size: 11px; text-transform: uppercase; color: #586069; border: 1px solid #ddd; border-radius: 3px; padding: 1px 4px; } .preset-delete { border: none; background: none; color: #586069; cursor: pointer; font-size: 15px; line-height: 1; padding: 4px 6px; } .preset-delete:hover { color: #cb2431; } .preset-empty { padding: 8px; font-size: 13px; color: #586069; } #save-preset-btn { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; background: #f5f5f5; cursor: pointer; font-size: 13px; transition: all 0.2s; } #save-preset-btn:hover { background: #e8e8e8; } /* Advanced Export Toggle Styles */ .export-mode-toggle { border-bottom: 1px solid #ddd; padding-bottom: 15px; margin-bottom: 20px; } .checkbox-label { display: flex; align-items: center; cursor: pointer; font-weight: 500; margin-bottom: 5px; } .checkbox-label input[type='checkbox'] { margin-right: 10px; transform: scale(1.2); } .export-help { color: #666; font-size: 12px; font-style: italic; margin-left: 25px; } .advanced-options { transition: all 0.3s ease; overflow: visible; position: relative; z-index: 10; } .advanced-options.hidden { display: none; } .basic-options { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 6px; padding: 15px; margin-top: 10px; } .basic-options label { font-weight: normal; margin-bottom: 8px; } /* Theme support for advanced export toggle */ body[class*='dark'] .export-mode-toggle { border-color: #444; } body[class*='dark'] .export-help { color: #999; } body[class*='dark'] .basic-options { background: #1a1a1a; border-color: #444; } body[class*='dark'] .checkbox-label { color: #f0f0f0; } /* Enhanced Statistics Styles */ .enhanced-stats { font-size: 11px; color: #666; padding: 2px 0; border-top: 1px solid #ddd; margin-top: 2px; font-family: monospace; } /* Theme support for enhanced stats */ body[class*='dark'] .enhanced-stats { color: #999; border-color: #444; } /* Auto-save indicator */ .auto-save-indicator { position: fixed; top: 20px; right: 20px; background: #28a745; color: white; padding: 8px 16px; border-radius: 4px; font-size: 12px; font-weight: 500; z-index: 10000; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); animation: slideInRight 0.3s ease-out; } .auto-save-indicator.fade-out { animation: fadeOut 0.3s ease-out forwards; } @keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } @keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } } /* Print Styles */ @media print { /* Hide UI elements for clean print output */ #toolbar, #tab-bar, #editor-container, .editor-container, #status-bar, .status-bar, .toolbar, .tab-bar, .editor-pane, [id^='editor-pane-'], .dialog, .modal-overlay { display: none !important; } /* Ensure body and html take full width */ html, body { width: 100% !important; height: auto !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; } /* Show preview in full width */ #preview, .preview, .preview-content, [id^='preview-'], [id^='preview-pane-'], .tab-content, .pane { display: block !important; width: 100% !important; max-width: 100% !important; height: auto !important; margin: 0 !important; padding: 20px !important; overflow: visible !important; position: static !important; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important; } /* Optimize preview content for printing */ .preview-content, [id^='preview-'] { line-height: 1.6; font-size: 12pt; color: #000 !important; background: white !important; } /* No-styles mode for printing without theme colors */ body.printing-no-styles .preview-content, body.printing-no-styles [id^='preview-'] { color: #000 !important; background: #fff !important; } /* Text formatting */ .preview-content h1, .preview-content h2, .preview-content h3, .preview-content h4, .preview-content h5, .preview-content h6 { page-break-after: avoid; margin-top: 1em; margin-bottom: 0.5em; } .preview-content p { margin-bottom: 0.5em; page-break-inside: avoid; } /* Code blocks */ .preview-content pre { background: #f5f5f5 !important; border: 1px solid #ddd !important; page-break-inside: avoid; padding: 10px; font-size: 10pt; } .preview-content code { background: #f5f5f5 !important; color: #000 !important; font-size: 10pt; } /* Lists */ .preview-content ul, .preview-content ol { margin-left: 20px; page-break-inside: avoid; } .preview-content li { page-break-inside: avoid; margin-bottom: 0.3em; } /* Tables */ .preview-content table { width: 100%; border-collapse: collapse; page-break-inside: avoid; margin-bottom: 1em; } .preview-content th, .preview-content td { border: 1px solid #999 !important; padding: 8px !important; text-align: left; } .preview-content th { background: #f0f0f0 !important; font-weight: bold; } /* Links - remove underline for print */ .preview-content a { color: #000 !important; text-decoration: none; } /* Blockquotes */ .preview-content blockquote { border-left: 3px solid #ccc; padding-left: 15px; margin-left: 0; color: #333 !important; } /* Images */ .preview-content img { max-width: 100%; height: auto; page-break-inside: avoid; } /* Horizontal rules */ .preview-content hr { border: none; border-top: 1px solid #999; margin: 1em 0; } } /* Print mode classes */ .print-mode { display: block !important; width: 100% !important; max-width: 100% !important; position: fixed !important; top: 0 !important; left: 0 !important; z-index: 9999 !important; background: white !important; padding: 20px !important; } /* Ensure preview panes are visible in print mode */ #preview-pane-1, #preview-pane-2, #preview-pane-3, #preview-pane-4, #preview-pane-5 { display: block !important; } /* No-styles printing mode */ body.printing-no-styles .preview-content, body.printing-no-styles [id^='preview-'], .print-no-styles .preview-content { color: #000 !important; background: white !important; } body.printing-no-styles .preview-content h1, body.printing-no-styles .preview-content h2, body.printing-no-styles .preview-content h3, body.printing-no-styles .preview-content h4, body.printing-no-styles .preview-content h5, body.printing-no-styles .preview-content h6, .print-no-styles .preview-content h1, .print-no-styles .preview-content h2, .print-no-styles .preview-content h3, .print-no-styles .preview-content h4, .print-no-styles .preview-content h5, .print-no-styles .preview-content h6 { color: #000 !important; border-color: #999 !important; } body.printing-no-styles .preview-content code, .print-no-styles .preview-content code { background: #f5f5f5 !important; color: #000 !important; } body.printing-no-styles .preview-content pre, .print-no-styles .preview-content pre { background: #f5f5f5 !important; color: #000 !important; border-color: #999 !important; } .print-no-styles .preview-content a { color: #000 !important; } .print-no-styles .preview-content blockquote { color: #333 !important; border-color: #999 !important; } /* ================================ Header & Footer Dialog Styles ================================ */ .hf-enable-section { margin-bottom: 20px; padding: 15px; background: var(--bg-secondary, #f5f5f5); border-radius: 5px; } .hf-enable-section label { display: flex; align-items: center; font-weight: 600; cursor: pointer; } .hf-enable-section input[type='checkbox'] { margin-right: 10px; width: 18px; height: 18px; cursor: pointer; } #hf-config-content { transition: opacity 0.3s ease; } #hf-config-content.disabled { opacity: 0.5; pointer-events: none; } .hf-section { margin-bottom: 25px; padding: 20px; background: var(--bg-tertiary, #fafafa); border-radius: 8px; border: 1px solid var(--border-color, #e0e0e0); } .hf-section h4 { margin: 0 0 15px 0; color: var(--text-primary, #333); font-size: 16px; border-bottom: 2px solid var(--accent-color, #007bff); padding-bottom: 8px; } .hf-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 15px; } .hf-column { display: flex; flex-direction: column; position: relative; } .hf-column label { font-weight: 600; margin-bottom: 5px; color: var(--text-secondary, #666); font-size: 13px; } .hf-column input[type='text'] { padding: 8px 35px 8px 10px; border: 1px solid var(--border-color, #ccc); border-radius: 4px; font-size: 14px; background: var(--input-bg, white); color: var(--text-primary, #333); transition: border-color 0.2s ease; } .hf-column input[type='text']:focus { outline: none; border-color: var(--accent-color, #007bff); box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1); } .field-insert-btn { position: absolute; right: 5px; bottom: 5px; width: 28px; height: 28px; padding: 0; background: var(--accent-color, #007bff); color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 18px; line-height: 1; transition: all 0.2s ease; } .field-insert-btn:hover { background: var(--accent-hover, #0056b3); transform: scale(1.05); } .field-insert-btn:active { transform: scale(0.95); } .hf-logo-row { display: flex; align-items: center; gap: 10px; padding: 15px; background: var(--bg-secondary, #f5f5f5); border-radius: 6px; margin-top: 10px; } .hf-logo-row label { font-weight: 600; color: var(--text-secondary, #666); min-width: 120px; } .hf-logo-row input[type='file'] { flex: 1; padding: 6px 10px; border: 1px solid var(--border-color, #ccc); border-radius: 4px; background: var(--input-bg, white); color: var(--text-primary, #333); font-size: 13px; cursor: pointer; } .hf-logo-row input[type='file']::-webkit-file-upload-button { padding: 5px 12px; background: var(--button-bg, #6c757d); color: white; border: none; border-radius: 4px; cursor: pointer; margin-right: 10px; } .hf-logo-row input[type='file']::-webkit-file-upload-button:hover { background: var(--button-hover, #5a6268); } .browse-btn { padding: 6px 12px; background: var(--accent-color, #007bff); color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; transition: background 0.2s ease; margin-right: 8px; } .browse-btn:hover { background: var(--accent-hover, #0056b3); } .clear-btn { padding: 6px 12px; background: var(--danger-color, #dc3545); color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; transition: background 0.2s ease; } .clear-btn:hover { background: var(--danger-hover, #c82333); } .logo-preview { font-size: 12px; color: var(--text-secondary, #666); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hf-help { margin-top: 20px; padding: 15px; background: var(--info-bg, #e7f3ff); border-left: 4px solid var(--info-color, #007bff); border-radius: 4px; } .hf-help p { margin: 0 0 10px 0; font-weight: 600; color: var(--text-primary, #333); } .hf-help ul { margin: 0; padding-left: 20px; list-style-type: none; } .hf-help li { margin-bottom: 6px; color: var(--text-secondary, #555); font-size: 13px; } .hf-help code { background: rgba(0, 123, 255, 0.1); padding: 2px 6px; border-radius: 3px; font-family: 'Courier New', monospace; color: var(--accent-color, #007bff); font-weight: 600; } /* Field Picker Dialog */ .field-picker-list { display: grid; grid-template-columns: 1fr; gap: 8px; } .field-option { padding: 12px 16px; background: var(--bg-secondary, #f5f5f5); border: 1px solid var(--border-color, #ddd); border-radius: 6px; text-align: left; cursor: pointer; font-size: 14px; color: var(--text-primary, #333); transition: all 0.2s ease; } .field-option:hover { background: var(--accent-color, #007bff); color: white; border-color: var(--accent-color, #007bff); transform: translateX(5px); } /* Dark Theme Support for Header/Footer Dialog */ body[data-theme='dark'] .hf-enable-section, body[data-theme='dark'] .hf-logo-row { background: #2d2d2d; } body[data-theme='dark'] .hf-section { background: #252525; border-color: #404040; } body[data-theme='dark'] .hf-column input[type='text'], body[data-theme='dark'] .hf-logo-row input[type='file'] { background: #2d2d2d; color: #e0e0e0; border-color: #404040; } body[data-theme='dark'] .hf-help { background: rgba(0, 123, 255, 0.15); border-left-color: #0d6efd; } body[data-theme='dark'] .field-option { background: #2d2d2d; border-color: #404040; color: #e0e0e0; } body[data-theme='dark'] .field-option:hover { background: #0d6efd; color: white; } /* ================================ Word Template Dialog Styles ================================ */ .wt-status-section { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; padding: 15px; background: var(--bg-secondary, #f5f5f5); border-radius: 8px; border: 1px solid var(--border-color, #e0e0e0); } .wt-status { display: flex; align-items: center; gap: 12px; min-width: 0; } .wt-status-icon { font-size: 28px; line-height: 1; flex-shrink: 0; } .wt-status-text { min-width: 0; } .wt-status-title { font-weight: 600; color: var(--text-primary, #333); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .wt-status-detail { font-size: 12px; color: var(--text-secondary, #666); margin-top: 2px; } .wt-status-missing .wt-status-detail { color: var(--danger-color, #dc3545); } .wt-status-selected .wt-status-detail { color: var(--accent-color, #007bff); } .wt-status-actions { display: flex; flex-shrink: 0; } .wt-startpage-section { padding: 15px; background: var(--bg-tertiary, #fafafa); border-radius: 8px; border: 1px solid var(--border-color, #e0e0e0); } .wt-startpage-section label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--text-secondary, #666); font-size: 13px; } .wt-startpage-section input[type='number'] { width: 100px; padding: 8px 10px; border: 1px solid var(--border-color, #ccc); border-radius: 4px; font-size: 14px; background: var(--input-bg, white); color: var(--text-primary, #333); } .wt-startpage-section input[type='number']:focus { outline: none; border-color: var(--accent-color, #007bff); box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1); } .wt-help { margin: 10px 0 0 0; font-size: 12px; color: var(--text-secondary, #666); } body[data-theme='dark'] .wt-status-section, body[data-theme='dark'] .wt-startpage-section { background: #252525; border-color: #404040; } body[data-theme='dark'] .wt-startpage-section input[type='number'] { background: #2d2d2d; color: #e0e0e0; border-color: #404040; } /* Mermaid Diagram Styles */ .mermaid { background: #f9f9f9; padding: 20px; border-radius: 8px; margin: 20px 0; text-align: center; border: 1px solid #e0e0e0; } .mermaid svg { max-width: 100%; height: auto; } body[class*='dark'] .mermaid { background: #2d2d2d; border-color: #444; } /* Task List Styles */ .preview-content input[type='checkbox'] { margin-right: 6px; pointer-events: none; } .preview-content li.task-list-item { list-style: none; margin-left: -20px; } /* Admonition Styles */ .admonition { border-left: 4px solid; border-radius: 4px; padding: 12px 16px; margin: 16px 0; } .admonition-title { font-weight: 600; margin-bottom: 8px; } .admonition-note, .admonition-info { border-color: #3b82f6; background: #eff6ff; } .admonition-warning { border-color: #f59e0b; background: #fffbeb; } .admonition-tip { border-color: #10b981; background: #ecfdf5; } .admonition-danger { border-color: #ef4444; background: #fef2f2; } /* TOC Styles */ .toc { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; margin: 16px 0; } .toc h2 { font-size: 14px; margin-bottom: 8px; } .toc ul { list-style: none; padding: 0; } .toc li { padding: 2px 0; } .toc .toc-h1 { padding-left: 0; } .toc .toc-h2 { padding-left: 16px; } .toc .toc-h3 { padding-left: 32px; } .toc .toc-h4 { padding-left: 48px; } .toc a { color: #5661b3; text-decoration: none; } .toc a:hover { text-decoration: underline; } /* Command Palette Styles */ /* Command Palette styles moved to styles-modern.css */ /* ============================================ Global Focus & Accessibility Styles ============================================ */ /* Remove default focus outline, use focus-visible instead */ *:focus { outline: none; } /* Add visible focus indicator for keyboard navigation */ *:focus-visible { outline: 2px solid var(--primary-dark, #5661b3); outline-offset: 2px; } /* Button focus styles */ button:focus-visible { outline: 2px solid var(--primary-dark, #5661b3); outline-offset: 2px; } /* Link focus styles */ a:focus-visible { outline: 2px solid var(--primary-dark, #5661b3); outline-offset: 2px; border-radius: 2px; } /* Input focus styles */ input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--primary-dark, #5661b3); outline-offset: 1px; } /* Skip link for accessibility */ .skip-link { position: absolute; top: -100px; left: 0; background: var(--primary-dark, #5661b3); color: white; padding: 8px 16px; z-index: 10000; text-decoration: none; font-weight: 600; } .skip-link:focus { top: 0; } /* Visually hidden but accessible */ .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } /* Reduced motion support */ @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } } /* High contrast mode support */ @media (prefers-contrast: high) { .tab-close:focus-visible, .toolbar button:focus-visible, .sidebar-icon:focus-visible { outline-width: 3px; } }