davidgolding_obsidian-colophon/styles.css
David Golding 0bb26099b3 feat: implement horizontal find/replace bar with navigation and tests
- Redesigned find/replace bar as a full-width horizontal bar above the editor
- Added 'Find Next' (Mod-G) and 'Find Previous' (Mod-Shift-G) support
- Patched native Obsidian search/find commands to integrate with Colophon
- Streamlined tab navigation between find and replace fields
- Fixed 'Applying a mismatched transaction' errors in Tiptap search extension
- Added unit tests for search logic and extension structure
- Updated layout to prevent overlapping with editor content
2026-04-02 15:43:19 -06:00

1282 lines
28 KiB
CSS

/*
COLOPHON STYLES
Targeting Tiptap Editor within .colophon-workspace
*/
.colophon-view-header .view-header-title-container {
display: flex;
justify-content: center;
align-items: center;
}
.colophon-view-header .view-header-title-parent {
display: none;
}
/* 1. WORKSPACE CONTAINER */
.colophon-workspace {
background-color: var(--background-primary);
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
padding: 0 !important;
}
.colophon-scroll-container {
display: block;
height: 100%;
overflow-y: auto;
width: 100%;
position: relative;
padding-top: 2rem;
background-color: var(--background-primary);
color: var(--text-normal);
}
/* 2. THE EDITOR CANVAS (Main) */
.colophon-main-editor {
/* Layout */
width: 100%;
/* Use the variable set by JS, or fallback to 1080px (new default) */
max-width: var(--colophon-editor-width, 1080px);
min-height: 100%;
margin: 0 auto;
padding: 0 2rem 75vh 2rem !important;
/* Top padding 0, Bottom 75vh, Sides 2rem */
/* Appearance */
background-color: transparent;
box-shadow: none;
outline: none;
/* Typography Base */
color: var(--text-normal);
font-family: var(--font-text-theme), var(--font-text-override);
font-variant: normal;
caret-color: var(--text-accent);
/* Fade in animation */
opacity: 0;
animation: fadeIn 0.3s ease-in forwards;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Ensure first element is flush with top */
.colophon-main-editor > *:first-child {
margin-top: 0 !important;
}
/* Selection Styling - Applies to all editors in workspace */
.colophon-workspace .ProseMirror ::selection {
background-color: var(--text-selection);
}
/* 3. TYPOGRAPHY */
/* Base Paragraph Reset */
.colophon-workspace .ProseMirror p {
margin: 0;
padding: 0;
}
/* Headings Reset */
.colophon-workspace .ProseMirror h1,
.colophon-workspace .ProseMirror h2,
.colophon-workspace .ProseMirror h3,
.colophon-workspace .ProseMirror h4,
.colophon-workspace .ProseMirror h5,
.colophon-workspace .ProseMirror h6 {
margin: 0;
padding: 0;
font-weight: normal;
}
/* Explicit Bold/Italic Styling */
.colophon-workspace .ProseMirror strong,
.colophon-workspace .ProseMirror b {
font-weight: bold;
}
.colophon-workspace .ProseMirror em,
.colophon-workspace .ProseMirror i {
font-style: italic;
}
.colophon-workspace .ProseMirror u {
text-decoration: underline;
}
.colophon-workspace .ProseMirror .colophon-small-caps {
font-variant: small-caps;
}
/* Hide Tiptap's default focus outline */
.colophon-workspace .ProseMirror-focused {
outline: none;
}
/* Subscript and Superscript */
.colophon-workspace .ProseMirror sub,
.colophon-workspace .ProseMirror sup {
font-size: 0.75em;
line-height: 0;
position: relative;
vertical-align: baseline;
}
.colophon-workspace .ProseMirror sup {
top: -0.5em;
}
.colophon-workspace .ProseMirror sub {
bottom: -0.25em;
}
/* 4. LOADING INDICATOR */
.colophon-loader {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
color: var(--text-muted);
font-family: var(--font-interface);
font-size: 0.9rem;
}
.colophon-loader-spinner {
width: 24px;
height: 24px;
border: 2px solid var(--text-muted);
border-top-color: transparent;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 10px;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* 5. TOOLBAR (Now in View Header) */
.colophon-toolbar {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
gap: 8px;
padding: 0 10px;
height: 100%;
/* Remove background/border as it sits in header */
background: transparent;
border: none;
}
/* Container injected into view header */
.view-header-center {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
overflow: visible;
z-index: 10;
}
.colophon-toolbar-row {
display: flex;
align-items: center;
gap: 8px;
}
.colophon-ui-btn {
background: var(--interactive-normal);
border: 0;
color: var(--text-normal);
padding: 6px 10px;
border-radius: 100vh;
cursor: pointer;
display: flex;
align-items: center;
gap: 6px;
font-size: 14px;
height: 32px;
transition: background 0.1s ease;
}
.colophon-ui-btn:hover {
background: var(--background-modifier-hover);
}
.colophon-ui-btn.colophon-active {
background-color: var(--background-modifier-hover);
color: var(--text-normal);
box-shadow: inset 0 0 0 1px var(--background-modifier-border-focus);
}
.colophon-ui-btn.colophon-icon-only {
padding: 0;
width: 32px;
margin-right: 8px;
justify-content: center;
}
.colophon-btn-group {
display: flex;
align-items: center;
overflow: hidden;
}
.colophon-dropdown-trigger {
min-width: 110px;
justify-content: space-between;
}
.colophon-color-swatch-container {
height: 32px;
width: 32px;
background: var(--background-primary);
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.colophon-color-swatch {
width: 18px;
height: 18px;
border-radius: 4px;
}
.colophon-add-action {
background: var(--interactive-accent);
color: var(--text-on-accent);
border: none;
}
.colophon-add-action:hover {
background: var(--interactive-accent-hover);
}
.colophon-dropdown-wrapper {
position: relative;
display: inline-block;
}
/* Dropdowns & Menus */
.colophon-dropdown-menu,
.colophon-context-menu {
position: absolute;
top: 100%;
left: 0;
margin-top: 4px;
background: var(--background-primary);
border: 1px solid var(--background-modifier-border);
border-radius: 12px;
padding: 6px;
min-width: 150px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
z-index: 1000;
display: none;
/* Hidden by default */
}
.colophon-context-menu {
width: 220px;
}
.colophon-menu-item {
display: flex;
align-items: center;
gap: 10px;
padding: 6px 8px;
border-radius: 4px;
cursor: pointer;
color: var(--text-muted);
}
.colophon-menu-item:hover {
background: var(--background-modifier-hover);
color: var(--text-normal);
}
.colophon-menu-item .colophon-drag-handle {
cursor: grab;
color: var(--text-faint);
font-size: 10px;
letter-spacing: -1px;
}
.colophon-menu-item .colophon-icon {
display: flex;
align-items: center;
justify-content: center;
width: 20px;
}
.colophon-menu-item .colophon-label {
font-size: 14px;
flex-grow: 1;
}
/* 7. WORD COUNT INDICATOR */
.colophon-word-count-indicator {
position: absolute;
bottom: 2rem;
left: 50%;
transform: translateX(-50%);
background-color: var(--background-secondary);
border: 1px solid var(--background-modifier-border);
border-radius: 8px;
padding: 4px 12px;
font-family: var(--font-interface);
font-size: 0.8rem;
color: var(--text-muted);
z-index: 100;
pointer-events: none;
/* Let clicks pass through if needed, though it's just display */
/* Translucent / Glass effect */
opacity: 0.9;
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.colophon-export-margins .colophon-export-margins__grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
min-width: 240px;
/* keeps the grid from collapsing in narrow sidebars */
}
.colophon-export-margins__label {
font-size: 11px;
line-height: 1.2;
color: var(--text-muted);
margin-bottom: 4px;
}
.colophon-export-margins__input {
width: 100%;
padding: 6px 8px;
border-radius: var(--radius-s);
border: 1px solid var(--background-modifier-border);
background: var(--background-modifier-form-field);
color: var(--text-normal);
}
.colophon-export-margins__input:focus {
outline: none;
border-color: var(--interactive-accent);
box-shadow: 0 0 0 2px color-mix(in srgb, var(--interactive-accent) 30%, transparent);
}
/* 8. COMMENTS */
.colophon-comment-highlight {
background-color: rgba(255, 214, 10, 0.3);
/* Subtle yellow */
border-bottom: 2px solid rgba(255, 214, 10, 0.5);
cursor: pointer;
transition: background-color 0.2s;
}
.colophon-comment-highlight:hover {
background-color: rgba(255, 214, 10, 0.5);
}
.colophon-comment-list {
display: flex;
flex-direction: column;
gap: 16px;
}
.colophon-comment-card {
background-color: var(--background-primary);
border: 1px solid var(--background-modifier-border);
border-radius: 12px;
padding: 0;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
transition: box-shadow 0.2s, border-color 0.2s;
}
.colophon-comment-card:focus-within {
border-color: var(--interactive-accent);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.colophon-comment-parent,
.colophon-comment-reply {
padding: 12px;
}
.colophon-comment-reply {
border-top: 1px solid var(--background-modifier-border);
background-color: var(--background-primary-alt);
}
.colophon-comment-header {
display: flex;
justify-content: space-between;
align-items: baseline;
margin-bottom: 6px;
}
.colophon-comment-author {
font-weight: 600;
font-size: 0.85rem;
color: var(--text-accent); /* Apple Pages uses blue for author */
}
.colophon-comment-date {
font-size: 0.75rem;
color: var(--text-faint);
}
.colophon-comment-editor-container {
width: 100%;
}
.colophon-comment-editor {
font-size: 0.9rem;
line-height: 1.4;
min-height: 1.2em;
outline: none;
/* Revert to theme defaults for comments */
font-family: var(--font-interface) !important;
font-variant: normal !important;
text-indent: 0 !important;
}
/* Comment Preview Overrides */
.colophon-comment-preview,
.colophon-comment-preview p {
font-family: var(--font-text-interface) !important;
font-size: 0.9rem !important;
font-variant: normal !important;
font-style: normal !important;
text-indent: 0 !important;
padding: 0 !important;
color: var(--text-normal) !important;
line-height: 1.4 !important;
cursor: pointer;
min-height: 1.2em;
white-space: pre-wrap;
word-break: break-word;
}
.colophon-comment-preview:hover {
background-color: var(--background-modifier-hover);
}
.colophon-comment-footer {
display: flex;
justify-content: flex-end;
gap: 8px;
padding: 4px 8px 8px 12px;
background-color: var(--background-secondary-alt);
border-top: 1px solid var(--background-modifier-border);
}
.colophon-comment-action {
background: transparent;
border: none;
padding: 4px 8px;
font-size: 0.7rem;
color: var(--text-muted);
cursor: pointer;
font-weight: 500;
display: flex;
align-items: center;
gap: 4px;
border-radius: 4px;
transition: background-color 0.1s ease, color 0.1s ease;
white-space: nowrap;
}
.colophon-comment-action:hover {
background-color: var(--background-modifier-hover);
color: var(--text-normal);
text-decoration: none;
}
.colophon-comment-action-icon {
display: flex;
align-items: center;
justify-content: center;
}
.colophon-comment-action-icon svg {
width: 14px;
height: 14px;
}
.colophon-comment-action.is-danger:hover {
color: var(--text-error);
background-color: color-mix(in srgb, var(--text-error) 10%, transparent);
}
/* 9. MAIN LAYOUT (Flex) */
.colophon-main-layout {
display: flex;
flex-direction: column;
flex: 1;
width: 100%;
height: 100%;
overflow: hidden;
}
.colophon-layout-body {
display: flex;
flex-direction: row;
flex: 1;
width: 100%;
height: 100%;
overflow: hidden;
}
/* 10. Z-AXIS PANEL (Sidebar) */
.colophon-z-axis-panel {
width: 0;
flex-shrink: 0;
opacity: 0;
background-color: var(--background-secondary);
border-left: 0 solid var(--background-modifier-border);
display: flex;
flex-direction: column;
overflow-y: hidden;
overflow-x: hidden;
transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
opacity 0.3s ease,
padding 0.3s ease,
border-left-width 0.3s ease,
visibility 0.3s;
padding: 0;
visibility: hidden;
}
.colophon-z-axis-panel.is-visible {
width: 351px;
opacity: 1;
padding: 0;
border-left-width: 1px;
visibility: visible;
}
/* 11. PANEL SWITCHER */
.colophon-panel-switcher {
display: flex;
justify-content: center;
padding: 12px 16px;
border-bottom: 1px solid var(--background-modifier-border);
background-color: var(--background-secondary);
}
.colophon-switcher-group {
display: flex;
background-color: var(--background-primary);
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
overflow: hidden;
padding: 2px;
}
.colophon-switcher-btn {
background: transparent;
border: none;
color: var(--text-muted);
font-size: 0.75rem;
padding: 4px 12px;
cursor: pointer;
border-radius: 4px;
font-weight: 500;
transition: background-color 0.2s, color 0.2s;
}
.colophon-switcher-btn:hover {
color: var(--text-normal);
}
.colophon-switcher-btn.colophon-active {
background-color: var(--interactive-accent);
color: var(--text-on-accent);
}
/* 12. GLOBAL SIDEBAR OVERRIDES */
.colophon-main-layout.is-global-sidebar .colophon-z-axis-panel {
display: none;
width: 0 !important;
border-left: none !important;
}
.colophon-sidebar-view .colophon-z-axis-panel {
width: 100%;
height: 100%;
opacity: 1;
visibility: visible;
border-left: none;
background: transparent;
}
.colophon-sidebar-view .colophon-panel-content {
width: 100%;
min-width: 0;
}
.colophon-panel-content {
flex: 1;
padding: 24px 16px;
overflow-y: auto;
width: 350px;
min-width: 350px;
}
.colophon-panel-empty {
color: var(--text-faint);
text-align: center;
margin-top: 100px;
font-family: var(--font-text-theme), var(--font-text-override), serif;
font-size: 0.85rem;
letter-spacing: 0.03em;
font-style: normal;
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
opacity: 0;
animation: colophon-fade-in 1.2s ease forwards;
}
.colophon-panel-empty::before {
content: "†";
font-size: 2.5rem;
font-family: serif;
opacity: 0.15;
font-weight: 200;
}
@keyframes colophon-fade-in {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
/* Footnotes Sidebar */
.colophon-footnote-list {
display: flex;
flex-direction: column;
/* Gap handled by individual items margin-bottom in StyleManager */
}
.colophon-footnote-item {
display: flex;
flex-direction: column;
gap: 5px;
background-color: var(--background-secondary);
border: 1px solid var(--background-modifier-border);
border-radius: 8px;
padding: 10px;
transition: border-color 0.2s, box-shadow 0.2s;
}
.colophon-footnote-item:focus-within {
border-color: var(--interactive-accent);
box-shadow: 0 0 0 1px var(--interactive-accent);
}
.colophon-footnote-number {
cursor: pointer;
color: var(--text-accent);
align-self: flex-start;
}
.colophon-footnote-number:hover {
text-decoration: underline;
}
.colophon-footnote-editor-container {
border: none;
padding: 0;
width: 100%;
}
.colophon-footnote-editor {
outline: none;
min-height: auto;
cursor: text;
width: 100%;
background-color: transparent !important;
border: 0 !important;
}
.colophon-footnote-preview {
color: var(--text-muted);
font-size: 0.9rem;
cursor: pointer;
padding: 2px 4px;
border-radius: 4px;
transition: background-color 0.1s ease, color 0.1s ease;
min-height: 1.2em;
line-height: 1.4;
white-space: pre-wrap;
word-break: break-word;
}
.colophon-footnote-preview:hover {
background-color: var(--background-modifier-hover);
color: var(--text-normal);
}
.colophon-footnote-preview:focus {
background-color: var(--background-modifier-hover);
color: var(--text-normal);
outline: none;
box-shadow: 0 0 0 1px var(--interactive-accent);
}
.colophon-footnote-editor .ProseMirror {
padding: 0 !important;
margin: 0 !important;
width: 100% !important;
min-height: auto !important;
background-color: transparent !important;
box-shadow: none !important;
border: 0 !important;
}
/* Base reset for paragraphs in mini-editors */
.colophon-footnote-editor p {
margin: 0 !important;
padding: 0 !important;
}
/* Footnote Marker in Canvas */
.colophon-footnote-marker {
color: var(--text-accent);
cursor: pointer;
font-weight: bold;
padding: 0 2px;
border-radius: 2px;
transition: background-color 0.2s;
/* Baseline shift handled via dynamic CSS from StyleManager based on 'align' property */
}
.colophon-footnote-marker:hover {
background-color: var(--background-modifier-hover);
}
/* =========================================
SCRIPT MODE STYLES
========================================= */
/* Root Scope */
.colophon-editor-host.is-script-mode .ProseMirror {
font-family: 'Courier Prime', 'Courier New', Courier, monospace;
font-size: 1rem;
line-height: 1.2rem;
/* Single spacing standard */
color: var(--text-normal);
max-width: 8.5in;
/* Standard US Letter width approx */
padding: 1in 1in 1in 1.5in;
/* Top, Right, Bottom, Left (1.5" left margin) */
}
/* Paragraph Reset for Script Mode */
.colophon-editor-host.is-script-mode .ProseMirror p {
margin-bottom: 1em;
/* Standard spacing */
min-height: 1em;
}
/* 1. Scene Heading */
.colophon-editor-host.is-script-mode .ProseMirror .script-scene {
font-weight: bold;
text-transform: uppercase;
margin-top: 1em;
margin-bottom: 1em;
/* 1.5" Left Margin is default padding */
}
/* 2. Action */
.colophon-editor-host.is-script-mode .ProseMirror .script-action {
/* Standard Width */
margin-bottom: 1em;
}
/* 3. Character */
.colophon-editor-host.is-script-mode .ProseMirror .script-character {
margin-left: 2.0in;
/* Relative to 1.5" margin -> Total ~3.5" */
margin-right: 0;
text-transform: uppercase;
margin-bottom: 0;
/* Tight with dialogue */
}
/* 4. Dialogue */
.colophon-editor-host.is-script-mode .ProseMirror .script-dialogue {
margin-left: 1.0in;
/* Relative to 1.5" margin -> Total ~2.5" */
margin-right: 1.0in;
margin-bottom: 1em;
}
/* 5. Parenthetical */
.colophon-editor-host.is-script-mode .ProseMirror .script-parenthetical {
margin-left: 1.5in;
/* Relative to 1.5" margin -> Total ~3.0" */
margin-right: 1.5in;
margin-bottom: 0;
}
/* 6. Transition */
.colophon-editor-host.is-script-mode .ProseMirror .script-transition {
text-align: right;
margin-right: 0.5in;
text-transform: uppercase;
margin-bottom: 1em;
margin-top: 1em;
}
/* Hide Visual Elements in Script Mode if needed */
.colophon-editor-host.is-script-mode .ProseMirror .footnote-list {
font-family: var(--font-text-theme);
/* Keep footnotes readable? Or Courier? */
}
/* Ensure formatting marks are visible in Script Mode */
.colophon-editor-host.is-script-mode .ProseMirror strong {
font-weight: bold;
}
.colophon-editor-host.is-script-mode .ProseMirror em {
font-style: italic;
}
.colophon-editor-host.is-script-mode .ProseMirror s {
text-decoration: line-through;
}
.colophon-editor-host.is-script-mode .ProseMirror u {
text-decoration: underline;
}
/* Search Panel */
.colophon-search-panel {
position: absolute;
top: 10px;
right: 20px;
z-index: 100;
display: flex;
align-items: center;
background-color: var(--background-primary);
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
padding: 6px 10px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
font-size: var(--font-ui-small);
color: var(--text-normal);
}
.colophon-search-input-wrapper {
display: flex;
align-items: center;
position: relative;
margin-right: 8px;
}
.colophon-search-input {
background: transparent;
border: none;
outline: none;
color: var(--text-normal);
font-size: var(--font-ui-small);
width: 150px;
padding-right: 40px;
/* Space for counter */
}
.colophon-search-input:focus {
box-shadow: none;
border-color: transparent;
}
.colophon-search-input.no-matches {
color: var(--text-error);
}
.colophon-search-counter {
position: absolute;
right: 0;
color: var(--text-muted);
font-size: 0.85em;
pointer-events: none;
}
.colophon-search-buttons {
display: flex;
align-items: center;
gap: 4px;
border-left: 1px solid var(--background-modifier-border);
padding-left: 8px;
}
.colophon-search-button {
display: flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
border-radius: 4px;
color: var(--text-muted);
cursor: pointer;
transition: background-color 0.1s ease;
}
.colophon-search-button svg {
width: 16px;
height: 16px;
}
.colophon-search-close {
margin-left: 4px;
}
/* Search Highlights */
.colophon-search-match {
background-color: rgba(255, 255, 0, 0.4);
border-radius: 2px;
}
.theme-dark .colophon-search-match {
background-color: rgba(255, 215, 0, 0.4);
}
.colophon-search-match-active {
background-color: rgba(255, 165, 0, 0.8);
box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.4);
z-index: 1;
}
.theme-dark .colophon-search-match-active {
background-color: rgba(255, 140, 0, 0.8);
}
/* DOCX Export Modal Styles */
.colophon-export-margins .setting-item-control {
flex-direction: column;
align-items: flex-start;
}
.colophon-export-margins__grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
min-width: 240px;
margin-top: 10px;
}
.colophon-export-margins__label {
font-size: 11px;
line-height: 1.2;
color: var(--text-muted);
margin-bottom: 4px;
}
.colophon-export-margins__input {
width: 100%;
padding: 6px 8px;
border-radius: var(--radius-s);
border: 1px solid var(--background-modifier-border);
background: var(--background-modifier-form-field);
color: var(--text-normal);
}
.colophon-export-margins__input:focus {
outline: none;
border-color: var(--interactive-accent);
}
/* BLOCK SETTINGS UI */
.colophon-block-settings {
margin-top: 20px;
}
.colophon-block-row {
border-bottom: 1px solid var(--background-modifier-border);
margin-bottom: 8px;
}
.colophon-block-row summary {
list-style: none;
cursor: pointer;
display: flex;
align-items: center;
padding: 10px 0;
}
.colophon-block-row summary::-webkit-details-marker {
display: none;
}
.colophon-block-row summary::before {
content: "\25B7"; /* Right triangle outline */
margin-right: 12px;
font-size: 1.2em;
transition: transform 0.2s;
display: inline-block;
color: var(--text-muted);
}
.colophon-block-row[open] summary::before {
transform: rotate(90deg);
}
.colophon-block-content {
padding: 15px 15px 15px 30px;
background-color: var(--background-secondary-alt);
border-radius: 4px;
margin-bottom: 10px;
}
.colophon-property-row, .colophon-add-prop-wrapper {
display: flex;
align-items: center;
gap: 15px;
margin-bottom: 8px;
padding: 4px 0;
}
.colophon-property-label {
flex: 0 0 140px;
font-size: 0.85em;
font-family: var(--font-monospace);
color: var(--text-muted);
text-transform: lowercase;
}
.colophon-property-input {
flex: 1;
display: flex;
align-items: center;
}
.colophon-measurement-wrapper {
display: flex;
align-items: center;
gap: 4px;
}
.colophon-add-property {
border-bottom: 1px solid var(--background-modifier-border);
padding-bottom: 12px;
margin-bottom: 15px;
}
.colophon-block-row summary .setting-item {
border: none;
padding: 0;
flex: 1;
}
.colophon-property-delete {
opacity: 0.5;
transition: opacity 0.2s;
}
.colophon-property-delete:hover {
opacity: 1;
color: var(--text-error);
}
/* Internal Links */
.colophon-internal-link {
color: var(--link-color);
text-decoration: none;
cursor: pointer;
background-color: var(--background-modifier-hover);
padding: 0 4px;
border-radius: 4px;
transition: background-color 0.2s, color 0.2s;
font-weight: 500;
}
.colophon-internal-link:hover {
background-color: var(--background-modifier-active-hover);
color: var(--link-color-hover);
}
.colophon-internal-link.is-selected {
background-color: transparent;
font-weight: normal;
padding: 0;
color: var(--text-muted);
}
/* Link Suggestions UI */
.colophon-link-suggestions {
background-color: var(--background-primary);
border: 1px solid var(--background-modifier-border);
border-radius: 8px;
box-shadow: var(--shadow-l);
padding: 0;
z-index: 1000;
min-width: 350px;
max-height: 400px;
display: flex;
flex-direction: column;
}
.colophon-link-suggestions .suggestion {
overflow-y: auto;
padding: 4px;
}
.colophon-link-suggestions .prompt-instructions {
display: flex;
justify-content: space-between;
padding: 8px 12px;
background-color: var(--background-secondary);
border-top: 1px solid var(--background-modifier-border);
font-size: 11px;
color: var(--text-muted);
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
}
.colophon-link-suggestions .prompt-instruction-command {
font-weight: bold;
color: var(--text-normal);
}
/* Find/Replace Bar */
.colophon-find-replace-bar {
width: 100%;
background-color: var(--background-secondary);
border-bottom: 1px solid var(--background-modifier-border);
padding: 6px 12px;
display: flex;
align-items: center;
z-index: 10;
flex-shrink: 0;
}
.cfr-main-row {
display: flex;
align-items: center;
gap: 16px;
width: 100%;
}
.cfr-section {
display: flex;
align-items: center;
gap: 8px;
}
.cfr-find-section {
flex: 1;
min-width: 0;
}
.cfr-replace-section {
flex: 1;
min-width: 0;
border-left: 1px solid var(--background-modifier-border);
padding-left: 16px;
}
.cfr-input {
background: var(--background-modifier-form-field);
border: 1px solid var(--background-modifier-border);
border-radius: 4px;
color: var(--text-normal);
height: 28px;
font-size: 13px;
padding: 0 8px;
width: 100%;
max-width: 200px;
}
.cfr-input:focus {
border-color: var(--interactive-accent);
outline: none;
}
.cfr-info {
font-size: 11px;
color: var(--text-muted);
white-space: nowrap;
min-width: 60px;
}
.cfr-button-group {
display: flex;
gap: 2px;
}
.cfr-button {
padding: 0 6px;
height: 28px;
min-width: 28px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
background: transparent;
border: none;
color: var(--text-muted);
border-radius: 4px;
font-size: 12px;
font-weight: 500;
}
.cfr-button:hover {
color: var(--text-normal);
background-color: var(--background-modifier-hover);
}
.cfr-button.is-active {
color: var(--text-on-accent);
background-color: var(--interactive-accent);
}
.cfr-close {
margin-left: auto;
}
.cfr-close:hover {
color: var(--text-error);
}
/* Search Highlights */
.colophon-search-result {
background-color: rgba(255, 255, 0, 0.4);
}
.colophon-search-result-active {
background-color: rgba(255, 165, 0, 0.7);
}