mirror of
https://github.com/flash555588/ai-model-workbench.git
synced 2026-07-22 06:56:38 +00:00
1784 lines
36 KiB
CSS
1784 lines
36 KiB
CSS
/* ===== AI 3D Model Workbench — Obsidian-native Design ===== */
|
|
|
|
/* --- Utility Classes --- */
|
|
|
|
.is-hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
.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-btn-active {
|
|
color: var(--interactive-accent, #7f6df2);
|
|
}
|
|
|
|
.ai3d-res-btn {
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
min-width: 32px;
|
|
}
|
|
|
|
/* --- Layout --- */
|
|
|
|
.ai3d-workbench {
|
|
--ai3d-spacing: var(--size-4-3);
|
|
--ai3d-radius: var(--radius-s);
|
|
--ai3d-radius-l: var(--radius-l);
|
|
padding: var(--ai3d-spacing);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--ai3d-spacing);
|
|
height: 100%;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.ai3d-workbench.is-mobile {
|
|
--ai3d-spacing: var(--size-4-2);
|
|
padding: var(--size-4-2);
|
|
}
|
|
|
|
/* --- Section --- */
|
|
|
|
.ai3d-section {
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: var(--ai3d-radius-l);
|
|
background: var(--background-primary);
|
|
}
|
|
|
|
.ai3d-section-header {
|
|
padding: var(--ai3d-spacing) var(--ai3d-spacing) 0;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
gap: var(--size-4-2);
|
|
}
|
|
|
|
.ai3d-section-title {
|
|
font-size: var(--font-ui-small);
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.ai3d-section-subtitle {
|
|
font-size: var(--font-ui-smaller);
|
|
color: var(--text-muted);
|
|
margin-top: 2px;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.ai3d-section-body {
|
|
padding: var(--ai3d-spacing);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--ai3d-spacing);
|
|
}
|
|
|
|
/* --- Model Status --- */
|
|
|
|
.ai3d-model-status {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--size-4-2);
|
|
padding: var(--size-4-2) var(--ai3d-spacing);
|
|
border-radius: var(--ai3d-radius);
|
|
background: var(--background-secondary);
|
|
border: 1px solid var(--background-modifier-border);
|
|
min-height: 36px;
|
|
}
|
|
|
|
.ai3d-model-name {
|
|
font-size: var(--font-ui-small);
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.ai3d-model-meta {
|
|
font-size: var(--font-ui-smaller);
|
|
color: var(--text-muted);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.ai3d-status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: var(--text-muted);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.ai3d-status-dot.is-active {
|
|
background: var(--color-green);
|
|
}
|
|
|
|
.ai3d-status-dot.is-loading {
|
|
background: var(--color-yellow);
|
|
animation: ai3d-pulse 1.2s ease-in-out infinite;
|
|
}
|
|
|
|
.ai3d-status-dot.is-error {
|
|
background: var(--color-red);
|
|
}
|
|
|
|
@keyframes ai3d-pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.4; }
|
|
}
|
|
|
|
/* --- Toolbar --- */
|
|
|
|
.ai3d-toolbar {
|
|
display: flex;
|
|
gap: var(--size-4-1);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.ai3d-toolbar .clickable-icon {
|
|
width: 28px;
|
|
height: 28px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: var(--ai3d-radius);
|
|
color: var(--text-muted);
|
|
cursor: pointer;
|
|
transition: color 0.15s ease, background 0.15s ease;
|
|
}
|
|
|
|
.ai3d-toolbar .clickable-icon:hover {
|
|
color: var(--text-normal);
|
|
background: var(--background-modifier-hover);
|
|
}
|
|
|
|
/* --- 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.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-empty-state {
|
|
position: absolute;
|
|
inset: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: var(--ai3d-spacing);
|
|
text-align: center;
|
|
gap: var(--size-4-2);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.ai3d-empty-icon {
|
|
font-size: 28px;
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.ai3d-empty-title {
|
|
font-size: var(--font-ui-small);
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.ai3d-empty-text {
|
|
font-size: var(--font-ui-smaller);
|
|
color: var(--text-faint);
|
|
max-width: 240px;
|
|
line-height: 1.45;
|
|
}
|
|
|
|
.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;
|
|
}
|
|
|
|
|
|
|
|
/* --- File Path --- */
|
|
|
|
.ai3d-file-path {
|
|
font-size: var(--font-ui-smaller);
|
|
color: var(--text-faint);
|
|
word-break: break-all;
|
|
line-height: 1.4;
|
|
margin: 0;
|
|
}
|
|
|
|
/* --- Preview Summary Grid --- */
|
|
|
|
.ai3d-summary-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: var(--size-4-1);
|
|
}
|
|
|
|
.ai3d-summary-item {
|
|
padding: var(--size-4-2);
|
|
border-radius: var(--ai3d-radius);
|
|
background: var(--background-secondary);
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.ai3d-summary-label {
|
|
font-size: var(--font-ui-smaller);
|
|
color: var(--text-muted);
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.ai3d-summary-value {
|
|
font-size: var(--font-ui-small);
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
/* --- Fields (form inputs) --- */
|
|
|
|
.ai3d-field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--size-4-1);
|
|
}
|
|
|
|
.ai3d-field-label {
|
|
font-size: var(--font-ui-smaller);
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.ai3d-input,
|
|
.ai3d-textarea {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
border-radius: var(--ai3d-radius);
|
|
border: 1px solid var(--background-modifier-border);
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
font-size: var(--font-ui-small);
|
|
padding: var(--size-4-2) var(--size-4-3);
|
|
transition: border-color 0.15s ease;
|
|
}
|
|
|
|
.ai3d-input:focus,
|
|
.ai3d-textarea:focus {
|
|
border-color: var(--interactive-accent);
|
|
outline: none;
|
|
box-shadow: 0 0 0 1px var(--interactive-accent);
|
|
}
|
|
|
|
.ai3d-textarea {
|
|
resize: vertical;
|
|
min-height: 72px;
|
|
font-family: inherit;
|
|
}
|
|
|
|
/* --- Tag Chips --- */
|
|
|
|
.ai3d-tag-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--size-4-2);
|
|
}
|
|
|
|
.ai3d-tag-section-title {
|
|
font-size: var(--font-ui-smaller);
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.ai3d-tag-list {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: var(--size-4-1);
|
|
}
|
|
|
|
.ai3d-tag-chip {
|
|
padding: 2px var(--size-4-2);
|
|
border-radius: var(--ai3d-radius);
|
|
border: 1px solid var(--background-modifier-border);
|
|
background: var(--background-secondary);
|
|
color: var(--text-normal);
|
|
font-size: var(--font-ui-smaller);
|
|
font-weight: 500;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.ai3d-tag-chip.is-accent {
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
border-color: transparent;
|
|
}
|
|
|
|
.ai3d-tag-empty {
|
|
font-size: var(--font-ui-smaller);
|
|
color: var(--text-faint);
|
|
font-style: italic;
|
|
}
|
|
|
|
/* --- Note Card --- */
|
|
|
|
.ai3d-note-card {
|
|
padding: var(--ai3d-spacing);
|
|
border-radius: var(--ai3d-radius);
|
|
background: var(--background-secondary);
|
|
border: 1px solid var(--background-modifier-border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--size-4-2);
|
|
}
|
|
|
|
.ai3d-note-row {
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: var(--size-4-2);
|
|
font-size: var(--font-ui-small);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.ai3d-note-label {
|
|
color: var(--text-muted);
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.ai3d-note-value {
|
|
color: var(--text-normal);
|
|
word-break: break-all;
|
|
}
|
|
|
|
/* --- Hint Text --- */
|
|
|
|
.ai3d-hint {
|
|
font-size: var(--font-ui-smaller);
|
|
color: var(--text-muted);
|
|
line-height: 1.5;
|
|
margin: 0;
|
|
}
|
|
|
|
/* --- Actions Row --- */
|
|
|
|
.ai3d-actions {
|
|
display: flex;
|
|
gap: var(--size-4-2);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
/* --- Divider --- */
|
|
|
|
.ai3d-divider {
|
|
height: 1px;
|
|
background: var(--background-modifier-border);
|
|
margin: var(--size-4-1) 0;
|
|
}
|
|
|
|
/* --- Disassembly Controls --- */
|
|
|
|
.ai3d-disassemble-controls {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--size-4-2);
|
|
padding: var(--ai3d-spacing);
|
|
border-radius: var(--ai3d-radius);
|
|
background: var(--background-secondary);
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.ai3d-slider-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--size-4-3);
|
|
}
|
|
|
|
.ai3d-slider-label {
|
|
font-size: var(--font-ui-smaller);
|
|
color: var(--text-muted);
|
|
white-space: nowrap;
|
|
min-width: 80px;
|
|
}
|
|
|
|
.ai3d-slider-value {
|
|
font-size: var(--font-ui-smaller);
|
|
color: var(--text-normal);
|
|
font-weight: 600;
|
|
min-width: 36px;
|
|
text-align: right;
|
|
}
|
|
|
|
.ai3d-slider {
|
|
flex: 1;
|
|
height: 4px;
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
background: var(--background-modifier-border);
|
|
border-radius: 2px;
|
|
outline: none;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.ai3d-slider::-webkit-slider-thumb {
|
|
-webkit-appearance: none;
|
|
width: 14px;
|
|
height: 14px;
|
|
border-radius: 50%;
|
|
background: var(--interactive-accent);
|
|
cursor: pointer;
|
|
transition: transform 0.1s ease;
|
|
}
|
|
|
|
.ai3d-slider::-webkit-slider-thumb:hover {
|
|
transform: scale(1.2);
|
|
}
|
|
|
|
.ai3d-axis-buttons {
|
|
display: flex;
|
|
gap: var(--size-4-1);
|
|
}
|
|
|
|
.ai3d-axis-btn {
|
|
padding: 2px 10px;
|
|
border-radius: var(--ai3d-radius);
|
|
border: 1px solid var(--background-modifier-border);
|
|
background: var(--background-primary);
|
|
color: var(--text-muted);
|
|
font-size: var(--font-ui-smaller);
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.15s ease;
|
|
}
|
|
|
|
.ai3d-axis-btn:hover {
|
|
border-color: var(--text-muted);
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
.ai3d-axis-btn.is-active {
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
border-color: transparent;
|
|
}
|
|
|
|
/* --- Piece Tags --- */
|
|
|
|
.ai3d-piece-list {
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: var(--ai3d-radius);
|
|
}
|
|
|
|
.ai3d-piece-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--size-4-2);
|
|
padding: var(--size-4-1) var(--size-4-2);
|
|
font-size: var(--font-ui-small);
|
|
cursor: pointer;
|
|
transition: background 0.1s ease;
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.ai3d-piece-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.ai3d-piece-item:hover {
|
|
background: var(--background-modifier-hover);
|
|
}
|
|
|
|
.ai3d-piece-item.is-selected {
|
|
background: var(--background-modifier-active-hover);
|
|
}
|
|
|
|
.ai3d-piece-dot {
|
|
width: 6px;
|
|
height: 6px;
|
|
border-radius: 50%;
|
|
background: var(--text-faint);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.ai3d-piece-item.is-tagged .ai3d-piece-dot {
|
|
background: var(--color-green);
|
|
}
|
|
|
|
.ai3d-piece-name {
|
|
flex: 1;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.ai3d-piece-tag-count {
|
|
font-size: var(--font-ui-smaller);
|
|
color: var(--text-faint);
|
|
}
|
|
|
|
.ai3d-piece-tag-editor {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--size-4-2);
|
|
padding: var(--ai3d-spacing);
|
|
border-radius: var(--ai3d-radius);
|
|
background: var(--background-secondary);
|
|
border: 1px solid var(--background-modifier-border);
|
|
}
|
|
|
|
.ai3d-piece-tag-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: var(--size-4-2);
|
|
}
|
|
|
|
.ai3d-piece-tag-title {
|
|
font-size: var(--font-ui-small);
|
|
font-weight: 600;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
/* --- 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 {
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
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-toolbar.is-mobile .ai3d-inline-btn.is-secondary {
|
|
display: none;
|
|
}
|
|
|
|
.ai3d-helper-toolbar.is-mobile.show-secondary .ai3d-inline-btn.is-secondary {
|
|
display: flex;
|
|
}
|
|
|
|
.ai3d-inline-btn {
|
|
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 {
|
|
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 0.15s ease;
|
|
}
|
|
|
|
@keyframes ai3d-fade-in {
|
|
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-direct-view .ai3d-preview-host {
|
|
flex: 1;
|
|
min-height: 300px;
|
|
}
|
|
|
|
.ai3d-workbench.is-mobile .ai3d-preview-host {
|
|
min-height: clamp(220px, 42vh, 320px);
|
|
}
|
|
|
|
.ai3d-workbench.is-mobile .ai3d-section-header {
|
|
padding: var(--size-4-2) var(--size-4-2) 0;
|
|
}
|
|
|
|
.ai3d-workbench.is-mobile .ai3d-section-body {
|
|
padding: var(--size-4-2);
|
|
gap: var(--size-4-2);
|
|
}
|
|
|
|
.ai3d-workbench.is-mobile .ai3d-model-status {
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.ai3d-workbench.is-mobile .ai3d-model-name {
|
|
white-space: normal;
|
|
overflow: visible;
|
|
text-overflow: clip;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.ai3d-workbench.is-mobile .ai3d-summary-grid {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
|
|
.ai3d-workbench.is-mobile .ai3d-note-row {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 2px;
|
|
}
|
|
|
|
.ai3d-workbench.is-mobile .ai3d-slider-row {
|
|
flex-wrap: wrap;
|
|
align-items: flex-start;
|
|
gap: var(--size-4-1);
|
|
}
|
|
|
|
.ai3d-workbench.is-mobile .ai3d-slider-label {
|
|
min-width: 100%;
|
|
}
|
|
|
|
.ai3d-workbench.is-mobile .ai3d-slider-value {
|
|
min-width: 0;
|
|
text-align: left;
|
|
}
|
|
|
|
.ai3d-workbench.is-mobile .ai3d-axis-buttons,
|
|
.ai3d-workbench.is-mobile .ai3d-actions {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: var(--size-4-1);
|
|
}
|
|
|
|
.ai3d-workbench.is-mobile .ai3d-axis-btn {
|
|
width: 100%;
|
|
min-height: 32px;
|
|
text-align: center;
|
|
}
|
|
|
|
/* --- Responsive: Narrow Sidebar --- */
|
|
|
|
@media (max-width: 400px) {
|
|
.ai3d-summary-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
.ai3d-preview-host {
|
|
min-height: 240px;
|
|
}
|
|
|
|
.ai3d-actions,
|
|
.ai3d-axis-buttons {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.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%); }
|
|
}
|
|
|
|
/* ===== 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)), -50%);
|
|
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, transform 0.15s ease, filter 0.25s ease, background 0.25s ease, border-color 0.25s ease;
|
|
}
|
|
|
|
.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 {
|
|
opacity: 0.25;
|
|
filter: blur(1.5px) drop-shadow(0 0 4px rgba(255, 255, 255, 0.15));
|
|
background: rgba(0, 0, 0, 0.3);
|
|
border-color: rgba(255, 255, 255, 0.06);
|
|
}
|
|
|
|
.ai3d-annotation-pin.ai3d-pin-occluded .ai3d-pin-dot {
|
|
box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
.ai3d-annotation-pin.ai3d-pin-occluded .ai3d-pin-label {
|
|
color: rgba(255, 255, 255, 0.5);
|
|
}
|
|
|
|
/* Fully hidden pin (camera idle + occluded) */
|
|
.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: #fff;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.ai3d-pin-delete {
|
|
display: none;
|
|
background: rgba(255, 60, 60, 0.85);
|
|
color: #fff;
|
|
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, #fff);
|
|
box-shadow: 0 0 0 2px color-mix(in srgb, var(--text-normal, #fff) 22%, transparent);
|
|
transform: scale(1.08);
|
|
}
|
|
|
|
.ai3d-pin-color-swatch:hover {
|
|
border-color: var(--text-muted, #999);
|
|
}
|
|
|
|
.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: none;
|
|
}
|
|
|
|
.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;
|
|
-webkit-line-clamp: 8;
|
|
-webkit-box-orient: vertical;
|
|
}
|
|
|
|
.ai3d-pin-popover-body--markdown {
|
|
display: block;
|
|
overflow-y: auto;
|
|
text-overflow: 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;
|
|
}
|