/* === SYNC CONTAINER === */ .sync-container { border: 1px solid var(--background-modifier-border); border-radius: 8px; background: var(--background-primary); margin: 12px 0; display: flex; flex-direction: column; gap: var(--sync-gap, 16px); padding: 16px; } /* === EMBED WRAPPER === */ .sync-embed { border: none !important; margin: 0 !important; padding: 0 !important; background: transparent !important; box-shadow: none !important; height: var(--sync-embed-height, auto); max-height: var(--sync-max-height, none); overflow-y: auto; position: relative; } /* Gap between embeds */ .sync-embed-gap { padding-top: var(--sync-gap, 16px); border-top: 1px solid var(--background-modifier-border-hover); } /* === NATIVE OBSIDIAN PADDING SYSTEM (REBUILT) === */ /* 1. Hide the view header */ .sync-embed .view-header { display: none !important; } /* 2. The view-content: NO horizontal padding here (we'll handle it in cm-content) */ .sync-embed .view-content { background-color: transparent !important; padding: 0 !important; } /* 3. All editor components - transparent, no padding */ .sync-embed .markdown-source-view, .sync-embed .cm-editor, .sync-embed .cm-scroller { background-color: transparent !important; padding: 0 !important; margin: 0 !important; } /* 4. Content area - FIXED PADDING SYSTEM */ .sync-embed .cm-content { background-color: transparent !important; /* Aesthetic bottom padding - matches native Obsidian feel */ padding-bottom: 18px !important; /* Native Obsidian horizontal padding - fixed at 10px regardless of readable line width */ padding-left: 10px !important; padding-right: 10px !important; } /* 5. Ensure full width */ .sync-embed .markdown-source-view.mod-cm6 .cm-editor { width: 100%; } /* 6. CRITICAL: Disable readable line width padding inheritance */ .sync-embed .cm-sizer { /* Prevent extra padding from readable line width setting */ padding-inline-start: 0 !important; padding-inline-end: 0 !important; } /* === INLINE TITLE === */ .sync-embed .inline-title { pointer-events: none !important; user-select: none !important; cursor: default !important; opacity: 1 !important; color: var(--inline-title-color, var(--h1-color, var(--text-normal))) !important; background: transparent !important; border: none !important; box-shadow: none !important; outline: none !important; padding-top: 16px !important; padding-left: 10px !important; padding-right: 10px !important; } /* === ALIAS HEADER === */ .sync-embed-alias-header { font-size: var(--inline-title-size, var(--h1-size, 2em)); font-weight: var(--inline-title-weight, var(--h1-weight, 700)); line-height: var(--inline-title-line-height, var(--h1-line-height, 1.3)); color: var(--inline-title-color, var(--h1-color, var(--text-normal))); font-family: var(--inline-title-font, var(--h1-font, var(--font-text))); font-variant: var(--h1-variant, normal); letter-spacing: var(--h1-letter-spacing, normal); /* Natural spacing like inline-title */ padding-top: 16px !important; padding-left: 10px !important; padding-right: 10px !important; margin-bottom: 0; pointer-events: none !important; user-select: none !important; cursor: default !important; background: transparent !important; border: none !important; box-shadow: none !important; outline: none !important; } /* Theme inheritance */ .theme-dark .sync-embed-alias-header, .theme-light .sync-embed-alias-header { color: var(--inline-title-color, var(--h1-color, var(--text-normal))); } /* === PROPERTIES/FRONTMATTER === */ .metadata-container.is-collapsed .metadata-content { display: none; } .properties-collapse-toggle { cursor: pointer; user-select: none; padding: 4px 8px; margin: 4px 0; border-radius: 4px; display: inline-block; font-size: 0.9em; color: var(--text-muted); transition: all 0.2s ease; font-family: var(--font-monospace); } .properties-collapse-toggle:hover { background-color: var(--background-modifier-hover); color: var(--text-normal); } /* === SECTION EMBEDS === */ .sync-embed .cm-header-1, .sync-embed .HyperMD-header-1 { color: var(--h1-color, var(--text-normal)) !important; } .sync-embed .cm-header-2, .sync-embed .HyperMD-header-2 { color: var(--h2-color, var(--text-normal)) !important; } .sync-embed .cm-header-3, .sync-embed .HyperMD-header-3 { color: var(--h3-color, var(--text-normal)) !important; } .sync-embed .cm-header-4, .sync-embed .HyperMD-header-4 { color: var(--h4-color, var(--text-normal)) !important; } .sync-embed .cm-header-5, .sync-embed .HyperMD-header-5 { color: var(--h5-color, var(--text-normal)) !important; } .sync-embed .cm-header-6, .sync-embed .HyperMD-header-6 { color: var(--h6-color, var(--text-normal)) !important; } .sync-embed .cm-scroller { overflow-x: hidden !important; scroll-behavior: smooth; } /* === LOADING STATE === */ .sync-embed-loading { min-height: 100px; display: flex; align-items: center; justify-content: center; } .sync-embed-placeholder { padding: 20px; text-align: center; color: var(--text-muted); font-style: italic; animation: pulse 1.5s ease-in-out infinite; } @keyframes pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } } /* === ERROR STATE === */ .sync-empty { padding: 20px; text-align: center; color: var(--text-muted); font-style: italic; } .sync-embed-error { padding: 12px 16px; background: var(--background-modifier-error); border: 1px solid var(--background-modifier-border); border-radius: 4px; color: var(--text-error); margin: 4px 0; font-size: 0.9em; } /* === FOCUS HIGHLIGHT === */ .sync-embed { outline: 2px solid transparent; outline-offset: 2px; border-radius: 4px; transition: outline-color 0.1s ease; } .sync-embed:focus-within { outline-color: var(--interactive-accent); } body.sync-embeds-no-focus-highlight .sync-embed:focus-within { outline-color: transparent; } /* === SCROLLBAR === */ .sync-embed::-webkit-scrollbar { width: 8px; height: 8px; } .sync-embed::-webkit-scrollbar-track { background: transparent; } .sync-embed::-webkit-scrollbar-thumb { background: var(--background-modifier-border); border-radius: 4px; transition: background 0.2s ease; } .sync-embed::-webkit-scrollbar-thumb:hover { background: var(--background-modifier-border-hover); } .sync-embed { scrollbar-width: thin; scrollbar-color: var(--background-modifier-border) transparent; } /* === HELP SECTION === */ .sync-embeds-help { background: var(--background-secondary); padding: 16px; border-radius: 8px; margin-top: 12px; line-height: 1.6; } .sync-embeds-help h4 { margin-top: 12px; margin-bottom: 8px; color: var(--text-normal); } .sync-embeds-help ul { margin-left: 20px; margin-top: 8px; margin-bottom: 12px; } .sync-embeds-help li { margin-bottom: 4px; } .sync-embeds-help code { background: var(--background-primary-alt); padding: 2px 6px; border-radius: 3px; font-family: var(--font-monospace); font-size: 0.9em; color: var(--code-normal); } .sync-embeds-help pre { background: var(--background-primary-alt); padding: 12px; border-radius: 4px; margin-top: 8px; margin-bottom: 12px; overflow-x: auto; } .sync-embeds-help pre code { background: transparent; padding: 0; } .sync-embeds-help p { margin: 8px 0; } .sync-embeds-help em { color: var(--text-muted); font-size: 0.9em; } .sync-embeds-help strong { color: var(--text-normal); } /* === RESPONSIVE === */ @media (max-width: 768px) { .sync-container { padding: 12px; gap: 12px; } .sync-embed-gap { padding-top: 12px; } .sync-embed-alias-header { font-size: calc(var(--inline-title-size, var(--h1-size, 2em)) * 0.85); } } /* === THEME COMPATIBILITY === */ .theme-light .sync-embed, .theme-dark .sync-embed { color: var(--text-normal); } .sync-embed .cm-link, .sync-embed .cm-hmd-internal-link { color: var(--link-color, var(--text-accent)) !important; } .sync-embed .cm-url { color: var(--link-external-color, var(--text-accent)) !important; } /* === ACCESSIBILITY === */ @media (prefers-contrast: high) { .sync-container { border-width: 2px; } .sync-embed:focus-within { outline-width: 3px; } .sync-embed-error { border-width: 2px; } } @media (prefers-reduced-motion: reduce) { .sync-embed-placeholder { animation: none; opacity: 0.8; } .sync-embed, .properties-collapse-toggle, .sync-embed::-webkit-scrollbar-thumb { transition: none; } .sync-embed .cm-scroller { scroll-behavior: auto; } } /* === PRINT === */ @media print { .sync-container { border: 1px solid #ccc; page-break-inside: avoid; } .sync-embed { max-height: none !important; overflow: visible !important; } .properties-collapse-toggle { display: none; } .metadata-container.is-collapsed .metadata-content { display: block; } }