/* ===== AI Model Workbench - Obsidian-native Design ===== */ /* --- Utility Classes --- */ body { --ai3d-radius: var(--radius-s); --ai3d-spacing: var(--size-4-3); } .is-hidden { display: none; } .ai3d-canvas-full { width: 100%; height: 100%; display: block; } .ai3d-settings-diagnostics { margin-top: 0.5rem; } .ai3d-settings-status-block { margin-bottom: 0.9rem; } .ai3d-annot-btn { position: relative; } .ai3d-inline-btn.ai3d-btn-active { color: var(--text-on-accent); background: var(--interactive-accent); } .ai3d-inline-btn.ai3d-btn-active:hover { filter: brightness(1.1); } .ai3d-res-btn { font-size: 10px; font-weight: 600; min-width: 32px; } /* --- Preview Host --- */ .ai3d-preview-host { min-height: var(--min-height, clamp(200px, 30vh, 400px)); max-width: var(--max-width, none); border-radius: var(--ai3d-radius) var(--ai3d-radius) 0 0; border: 1px solid var(--background-modifier-border); overflow: hidden; background: var(--background-secondary); position: relative; } .ai3d-preview-host canvas { width: 100%; height: 100%; display: block; } .ai3d-preview-host canvas.ai3d-disassembly-active, .ai3d-grid-host canvas.ai3d-disassembly-active, .ai3d-embed-preview canvas.ai3d-disassembly-active { cursor: grab; touch-action: none; } .ai3d-preview-host canvas.ai3d-disassembly-dragging, .ai3d-grid-host canvas.ai3d-disassembly-dragging, .ai3d-embed-preview canvas.ai3d-disassembly-dragging { cursor: grabbing; } .ai3d-preview-host.is-mobile-scroll-mode canvas, .ai3d-grid-host.is-mobile-scroll-mode canvas, .ai3d-embed-preview.is-mobile-scroll-mode .ai3d-embed-canvas { pointer-events: none; } .ai3d-preview-host.is-mobile-scroll-mode .ai3d-annotation-pin, .ai3d-grid-host.is-mobile-scroll-mode .ai3d-annotation-pin, .ai3d-embed-preview.is-mobile-scroll-mode .ai3d-annotation-pin { pointer-events: none; } .ai3d-preview-host.is-mobile-interactive, .ai3d-grid-host.is-mobile-interactive, .ai3d-embed-preview.is-mobile-interactive { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--interactive-accent) 45%, transparent); } .ai3d-preview-host.is-mobile-interactive canvas, .ai3d-grid-host.is-mobile-interactive canvas, .ai3d-embed-preview.is-mobile-interactive .ai3d-embed-canvas { pointer-events: auto; touch-action: none; } /* --- Empty / Loading States --- */ .ai3d-inline-empty { padding: var(--ai3d-spacing); text-align: center; color: var(--text-muted); font-size: var(--font-ui-small); line-height: 1.5; } .ai3d-load-feedback-shell { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: clamp(16px, 4vw, 28px); } .ai3d-load-feedback-shell.is-mobile { padding: 14px; } .ai3d-load-feedback { display: flex; flex-direction: column; gap: var(--size-4-1); align-items: center; justify-content: center; text-align: center; max-width: 420px; width: min(100%, 420px); margin: 0 auto; padding: 0; background: transparent; border: 0; box-shadow: none; } .ai3d-load-feedback-shell.is-mobile .ai3d-load-feedback { max-width: 300px; gap: 6px; } .ai3d-load-feedback.is-warning { color: var(--text-warning); } .ai3d-load-feedback.is-error { color: var(--text-error); } .ai3d-load-feedback-title { font-size: var(--font-ui-medium); font-weight: 600; color: var(--text-normal); } .ai3d-load-feedback-shell.is-mobile .ai3d-load-feedback-title { font-size: var(--font-ui-small); } .ai3d-load-feedback-message { color: var(--text-muted); line-height: 1.55; } .ai3d-load-feedback-hint { color: var(--text-faint); line-height: 1.5; } .ai3d-mobile-mode-hint { font-size: var(--font-ui-smaller); color: var(--text-faint); line-height: 1.45; } .ai3d-mobile-mode-hint--inline { padding: 6px 4px 0; } /* --- CM6 Widget: re-enable pointer events blocked by CodeMirror --- */ .ai3d-cm-widget, .ai3d-inline-wrapper { pointer-events: auto; } .ai3d-inline-toolbar, .ai3d-inline-toolbar button, .ai3d-inline-toolbar input, .ai3d-helper-toolbar, .ai3d-helper-toolbar button { pointer-events: auto; } /* --- Inline Controls Toolbar --- */ .ai3d-inline-toolbar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--background-secondary); border: 1px solid var(--background-modifier-border); border-radius: 8px 8px 0 0; flex-wrap: wrap; font-size: 12px; } .ai3d-inline-label { color: var(--text-muted); white-space: nowrap; font-size: 11px; } .ai3d-inline-value { color: var(--text-normal); font-weight: 600; min-width: 30px; text-align: right; font-size: 11px; } .ai3d-inline-slider { flex: 1; min-width: 60px; height: 3px; -webkit-appearance: none; appearance: none; background: var(--background-modifier-border); border-radius: 2px; outline: none; cursor: pointer; } .ai3d-inline-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--interactive-accent); cursor: pointer; } .ai3d-inline-axis-btn, .ai3d-inline-reset-btn { padding: 2px 8px; border-radius: var(--radius-s); border: 1px solid var(--background-modifier-border); background: var(--background-primary); color: var(--text-muted); font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; } .ai3d-inline-axis-btn:hover, .ai3d-inline-reset-btn:hover { border-color: var(--text-muted); color: var(--text-normal); } .ai3d-inline-axis-btn.is-active { background: var(--interactive-accent); color: var(--text-on-accent); border-color: transparent; } /* --- Inline Helper Toolbar (outside preview) --- */ .ai3d-helper-toolbar { container-type: inline-size; position: relative; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 4px; padding: 4px 2px; margin-top: -1px; border: 1px solid var(--background-modifier-border); border-top: none; border-radius: 0 0 var(--radius-s) var(--radius-s); background: var(--background-secondary); } .ai3d-helper-toolbar.is-mobile { justify-content: flex-start; flex-wrap: wrap; gap: 6px; padding: 6px 4px; } .ai3d-helper-group { display: flex; align-items: center; gap: 2px; } .ai3d-helper-group + .ai3d-helper-group { margin-left: 4px; padding-left: 4px; border-left: 1px solid var(--background-modifier-border); } .ai3d-helper-toolbar.is-mobile .ai3d-helper-group { gap: 4px; } .ai3d-helper-toolbar.is-mobile .ai3d-helper-group + .ai3d-helper-group { margin-left: 0; padding-left: 0; border-left: none; } .ai3d-helper-toolbar .ai3d-inline-btn.is-secondary { display: none; } .ai3d-helper-toolbar.show-secondary .ai3d-inline-btn.is-secondary { display: flex; } .ai3d-helper-toolbar:not(.show-secondary) .ai3d-helper-group-inspect:not(.has-primary-visible) { display: none; } .ai3d-helper-toolbar .ai3d-mobile-more-toggle { display: flex; margin-left: auto; } .ai3d-inline-btn { position: relative; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: none; border-radius: var(--radius-s); background: transparent; color: var(--text-muted); cursor: pointer; transition: color 0.15s ease, background 0.15s ease; padding: 0; } .ai3d-helper-toolbar.is-mobile .ai3d-inline-btn { width: 36px; height: 36px; } .ai3d-helper-toolbar.is-mobile .ai3d-mobile-mode-btn { width: auto; min-width: 56px; min-height: 34px; padding: 4px 10px; gap: 6px; justify-content: center; border: 1px solid var(--background-modifier-border); border-radius: 999px; background: var(--background-primary); font-size: var(--font-ui-smaller); font-weight: 600; } .ai3d-helper-toolbar.is-mobile .ai3d-mobile-mode-btn-label { line-height: 1; } .ai3d-helper-toolbar.is-mobile .ai3d-mobile-more-toggle { display: flex; margin-left: auto; } @container (max-width: 420px) { .ai3d-helper-toolbar-adaptive { justify-content: flex-start; gap: 6px; padding: 6px 4px; } .ai3d-helper-toolbar-adaptive .ai3d-helper-group { gap: 4px; } .ai3d-helper-toolbar-adaptive .ai3d-helper-group + .ai3d-helper-group { margin-left: 0; padding-left: 0; border-left: none; } .ai3d-helper-toolbar-adaptive .ai3d-inline-btn.is-secondary { display: none; } .ai3d-helper-toolbar-adaptive.show-secondary .ai3d-inline-btn.is-secondary { display: flex; } .ai3d-helper-toolbar-adaptive:not(.show-secondary) .ai3d-helper-group-inspect:not(.has-primary-visible) { display: none; } .ai3d-helper-toolbar-adaptive .ai3d-mobile-more-toggle { display: flex; margin-left: auto; } } .ai3d-inline-btn:hover { color: var(--text-normal); background: var(--background-modifier-hover); } /* SVG icons inside plugin buttons — shared sizing and stroke styling. */ .ai3d-inline-btn svg, .ai3d-annot-action-btn svg { width: 14px; height: 14px; display: block; } .ai3d-inline-btn svg *, .ai3d-annot-action-btn svg * { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } /* --- Grid Host (3dgrid) --- */ .ai3d-grid-host { height: var(--grid-height, auto); border-radius: var(--ai3d-radius) var(--ai3d-radius) 0 0; border: 1px solid var(--background-modifier-border); overflow: hidden; background: var(--background-secondary); position: relative; max-height: clamp(250px, 40vh, 450px); } .ai3d-grid-host canvas { width: 100%; height: 100%; display: block; } /* --- JSON Config Error --- */ .ai3d-json-error { padding: var(--ai3d-spacing); border-radius: var(--radius-s); background: var(--background-modifier-error); border: 1px solid var(--color-red); color: var(--text-normal); font-size: var(--font-ui-small); } .ai3d-json-error pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--font-monospace); font-size: var(--font-ui-smaller); color: var(--text-muted); } /* --- Tooltip --- */ .ai3d-tooltip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 3px 8px; border-radius: var(--radius-s); background: var(--background-primary); color: var(--text-normal); font-size: 11px; white-space: nowrap; pointer-events: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); animation: ai3d-fade-in-centered 0.15s ease; } @keyframes ai3d-fade-in-centered { from { opacity: 0; transform: translateX(-50%) translateY(4px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } } /* --- Direct File View --- */ .ai3d-direct-view { height: 100%; display: flex; flex-direction: column; } .ai3d-workspace { display: grid; grid-template-rows: 1fr 4px auto; height: 100%; min-height: 0; } .ai3d-workspace-track-top { display: grid; grid-template-columns: 1fr 4px 200px; min-height: 0; overflow: hidden; } .ai3d-workspace-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; } .ai3d-workspace-main .ai3d-preview-host { flex: 1; min-height: 0; } .ai3d-workspace-main .ai3d-helper-toolbar { flex-shrink: 0; } .ai3d-workspace-sidebar { display: flex; flex-direction: column; background: var(--background-secondary); border-left: 1px solid var(--background-modifier-border); overflow-y: auto; overflow-x: hidden; min-height: 0; } .ai3d-sidebar-content { display: flex; flex-direction: column; gap: 8px; padding: 8px; min-height: 0; overflow-y: auto; } .ai3d-sidebar-content .ai3d-direct-workbench-control { min-width: 0; padding: 6px 8px; border: 1px solid var(--background-modifier-border); border-radius: var(--radius-s); background: var(--background-primary); } .ai3d-sidebar-content .ai3d-direct-workbench-control-head, .ai3d-sidebar-content .ai3d-direct-workbench-actions { display: flex; gap: 6px; flex-wrap: wrap; } .ai3d-sidebar-content .ai3d-direct-workbench-control-head { justify-content: space-between; } .ai3d-sidebar-content .ai3d-direct-workbench-action { padding: 5px 10px; border: 1px solid var(--background-modifier-border); border-radius: var(--radius-s); background: var(--background-primary); color: var(--text-normal); font-size: var(--font-ui-smaller); cursor: pointer; transition: background 0.15s, border-color 0.15s; } .ai3d-sidebar-content .ai3d-direct-workbench-action:hover { background: var(--background-modifier-hover); border-color: var(--interactive-accent); } .ai3d-sidebar-content .ai3d-direct-workbench-action:disabled { opacity: 0.45; cursor: not-allowed; } .ai3d-sidebar-content .ai3d-direct-workbench-empty { color: var(--text-muted); font-size: var(--font-ui-smaller); padding: 8px 0; } .ai3d-sidebar-content .ai3d-direct-workbench-match-list { display: flex; flex-direction: column; gap: 6px; } .ai3d-sidebar-content .ai3d-direct-workbench-match { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; padding: 6px 8px; border: 1px solid var(--background-modifier-border); border-radius: var(--radius-s); background: var(--background-primary); } .ai3d-sidebar-content .ai3d-direct-workbench-match-main, .ai3d-sidebar-content .ai3d-direct-workbench-match-side { min-width: 0; } .ai3d-sidebar-content .ai3d-direct-workbench-match-main { display: flex; flex-direction: column; gap: 2px; } .ai3d-sidebar-content .ai3d-direct-workbench-match-side { display: flex; gap: 6px; align-items: center; } .ai3d-sidebar-content .ai3d-direct-workbench-match-title, .ai3d-sidebar-content .ai3d-direct-workbench-match-source, .ai3d-sidebar-content .ai3d-direct-workbench-match-model, .ai3d-sidebar-content .ai3d-direct-workbench-match-target, .ai3d-sidebar-content .ai3d-direct-workbench-match-reasons { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ai3d-sidebar-content .ai3d-direct-workbench-match-title { color: var(--text-normal); font-weight: 600; font-size: 12px; } .ai3d-sidebar-content .ai3d-direct-workbench-match-source { color: var(--text-muted); } .ai3d-sidebar-content .ai3d-direct-workbench-match-model { color: var(--text-faint); } .ai3d-sidebar-content .ai3d-direct-workbench-match-target { color: var(--text-muted); font-size: 11px; } .ai3d-sidebar-content .ai3d-direct-workbench-match-reasons { color: var(--text-faint); font-size: 10px; } .ai3d-sidebar-content .ai3d-direct-workbench-match-score { color: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; } .ai3d-sidebar-content .ai3d-direct-workbench-match-open { min-width: 44px; } .ai3d-resize-handle { background: var(--background-modifier-border); user-select: none; position: relative; z-index: 1; transition: background 0.15s; } .ai3d-resize-handle:hover { background: var(--interactive-accent); } .ai3d-resize-handle-h { cursor: col-resize; } .ai3d-resize-handle-v { cursor: row-resize; } .ai3d-direct-view .ai3d-preview-host { flex: 1; min-height: 0; } .ai3d-direct-workbench-panel { display: grid; grid-template-columns: minmax(220px, 0.9fr) minmax(320px, 1.4fr); gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--background-modifier-border); border-top: none; border-radius: 0 0 var(--radius-s) var(--radius-s); background: var(--background-secondary); font-size: var(--font-ui-smaller); } .ai3d-direct-workbench-overview, .ai3d-direct-workbench-status, .ai3d-direct-workbench-metrics, .ai3d-direct-workbench-controls { min-width: 0; display: flex; gap: 8px; } .ai3d-direct-workbench-overview, .ai3d-direct-workbench-status, .ai3d-direct-workbench-controls { flex-direction: column; } .ai3d-direct-workbench-metrics { flex-wrap: wrap; align-content: flex-start; } .ai3d-direct-workbench-line, .ai3d-direct-workbench-metric, .ai3d-direct-workbench-control { min-width: 0; padding: 6px 8px; border: 1px solid var(--background-modifier-border); border-radius: var(--radius-s); background: var(--background-primary); } .ai3d-direct-workbench-line, .ai3d-direct-workbench-metric { display: flex; flex-direction: column; gap: 2px; } .ai3d-direct-workbench-metric { flex: 1 1 84px; } .ai3d-direct-workbench-route { flex: 1; } .ai3d-direct-workbench-label { color: var(--text-muted); font-size: 11px; line-height: 1.25; } .ai3d-direct-workbench-value { min-width: 0; color: var(--text-normal); font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ai3d-direct-workbench-control { display: flex; flex-direction: column; gap: 6px; } .ai3d-direct-workbench-control-head, .ai3d-direct-workbench-actions { display: flex; align-items: center; gap: 8px; } .ai3d-direct-workbench-control-head { justify-content: space-between; } .ai3d-direct-workbench-action { min-height: 26px; padding: 2px 8px; border: 1px solid var(--background-modifier-border); border-radius: var(--radius-s); background: var(--background-primary); color: var(--text-muted); font-size: var(--font-ui-smaller); cursor: pointer; } .ai3d-direct-workbench-action:hover { color: var(--text-normal); border-color: var(--interactive-accent); } .ai3d-direct-workbench-action:disabled { cursor: default; opacity: 0.55; } .ai3d-direct-workbench-knowledge { gap: 4px; } .ai3d-direct-workbench-registered { gap: 6px; } .ai3d-direct-workbench-registered-body { min-width: 0; } .ai3d-direct-workbench-empty { color: var(--text-muted); line-height: 1.35; } .ai3d-direct-workbench-match-list { display: flex; flex-direction: column; gap: 6px; } .ai3d-direct-workbench-match { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; min-width: 0; padding: 6px; border: 1px solid var(--background-modifier-border); border-radius: var(--radius-s); background: var(--background-secondary); } .ai3d-direct-workbench-match-main, .ai3d-direct-workbench-match-side { min-width: 0; } .ai3d-direct-workbench-match-main { display: flex; flex-direction: column; gap: 2px; } .ai3d-direct-workbench-match-side { display: flex; align-items: center; gap: 6px; } .ai3d-direct-workbench-match-title, .ai3d-direct-workbench-match-source, .ai3d-direct-workbench-match-model, .ai3d-direct-workbench-match-target, .ai3d-direct-workbench-match-reasons { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ai3d-direct-workbench-match-title { color: var(--text-normal); font-weight: 600; } .ai3d-direct-workbench-match-source { color: var(--text-muted); } .ai3d-direct-workbench-match-model { color: var(--text-faint); } .ai3d-direct-workbench-match-target { color: var(--text-faint); font-size: var(--font-ui-smaller); } .ai3d-direct-workbench-match-reasons { color: var(--text-faint); } .ai3d-direct-workbench-match-score { min-width: 34px; color: var(--text-accent); font-weight: 700; text-align: right; } .ai3d-direct-workbench-match-open { min-width: 44px; } @media (max-width: 760px) { .ai3d-workspace-track-top { grid-template-columns: 1fr; grid-template-rows: 1fr 4px auto; } .ai3d-resize-handle-h { cursor: row-resize; } .ai3d-workspace-sidebar { flex-direction: row; border-left: none; border-top: 1px solid var(--background-modifier-border); overflow-x: auto; overflow-y: hidden; } .ai3d-sidebar-content { flex-direction: row; gap: 8px; padding: 4px; min-width: min-content; } .ai3d-direct-workbench-panel { grid-template-columns: 1fr; } .ai3d-direct-workbench-controls { gap: 8px; } .ai3d-direct-workbench-match { grid-template-columns: 1fr; } .ai3d-direct-workbench-match-side { justify-content: space-between; } } /* --- Responsive: Narrow Sidebar --- */ @media (max-width: 400px) { .ai3d-preview-host { min-height: 240px; } .ai3d-inline-toolbar { padding: 8px; gap: 6px; } .ai3d-inline-axis-btn, .ai3d-inline-reset-btn { min-height: 30px; padding: 4px 10px; } .ai3d-helper-toolbar { justify-content: flex-start; flex-wrap: wrap; gap: 6px; padding: 6px 4px; } .ai3d-inline-btn { width: 34px; height: 34px; } .ai3d-inline-btn svg, .ai3d-annot-action-btn svg { width: 16px; height: 16px; } .ai3d-embed-canvas { height: var(--ai3d-embed-height, 220px); } } /* --- Live Preview Embed --- */ .ai3d-embed-preview { position: relative; width: 100%; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--background-modifier-border); background: var(--background-primary); } .ai3d-embed-preview.is-mobile { border-radius: var(--radius-m); } .ai3d-embed-canvas { display: block; width: 100%; height: var(--ai3d-embed-height, 300px); touch-action: pan-y pinch-zoom; } .ai3d-mobile-mode-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--size-4-2); padding: 6px 10px 8px; border-top: 1px solid var(--background-modifier-border); background: var(--background-secondary); } .ai3d-mobile-mode-bar.is-detached { margin-top: -1px; border: 1px solid var(--background-modifier-border); border-top: none; border-radius: 0 0 var(--ai3d-radius) var(--ai3d-radius); } .ai3d-mobile-mode-btn { flex-shrink: 0; min-width: 56px; min-height: 34px; padding: 4px 10px; border: 1px solid var(--background-modifier-border); border-radius: 999px; background: var(--background-primary); color: var(--text-muted); font-size: var(--font-ui-smaller); font-weight: 600; } .ai3d-embed-loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--text-muted); font-size: var(--font-ui-small); } .ai3d-embed-error { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--text-error); font-size: var(--font-ui-small); text-align: center; padding: 8px; } /* --- Loading Overlay --- */ .ai3d-loading-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: color-mix(in srgb, var(--background-primary) 85%, transparent); z-index: 10; pointer-events: none; transition: opacity 0.3s ease; } .ai3d-loading-overlay > :not(.ai3d-loading-skeleton) { position: relative; z-index: 1; } .ai3d-loading-overlay.is-hiding { opacity: 0; } .ai3d-loading-skeleton { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--background-secondary) 92%, transparent), color-mix(in srgb, var(--background-primary) 82%, transparent)); overflow: hidden; } .ai3d-loading-skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.18) 45%, transparent 100%); transform: translateX(-100%); animation: ai3d-skeleton-sweep 1.5s ease-in-out infinite; } .ai3d-loading-skeleton-canvas { flex: 1; border-radius: var(--radius-m); background: color-mix(in srgb, var(--background-modifier-border) 80%, transparent); } .ai3d-loading-skeleton-meta { display: flex; flex-direction: column; gap: 8px; } .ai3d-loading-skeleton-line { height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--background-modifier-border) 75%, transparent); } .ai3d-loading-skeleton-line.is-short { width: 60%; } @keyframes ai3d-skeleton-sweep { to { transform: translateX(100%); } } .ai3d-loading-spinner { width: 28px; height: 28px; border: 3px solid var(--background-modifier-border); border-top-color: var(--interactive-accent); border-radius: 50%; animation: ai3d-spin 0.8s linear infinite; } @keyframes ai3d-spin { to { transform: rotate(360deg); } } .ai3d-loading-text { color: var(--text-muted); font-size: var(--font-ui-small); text-align: center; } .ai3d-loading-bar-track { width: 160px; height: 3px; border-radius: 2px; background: var(--background-modifier-border); overflow: hidden; } .ai3d-loading-bar-fill { height: 100%; border-radius: 2px; background: var(--interactive-accent); width: var(--bar-width, 0%); transition: width 0.4s ease; } .ai3d-loading-bar-fill.is-indeterminate { width: 40%; animation: ai3d-indeterminate 1.4s ease-in-out infinite; } @keyframes ai3d-indeterminate { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } } /* ===== Model Performance Feedback ===== */ .ai3d-performance-feedback { position: absolute; right: 10px; bottom: 10px; z-index: 6; display: flex; align-items: center; gap: 7px; max-width: min(320px, calc(100% - 20px)); padding: 6px 9px; color: #f8fafc; background: rgba(10, 15, 22, 0.72); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28); pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease; } .ai3d-performance-feedback.is-subtle { opacity: 0.58; } .ai3d-performance-feedback-tier { flex: 0 0 auto; padding: 2px 6px; border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 1.2; text-transform: uppercase; color: #111827; background: #fbbf24; } .ai3d-performance-feedback.is-extreme .ai3d-performance-feedback-tier { color: #ffffff; background: #ef4444; } .ai3d-performance-feedback-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1.3; } /* ===== Annotation Pins ===== */ .ai3d-annotation-overlay { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; } /* Semi-transparent overlay when annotation mode is active */ .ai3d-annot-mode-overlay { position: absolute; inset: 0; z-index: 4; background: rgba(74, 158, 255, 0.06); border: 2px solid rgba(74, 158, 255, 0.3); border-radius: inherit; pointer-events: none; animation: ai3d-annot-pulse 2s ease-in-out infinite; } @keyframes ai3d-annot-pulse { 0%, 100% { border-color: rgba(74, 158, 255, 0.3); } 50% { border-color: rgba(74, 158, 255, 0.6); } } .ai3d-annotation-pin { --pin-anchor-x: 13px; --pin-anchor-translate: translate(calc(-1 * var(--pin-anchor-x)), calc(-50% + var(--pin-offset-y, 0px))); position: absolute; left: var(--pin-left, 0); top: var(--pin-top, 0); transform: var(--pin-anchor-translate); transform-origin: var(--pin-anchor-x) 50%; display: flex; align-items: center; gap: 5px; pointer-events: auto; cursor: default; user-select: none; padding: 3px 8px 3px 6px; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.15); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)); transition: opacity 0.25s ease, filter 0.25s ease, background 0.25s ease, border-color 0.25s ease; will-change: transform; } .ai3d-annotation-pin--dot { --pin-anchor-x: 8px; width: 18px; height: 18px; justify-content: center; gap: 0; padding: 0; border-radius: 50%; } .ai3d-annotation-pin--dot .ai3d-pin-dot { width: 12px; height: 12px; } .ai3d-annotation-pin--snippet { --pin-anchor-x: 13px; align-items: flex-start; gap: 7px; width: min(260px, 46vw); padding: 6px 9px 7px 7px; border-radius: var(--radius-s); } .ai3d-pin-content { min-width: 0; display: flex; flex-direction: column; gap: 3px; } .ai3d-pin-snippet { max-height: 82px; overflow: hidden; font-size: 10.5px; line-height: 1.35; font-weight: 400; color: rgba(255, 255, 255, 0.74); white-space: pre-wrap; word-break: break-word; } .ai3d-pin-snippet--markdown { white-space: normal; } .ai3d-pin-snippet--markdown > :first-child, .ai3d-pin-snippet--markdown > :last-child { margin-block-start: 0; margin-block-end: 0; } .ai3d-pin-snippet--markdown pre { max-width: 100%; overflow: hidden; white-space: pre-wrap; } .ai3d-annotation-pin:hover { transform: var(--pin-anchor-translate) scale(1.05); background: rgba(0, 0, 0, 0.7); } /* Occluded pin (behind model geometry) */ .ai3d-annotation-pin.ai3d-pin-occluded { visibility: hidden; opacity: 0; pointer-events: none; } /* Fully hidden pin (behind camera or outside the projected viewport) */ .ai3d-annotation-pin.ai3d-pin-hidden { visibility: hidden; opacity: 0; pointer-events: none; } .ai3d-pin-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pin-color, #4a9eff); border: 2px solid rgba(255, 255, 255, 0.8); flex-shrink: 0; box-shadow: 0 0 6px currentColor; } .ai3d-pin-label { font-size: 11px; font-weight: 600; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ai3d-pin-delete { display: none; background: rgba(255, 60, 60, 0.85); color: #ffffff; border: none; border-radius: 50%; width: 16px; height: 16px; font-size: 11px; line-height: 16px; text-align: center; cursor: pointer; padding: 0; flex-shrink: 0; } .ai3d-annotation-pin:hover .ai3d-pin-delete { display: block; } /* Annotation editor popup */ .ai3d-annotation-editor { position: absolute; left: var(--editor-left, 0); top: var(--editor-top, 0); z-index: 20; background: var(--background-primary); border: 1px solid var(--background-modifier-border); border-radius: var(--radius-m); padding: 8px; min-width: 180px; max-width: 240px; pointer-events: auto; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); display: flex; flex-direction: column; gap: 6px; } .ai3d-annotation-editor-input { width: 100%; font-size: 13px; padding: 4px 8px; border: 1px solid var(--background-modifier-border); border-radius: var(--radius-s); background: var(--background-secondary); color: var(--text-normal); outline: none; box-sizing: border-box; } .ai3d-annotation-editor-input:focus { border-color: var(--interactive-accent); } .ai3d-annotation-editor-colors { display: flex; gap: 4px; } .ai3d-pin-color-swatch { width: 18px; height: 18px; appearance: none; -webkit-appearance: none; display: block; border-radius: 50%; background: var(--swatch-color, #4a9eff); background-image: none; border: 2px solid transparent; cursor: pointer; padding: 0; transition: border-color 0.15s; flex-shrink: 0; } .ai3d-pin-color-swatch.is-selected { background: var(--swatch-color, #4a9eff); border-color: var(--text-normal, #ffffff); box-shadow: 0 0 0 2px color-mix(in srgb, var(--text-normal, #ffffff) 22%, transparent); transform: scale(1.08); } .ai3d-pin-color-swatch:hover { border-color: var(--text-muted, #999999); } .ai3d-annotation-editor-actions { display: flex; gap: 4px; justify-content: flex-end; } .ai3d-annotation-editor-btn { font-size: 12px; padding: 3px 10px; border-radius: var(--radius-s); border: 1px solid var(--background-modifier-border); background: var(--background-secondary); color: var(--text-normal); cursor: pointer; } .ai3d-annotation-editor-confirm { background: var(--interactive-accent); color: var(--text-on-accent); border-color: var(--interactive-accent); } .ai3d-annotation-editor-delete { background: var(--background-secondary); color: var(--text-error); border-color: var(--text-error); margin-right: auto; } .ai3d-annotation-editor-delete:hover { background: var(--text-error); color: var(--text-on-accent); } /* Editor input wrapper */ .ai3d-editor-input-wrap { position: relative; width: 100%; } /* Binding tag: shown below input when a heading is selected */ .ai3d-editor-binding-tag { display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; padding: 1px 6px; font-size: 11px; background: var(--background-secondary); color: var(--text-muted); border-radius: var(--radius-s); border: 1px solid var(--background-modifier-border); max-width: 100%; overflow: hidden; white-space: nowrap; } .ai3d-editor-binding-text { overflow: hidden; text-overflow: ellipsis; } .ai3d-editor-binding-clear { font-size: 10px; line-height: 1; border: none; background: none; color: var(--text-muted); cursor: pointer; padding: 0 2px; } .ai3d-editor-binding-clear:hover { color: var(--text-error); } /* Content preview: shows heading section content */ .ai3d-editor-content-preview { font-size: 12px; line-height: 1.45; color: var(--text-muted); background: var(--background-secondary); border: 1px solid var(--background-modifier-border); border-radius: var(--radius-s); padding: 6px 8px; max-height: 100px; overflow-y: auto; white-space: pre-wrap; word-break: break-word; } .ai3d-editor-content-preview--markdown { white-space: normal; } .ai3d-editor-content-preview--markdown > :first-child, .ai3d-editor-content-preview--markdown > :last-child, .ai3d-pin-popover-body--markdown > :first-child, .ai3d-pin-popover-body--markdown > :last-child { margin-block-start: 0; margin-block-end: 0; } .ai3d-editor-content-preview--markdown pre, .ai3d-pin-popover-body--markdown pre { white-space: pre; overflow-x: auto; } .ai3d-editor-content-preview--markdown code, .ai3d-pin-popover-body--markdown code { word-break: normal; } .ai3d-editor-content-preview--empty { font-style: italic; color: var(--text-faint); } /* Heading autocomplete dropdown */ .ai3d-heading-dropdown { max-height: 180px; overflow-y: auto; background: var(--background-primary); border: 1px solid var(--background-modifier-border); border-radius: var(--radius-s); box-shadow: 0 4px 12px rgba(0,0,0,0.15); } .ai3d-heading-dropdown-item { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; font-size: 12px; cursor: pointer; gap: 6px; } .ai3d-heading-dropdown-item:hover, .ai3d-heading-dropdown-item.active { background: var(--background-modifier-hover); } .ai3d-heading-dropdown-heading { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-normal); } .ai3d-heading-dropdown-note { flex-shrink: 0; font-size: 11px; color: var(--text-muted); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* Annotations panel section */ .ai3d-annot-section { display: flex; flex-direction: column; gap: 8px; } .ai3d-annot-toggle-row { display: flex; align-items: center; gap: 8px; } .ai3d-annot-hint { font-size: var(--font-ui-smaller); color: var(--text-muted); } .ai3d-annot-list { display: flex; flex-direction: column; gap: 4px; } .ai3d-annot-item { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: var(--radius-s); transition: background 0.15s ease; } .ai3d-annot-item:hover { background: var(--background-modifier-hover); } .ai3d-annot-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; } .ai3d-annot-label { font-size: var(--font-ui-small); color: var(--text-normal); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; } .ai3d-annot-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s ease; flex-shrink: 0; } .ai3d-annot-item:hover .ai3d-annot-actions { opacity: 1; } .ai3d-annot-action-btn { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border: none; background: transparent; color: var(--text-muted); cursor: pointer; border-radius: var(--radius-s); padding: 0; } .ai3d-annot-action-btn:hover { background: var(--background-modifier-hover); color: var(--text-normal); } .ai3d-annot-action-btn.is-delete:hover { color: var(--text-error); } /* Pin count badge on annotation toolbar button */ .ai3d-pin-badge { position: absolute; top: -4px; right: -4px; min-width: 14px; height: 14px; border-radius: 7px; background: var(--interactive-accent); color: var(--text-on-accent); font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 3px; pointer-events: none; } /* --- Pin Hover Popover --- */ .ai3d-pin-popover { position: fixed; left: var(--popover-left, 0); top: var(--popover-top, 0); z-index: 100; max-width: 320px; max-height: 240px; background: var(--background-primary); border: 1px solid var(--background-modifier-border); border-radius: var(--radius-s); box-shadow: var(--shadow-s); overflow: hidden; transform: translateX(-50%); pointer-events: auto; } .ai3d-pin-popover-title { padding: 6px 10px; font-size: 12px; font-weight: 600; color: var(--text-accent); border-bottom: 1px solid var(--background-modifier-border); } .ai3d-pin-popover-body { padding: 8px 10px; font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; line-clamp: 8; -webkit-line-clamp: 8; -webkit-box-orient: vertical; } .ai3d-pin-popover-body--markdown { display: block; overflow-y: auto; text-overflow: unset; line-clamp: unset; -webkit-line-clamp: unset; -webkit-box-orient: initial; white-space: normal; word-break: break-word; } /* --- Pin Pulse Animation (note heading hover) --- */ @keyframes ai3d-pin-pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 158, 255, 0.6); transform: var(--pin-anchor-translate) scale(1); } 50% { box-shadow: 0 0 0 8px rgba(74, 158, 255, 0); transform: var(--pin-anchor-translate) scale(1.2); } 100% { box-shadow: 0 0 0 0 rgba(74, 158, 255, 0); transform: var(--pin-anchor-translate) scale(1); } } .ai3d-pin-pulse { animation: ai3d-pin-pulse 1.2s ease-out; } /* --- Heading Pin Badge --- */ .ai3d-heading-pin-badge { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-size: 0.75em; opacity: 0.5; transition: opacity 0.15s; vertical-align: middle; } .ai3d-heading-pin-badge-swatch { width: 0.8em; height: 0.8em; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.65); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); flex-shrink: 0; cursor: pointer; transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s; } .ai3d-heading-pin-badge-count { font-size: 0.95em; font-weight: 700; line-height: 1; color: var(--text-muted); } .ai3d-heading-pin-badge:hover { opacity: 0.9; } .ai3d-heading-pin-badge-swatch:hover, .ai3d-heading-pin-badge-swatch:focus-visible { opacity: 1; transform: scale(1.3); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 0 0 3px rgba(255, 255, 255, 0.14); outline: none; } /* Keep utility hiding stronger than later hover/layout display rules. */ body .is-hidden.is-hidden.is-hidden { display: none; } /* Measurement calibration panel */ .ai3d-calibrate-panel { padding: 8px 12px; margin-top: 4px; background: var(--background-primary); border: 1px solid var(--background-modifier-border); border-radius: 6px; font-size: 12px; color: var(--text-normal); } .ai3d-calibrate-panel.is-hidden { display: none; } .ai3d-calibrate-title { font-weight: 600; margin-bottom: 6px; color: var(--text-normal); } .ai3d-calibrate-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; } .ai3d-calibrate-label { min-width: 70px; color: var(--text-muted); } .ai3d-calibrate-readonly { font-size: 11px; color: var(--text-faint); } .ai3d-calibrate-input { width: 60px; padding: 2px 4px; font-size: 12px; background: var(--background-primary); border: 1px solid var(--background-modifier-border); border-radius: 4px; color: var(--text-normal); } .ai3d-calibrate-select { padding: 2px 4px; font-size: 12px; background: var(--background-primary); border: 1px solid var(--background-modifier-border); border-radius: 4px; color: var(--text-normal); } .ai3d-calibrate-lock { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted); cursor: pointer; } .ai3d-calibrate-actions { margin-top: 6px; gap: 6px; }