/* Advanced PDF Export — plugin styles */ .mpdf-modal { width: 96vw; max-width: 1800px; height: 90vh; max-height: 90vh; overflow: hidden; } .mpdf-modal .modal-content { padding: 0; height: 100%; overflow: hidden; display: flex; flex-direction: column; } /* Topbar */ .mpdf-topbar { display: flex; align-items: flex-start; padding: 6px 12px; min-height: 44px; background: var(--background-secondary); border-bottom: 1px solid var(--background-modifier-border); flex-shrink: 0; } .mpdf-topbar-left { display: flex; align-items: center; gap: 8px; row-gap: 4px; flex: 1; min-width: 0; flex-wrap: wrap; } .mpdf-topbar-title { flex-shrink: 1; min-width: 40px; max-width: 220px; font-size: 12px; font-weight: 500; color: var(--text-normal); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; opacity: 0.85; border-left: 1px solid var(--background-modifier-border); } .mpdf-topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; } .mpdf-ctrl { display: flex; align-items: center; gap: 5px; flex-shrink: 0; } .mpdf-ctrl-label { font-size: 11px; color: var(--text-muted); white-space: nowrap; } .mpdf-select { background: var(--background-primary); color: var(--text-normal); border: 1px solid var(--background-modifier-border); border-radius: 4px; font-size: 12px; padding: 3px 6px; cursor: pointer; outline: none; } .mpdf-select:hover { border-color: var(--interactive-accent); } .mpdf-btn { display: flex; align-items: center; gap: 4px; background: var(--background-primary); color: var(--text-normal); border: 1px solid var(--background-modifier-border); border-radius: 5px; font-size: 12px; padding: 4px 10px; cursor: pointer; flex-shrink: 0; transition: border-color 0.12s, color 0.12s, background-color 0.12s; } .mpdf-btn:hover { border-color: var(--interactive-accent); color: var(--interactive-accent); } .mpdf-btn-primary { background: var(--interactive-accent); color: var(--text-on-accent); border-color: transparent; font-weight: 500; } .mpdf-btn-primary:hover { background: var(--interactive-accent-hover); color: var(--text-on-accent); } .mpdf-btn-icon { padding: 4px 6px; } .mpdf-btn-icon svg { width: 16px; height: 16px; } .mpdf-btn:disabled, .mpdf-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; } .mpdf-page-count { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; } /* Main layout */ .mpdf-main { display: flex; flex: 1; overflow: hidden; } .mpdf-editor-panel { display: flex; flex-direction: column; width: 42%; min-width: 200px; border-right: 1px solid var(--background-modifier-border); background: var(--background-primary); flex-shrink: 0; } .mpdf-editor { flex: 1; background: transparent; color: var(--text-normal); border: none; outline: none; resize: none; font-family: var(--font-monospace); font-size: 13px; line-height: 1.75; padding: 16px 18px; tab-size: 2; } .mpdf-editor::placeholder { color: var(--text-faint); } /* Keeps the loading overlay as a non-scrolling sibling of .mpdf-preview. */ .mpdf-preview-container { flex: 1; position: relative; overflow: hidden; display: flex; flex-direction: column; } .mpdf-preview { flex: 1; background: var(--background-secondary-alt, #2a2a30); overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: 28px 20px 48px; /* extra bottom so last page label isn't clipped */ gap: 24px; } .mpdf-loading-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.38); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; z-index: 20; pointer-events: none; /* let clicks through to cancel/settings while loading */ } .mpdf-loading-overlay.mpdf-is-active { display: flex; } .mpdf-spinner { width: 34px; height: 34px; border: 3px solid rgba(255, 255, 255, 0.12); border-top-color: var(--interactive-accent); border-radius: 50%; flex-shrink: 0; } @media (prefers-reduced-motion: no-preference) { .mpdf-spinner { animation: mpdf-spin 0.65s linear infinite; } @keyframes mpdf-spin { to { transform: rotate(360deg); } } } .mpdf-loading-text { font-size: 12px; color: rgba(255, 255, 255, 0.65); font-family: var(--font-interface); letter-spacing: 0.02em; } /* width/height set inline to match the scaled page footprint */ .mpdf-page-wrap { position: relative; flex-shrink: 0; } .mpdf-page-label { position: absolute; top: -18px; left: 0; font-size: 10px; color: rgba(255, 255, 255, 0.3); font-family: var(--font-monospace); white-space: nowrap; } /* Clips the shadow-host to the scaled footprint; width/height set inline. */ .mpdf-page-scale { overflow: hidden; position: relative; } /* width/accent kept in CSS to avoid inline styles in JS */ .mpdf-topbar .mpdf-zoom-slider { width: 64px; accent-color: var(--interactive-accent); } /* Number inputs for the custom page-size control in the topbar */ .mpdf-custom-size-input { width: 52px; background: var(--background-primary); color: var(--text-normal); border: 1px solid var(--background-modifier-border); border-radius: 4px; font-size: 12px; padding: 3px 5px; outline: none; /* Suppress native spinners so the compact topbar stays tidy */ -moz-appearance: textfield; } .mpdf-custom-size-input::-webkit-outer-spin-button, .mpdf-custom-size-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } .mpdf-custom-size-input:hover, .mpdf-custom-size-input:focus { border-color: var(--interactive-accent); } /* Utility: toggle visibility without affecting layout flow */ .mpdf-is-hidden { display: none !important; } /* Static positioning for the per-page shadow-DOM host; width/height/transform set inline */ .mpdf-shadow-host { position: absolute; top: 0; left: 0; transform-origin: top left; }