/** * Ontology Visualizer Styles */ .ontology-visualizer { display: flex; flex-direction: column; gap: 1rem; margin: 1rem 0; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-primary); overflow: hidden; } /* Toolbar */ .visualizer-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); } .zoom-controls { display: flex; align-items: center; gap: 0.5rem; } .zoom-level { font-size: 0.875rem; color: var(--text-secondary); min-width: 50px; text-align: center; font-family: var(--font-mono, 'Courier New', monospace); } .toolbar-actions { display: flex; gap: 0.5rem; } .toolbar-btn { padding: 0.4rem 0.8rem; font-size: 0.875rem; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 4px; cursor: pointer; transition: all 0.2s; } .toolbar-btn:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--primary-color); } .toolbar-btn:disabled { opacity: 0.5; cursor: not-allowed; } /* Diagram container */ .visualizer-container { overflow: auto; padding: 2rem; background: var(--bg-primary); transition: transform 0.2s ease-out; min-height: 400px; } .mermaid-diagram { display: inline-block; min-width: 100%; } .mermaid-diagram svg { max-width: 100%; height: auto; } /* Loading state */ .visualizer-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem 2rem; gap: 1rem; } .spinner { width: 48px; height: 48px; border: 4px solid var(--border-color); border-top-color: var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } .visualizer-loading p { color: var(--text-secondary); font-size: 0.95rem; } /* Error state */ .visualizer-error { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 2rem; gap: 0.75rem; } .error-title { font-size: 1.1rem; font-weight: 600; color: var(--error-color, #ef4444); margin: 0; } .error-message { color: var(--text-secondary); font-size: 0.9rem; margin: 0; text-align: center; max-width: 500px; } .retry-btn { margin-top: 1rem; padding: 0.6rem 1.2rem; font-size: 0.9rem; background: var(--primary-color); color: white; border: none; border-radius: 4px; cursor: pointer; transition: all 0.2s; } .retry-btn:hover { background: var(--primary-dark, #2563eb); } /* Responsive adjustments */ @media (max-width: 768px) { .visualizer-toolbar { flex-direction: column; gap: 1rem; align-items: stretch; } .zoom-controls, .toolbar-actions { justify-content: center; } .visualizer-container { padding: 1rem; } } /* Mermaid diagram theme overrides */ .mermaid-diagram .classGroup rect { fill: var(--bg-secondary) !important; stroke: var(--border-color) !important; } .mermaid-diagram .classLabel { fill: var(--text-primary) !important; } .mermaid-diagram .relation { stroke: var(--primary-color) !important; } .mermaid-diagram text { font-family: Arial, sans-serif !important; fill: var(--text-primary) !important; }