/* mdedit component styles — reset and tokens from shared/base.css */ /* Pane resizer */ .pane-resizer:hover { background-color: var(--primary) !important; } /* File tree */ .file-tree { font-size: 0.9rem; } .directory-item, .file-item { transition: background-color 0.15s ease; } .dir-icon { display: inline-flex; align-items: center; justify-content: center; transform: rotate(90deg); transition: transform 0.2s ease; vertical-align: middle; } .dir-icon svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; } .directory-item.collapsed .dir-icon { transform: rotate(0deg); } /* Two-line filename styles */ .filename-main { font-size: 0.9rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .filename-secondary { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* Active file highlighting */ .active-file { background-color: var(--primary) !important; color: var(--text-light) !important; font-weight: 500; } .active-file * { color: var(--text-light) !important; } /* ── File Tree Action Buttons ──────────────────────────────────────────────── */ .tree-actions { display: flex; gap: 0.25rem; align-items: center; margin-left: auto; opacity: 0; transition: opacity 0.2s ease; } .directory-item:hover .tree-actions, .file-item:hover .tree-actions, .active-file .tree-actions { opacity: 1; } .tree-btn { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; padding: 0; border: none; background-color: transparent; color: var(--text-muted); cursor: pointer; border-radius: 0.25rem; transition: background-color 0.15s ease, color 0.15s ease; } .tree-btn:hover { background-color: var(--bg-secondary); color: var(--text); } .tree-btn--danger:hover { background-color: #fee2e2; color: #dc2626; } [data-theme="dark"] .tree-btn--danger:hover { background-color: rgba(127, 29, 29, 0.5); color: #fca5a5; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tree-btn--danger:hover { background-color: rgba(127, 29, 29, 0.5); color: #fca5a5; } } .tree-btn svg { width: 1rem; height: 1rem; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } /* Directory toggle indicator */ .directory-item { position: relative; } .directory-item.collapsed .directory-contents { display: none; } /* File view container */ .file-view-container { display: flex; flex-direction: column; height: 100%; width: 100%; } /* File header */ .file-header { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 1rem; background-color: var(--bg-secondary); border-bottom: 1px solid var(--border); } .file-title { font-size: 1.125rem; font-weight: 500; color: var(--text); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* File content area */ .file-content-area { display: flex; flex: 1; overflow: hidden; } /* Content container */ #content-container { flex-direction: column; height: 100%; } /* Image preview */ .image-preview-container { display: flex; align-items: center; justify-content: center; background-color: var(--bg-secondary); } .image-preview { max-width: 100%; max-height: 100%; object-fit: contain; } /* HTML preview iframe */ .html-preview-container { width: 100%; height: 100%; } .html-preview-iframe { width: 100%; height: 100%; border: 0; } /* Dirty indicator */ .dirty-indicator { margin-left: 0.25rem; color: var(--warning); font-weight: bold; } .is-dirty { font-style: italic; } /* ── App header layout ────────────────────────────────────────────────────── */ .header-left, .header-right { display: flex; align-items: center; gap: 0.75rem; } /* ── Tailwind class overrides: use CSS tokens instead of hardcoded colours ── */ /* bg-white / bg-gray-100 are used on the pane backgrounds in template.html. */ /* Override them here so they follow the design-token system (light + dark). */ .bg-white { background-color: var(--bg) !important; } .bg-gray-100 { background-color: var(--bg-secondary) !important; } /* ── Front matter nav bar ──────────────────────────────────────────────────── */ .front-matter-nav { border-bottom: 1px solid var(--border); background-color: var(--bg-secondary); } .front-matter-nav__header { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 1rem; cursor: pointer; transition: background-color 0.15s ease; } .front-matter-nav__header:hover { background-color: var(--bg-hover); } .front-matter-toggle { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; padding: 0; border: none; background: transparent; color: var(--text-muted); cursor: pointer; border-radius: 4px; transition: transform 0.2s ease, color 0.15s ease; } .front-matter-toggle:hover { background-color: var(--bg-secondary); color: var(--text); } .front-matter-toggle svg { width: 0.75rem; height: 0.75rem; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } /* Toggle arrow rotation for collapsed state */ .front-matter-nav.collapsed .front-matter-toggle .arrow-down { transform: rotate(-90deg); } /* Front matter content area */ .front-matter-content { overflow: hidden; transition: max-height 0.25s ease, padding 0.25s ease, opacity 0.25s ease; max-height: 500px; padding: 0 1rem; } /* When collapsed, hide content completely */ .front-matter-nav.collapsed { border-bottom: none; } .front-matter-nav.collapsed .front-matter-content { display: none; } /* Front matter textarea */ .front-matter-textarea { color: var(--text); background-color: var(--bg); border: none; resize: none; font-family: var(--font-mono); font-size: 0.8rem; white-space: pre; /* preserve yaml structure, enables horiz scroll */ overflow-x: auto; overflow-y: hidden; /* height is set by JS to fit content exactly */ width: 100%; box-sizing: border-box; display: block; } /* ── Hidden utility (for disabled buttons) ─────────────────────────────────── */ .hide { display: none; } /* ── File tree row layout ───────────────────────────────────────────────────── */ .tree-row { display: flex; align-items: center; min-width: 0; } .tree-row__label { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: flex; align-items: center; gap: 0.25rem; } /* ── New-file modal ─────────────────────────────────────────────────────────── */ .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 1000; } .modal-overlay.hidden { display: none; } .modal-box { background: var(--bg); border: 1px solid var(--border); border-radius: 0.5rem; padding: 1.5rem; min-width: 20rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: 0 4px 24px rgba(0,0,0,0.18); } .modal-title { font-size: 1rem; font-weight: 600; color: var(--text); margin: 0; } .modal-input { width: 100%; padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: 0.25rem; font-size: 0.9rem; color: var(--text); background: var(--bg); box-sizing: border-box; } .modal-input:focus { outline: 2px solid var(--primary); outline-offset: 1px; } .modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }