/* Copyright (c) 2026 Modelware. All rights reserved. */

html,
body {
  font-family: var(--markdown-font-family, -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", system-ui, "Ubuntu", "Droid Sans", sans-serif);
  font-size: var(--markdown-font-size, 14px);
  padding: 0 26px;
  line-height: var(--markdown-line-height, 22px);
  word-wrap: break-word;
  color: var(--vscode-editor-foreground, var(--oml-static-foreground, #24292f));
  background: var(--vscode-editor-background, var(--oml-static-background, #ffffff));
}

body {
  padding-top: 1em;
}

/* Static-page theme tokens used by renderers when VS Code tokens are unavailable. */
:root {
  --oml-static-foreground: #24292f;
  --oml-static-background: #ffffff;
  --oml-static-muted: #57606a;
  --oml-static-border: #d0d7de;
  --oml-static-link: #0969da;
}

@media (prefers-color-scheme: dark) {
  :root {
    --oml-static-foreground: #e6edf3;
    --oml-static-background: #0d1117;
    --oml-static-muted: #8b949e;
    --oml-static-border: #30363d;
    --oml-static-link: #58a6ff;
  }
}

/* Hide OML code blocks until they're replaced by rendered panels to prevent flash of code */
pre > code.language-table,
pre > code.language-tree,
pre > code.language-graph,
pre > code.language-chart,
pre > code.language-diagram,
pre > code.language-list,
pre > code.language-text,
pre > code.language-matrix,
pre > code.language-table-editor {
  display: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ol,
ul,
pre {
  margin-top: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 16px;
  line-height: 1.25;
}

#code-csp-warning {
  position: fixed;
  top: 0;
  right: 0;
  color: #fff;
  margin: 16px;
  text-align: center;
  font-size: 12px;
  font-family: sans-serif;
  background-color: #444;
  cursor: pointer;
  padding: 6px;
  box-shadow: 1px 1px 1px rgb(0 0 0 / 25%);
}

#code-csp-warning:hover {
  text-decoration: none;
  background-color: #007acc;
  box-shadow: 2px 2px 2px rgb(0 0 0 / 25%);
}

body.scrollBeyondLastLine {
  margin-bottom: calc(100vh - 22px);
}

body.showEditorSelection .code-line {
  position: relative;
}

body.showEditorSelection :not(tr, ul, ol).code-active-line::before,
body.showEditorSelection :not(tr, ul, ol).code-line:hover::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: -12px;
  height: 100%;
}

.vscode-high-contrast.showEditorSelection :not(tr, ul, ol).code-line .code-line:hover::before {
  border-left: none;
}

body.showEditorSelection li.code-active-line::before,
body.showEditorSelection li.code-line:hover::before {
  left: -30px;
}

.vscode-light.showEditorSelection .code-active-line::before {
  border-left: 3px solid rgb(0 0 0 / 15%);
}

.vscode-light.showEditorSelection .code-line:hover::before {
  border-left: 3px solid rgb(0 0 0 / 40%);
}

.vscode-dark.showEditorSelection .code-active-line::before {
  border-left: 3px solid rgb(255 255 255 / 40%);
}

.vscode-dark.showEditorSelection .code-line:hover::before {
  border-left: 3px solid rgb(255 255 255 / 60%);
}

.vscode-high-contrast.showEditorSelection .code-active-line::before {
  border-left: 3px solid rgb(255 160 0 / 70%);
}

.vscode-high-contrast.showEditorSelection .code-line:hover::before {
  border-left: 3px solid rgb(255 160 0);
}

sub,
sup {
  line-height: 0;
}

ul ul:first-child,
ul ol:first-child,
ol ul:first-child,
ol ol:first-child {
  margin-bottom: 0;
}

img,
video {
  max-width: 100%;
  max-height: 100%;
}

a {
  color: var(--vscode-textLink-foreground);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 1px solid -webkit-focus-ring-color;
  outline-offset: -1px;
}

p {
  margin-bottom: 16px;
}

li p {
  margin-bottom: 0.7em;
}

ul,
ol {
  margin-bottom: 0.7em;
}

hr {
  border: 0;
  height: 1px;
  border-bottom: 1px solid;
}

h1 {
  font-size: 2em;
  margin-top: 0;
  padding-bottom: 0.3em;
  border-bottom-width: 1px;
  border-bottom-style: solid;
}

h2 {
  font-size: 1.5em;
  padding-bottom: 0.3em;
  border-bottom-width: 1px;
  border-bottom-style: solid;
}

h3 {
  font-size: 1.25em;
}

h4 {
  font-size: 1em;
}

h5 {
  font-size: 0.875em;
}

h6 {
  font-size: 0.85em;
}

table {
  border-collapse: collapse;
  margin-bottom: 0.7em;
}

th {
  text-align: left;
  border-bottom: 1px solid;
}

th,
td {
  padding: 5px 10px;
}

table > tbody > tr + tr > td {
  border-top: 1px solid;
}

blockquote {
  margin: 0;
  padding: 0 16px 0 10px;
  border-left-width: 5px;
  border-left-style: solid;
  border-radius: 2px;
}

code {
  font-family: var(--vscode-editor-font-family, "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace);
  font-size: 1em;
  line-height: 1.357em;
}

body.wordWrap pre {
  white-space: pre-wrap;
}

pre:not(.hljs),
pre.hljs code > div {
  padding: 16px;
  border-radius: 3px;
  overflow: auto;
}

pre code {
  display: inline-block;
  color: var(--vscode-editor-foreground);
  tab-size: 4;
  background: none;
}

pre {
  background-color: var(--vscode-textCodeBlock-background);
  border: 1px solid var(--vscode-widget-border);
}

.vscode-high-contrast h1 {
  border-color: #000;
}

.vscode-light th {
  border-color: rgb(0 0 0 / 69%);
}

.oml-md-result {
  margin-top: 8px;
  margin-bottom: 18px;
  border: 1px solid var(--vscode-editorWidget-border);
  border-radius: 6px;
  background: var(--vscode-editorWidget-background);
  overflow: auto;
}

.oml-md-result-table {
  border: none;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

.oml-md-result-plain {
  border: none;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

.oml-md-result-message {
  padding: 10px 12px;
  font-size: 12px;
}

.oml-md-result-error {
  border-color: var(--vscode-inputValidation-errorBorder);
  background: var(--vscode-inputValidation-errorBackground);
}

.oml-md-result-unimplemented {
  border-color: var(--vscode-inputValidation-warningBorder);
  background: var(--vscode-inputValidation-warningBackground);
}

.oml-md-table-wrapper {
  overflow: auto;
  border: 1px solid var(--vscode-editorWidget-border);
  border-radius: 4px;
}

.oml-md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 0;
  table-layout: auto;
}

.oml-md-table thead th {
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid var(--vscode-editorWidget-border);
  padding: 8px 10px;
  background: var(--vscode-editor-background);
  cursor: pointer;
  position: sticky;
  top: 0;
  z-index: 1;
  user-select: none;
}

.oml-md-table tbody td {
  border-bottom: 1px solid var(--vscode-editorWidget-border);
  padding: 6px 10px;
  vertical-align: top;
}

.vscode-dark th {
  border-color: rgb(255 255 255 / 69%);
}

.vscode-light h1,
.vscode-light h2,
.vscode-light hr,
.vscode-light td {
  border-color: rgb(0 0 0 / 18%);
}

.oml-md-result .table-root {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.oml-md-result .table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  padding: 0;
}

.oml-md-result .table-controls-left,
.oml-md-result .table-controls-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.oml-md-result .table-controls-right {
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
  gap: 0.6rem;
}

.oml-md-result .table-editor-root .table-operations-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.oml-md-result .table-editor-root .table-operations-controls button {
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--vscode-dropdown-border, var(--vscode-editorWidget-border));
  background: transparent;
  color: var(--vscode-foreground);
  line-height: 1;
  font-size: 1rem;
  cursor: pointer;
}

.oml-md-result .table-editor-root .table-operations-controls button:hover {
  background: var(--vscode-toolbar-hoverBackground);
}

.oml-md-result .table-editor-root .table-operations-remove { order: 0; }
.oml-md-result .table-editor-root .table-operations-add { order: 1; }
.oml-md-result .table-editor-root .table-operations-link { order: 2; }
.oml-md-result .table-editor-root .table-operations-ai { order: 3; }
.oml-md-result .table-editor-root .table-operations-undo { order: 4; }
.oml-md-result .table-editor-root .table-operations-redo { order: 5; }
.oml-md-result .table-editor-root .table-operations-validate { order: 6; }

.oml-md-result .table-editor-root .table-validation-inline-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  margin-left: 0.2rem;
  font-size: 0.85rem;
  order: 7;
}

.oml-md-result .table-editor-root .table-validation-success {
  color: var(--vscode-testing-iconPassed, var(--vscode-charts-green));
  font-weight: 600;
}

.oml-md-result .table-editor-root .table-validation-problems-link {
  color: var(--vscode-inputValidation-errorForeground, var(--vscode-errorForeground));
  text-decoration: underline;
  font-weight: 600;
  cursor: pointer;
}

.oml-validation-dialog {
  width: min(860px, 92vw);
}

.oml-validation-body {
  max-height: 58vh;
  overflow: auto;
}

.oml-validation-table {
  width: 100%;
  border-collapse: collapse;
}

.oml-validation-table th,
.oml-validation-table td {
  border: 1px solid var(--vscode-editorWidget-border);
  padding: 6px 8px;
  vertical-align: top;
  text-align: left;
}

.oml-validation-table th {
  background: var(--vscode-editor-inactiveSelectionBackground);
}

.oml-validation-description {
  white-space: normal;
}

.oml-md-result .table-pagesize {
  background: var(--vscode-dropdown-background);
  color: var(--vscode-dropdown-foreground);
  border: 1px solid var(--vscode-dropdown-border);
  padding: 2px 4px;
  border-radius: 0;
  font-size: 0.875rem;
  font-family: var(--markdown-font-family, -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", system-ui, "Ubuntu", "Droid Sans", sans-serif);
}

.oml-md-result .tree-filter {
  flex: 1;
  min-width: 8ch;
  max-width: 300px;
  padding: 4px 8px;
  background: var(--vscode-input-background);
  color: var(--vscode-input-foreground);
  border: 1px solid var(--vscode-input-border, var(--vscode-editorWidget-border, #d0d7de));
  border-radius: 2px;
  outline: none;
  box-sizing: border-box;
}

.oml-md-result .tree-filter:focus {
  border-color: var(--vscode-focusBorder, var(--vscode-textLink-foreground, #0969da));
}

.oml-md-result .tree-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--vscode-foreground);
  cursor: pointer;
  border-radius: 3px;
}

.oml-md-result .tree-download-btn:hover {
  background: var(--vscode-toolbar-hoverBackground);
}

.oml-md-result .table-results-table-container {
  overflow: auto;
  border: 1px solid var(--vscode-editorWidget-border, #d0d7de);
}

.oml-md-result .table-results-table {
  display: flex;
  flex-direction: column;
  min-width: 100%;
  width: fit-content;
}

.oml-md-result .table-header-row,
.oml-md-result .table-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.oml-md-result .table-header-cell,
.oml-md-result .table-cell {
  display: block;
  box-sizing: border-box;
  padding: 6px 8px;
  border-bottom: 1px solid var(--vscode-editorWidget-border, #d0d7de);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.oml-md-result .table-header-row > .table-header-cell:not(:last-child),
.oml-md-result .table-row > .table-cell:not(:last-child) {
  border-right: 1px solid var(--vscode-editorWidget-border, #d0d7de);
}

/* Default zebra/hover for non-VS Code host pages (e.g. static HTML). */
.oml-md-result .table-body .table-row:nth-child(even) .table-cell {
  background: rgb(0 0 0 / 4%);
}

.oml-md-result .table-body .table-row:hover .table-cell {
  background: rgb(173 216 230 / 45%);
}

.vscode-light .oml-md-result .table-body .table-row:nth-child(even) .table-cell,
.vscode-high-contrast-light .oml-md-result .table-body .table-row:nth-child(even) .table-cell {
  background: rgb(0 0 0 / 4%);
}

.vscode-dark .oml-md-result .table-body .table-row:nth-child(even) .table-cell,
.vscode-high-contrast .oml-md-result .table-body .table-row:nth-child(even) .table-cell {
  background: rgb(255 255 255 / 4%);
}

.oml-md-result .table-body .table-row .table-cell {
  transition: background-color 120ms ease-in-out;
}

.vscode-light .oml-md-result .table-body .table-row:hover .table-cell,
.vscode-high-contrast-light .oml-md-result .table-body .table-row:hover .table-cell {
  background: rgb(173 216 230 / 45%);
}

.vscode-dark .oml-md-result .table-body .table-row:hover .table-cell,
.vscode-high-contrast .oml-md-result .table-body .table-row:hover .table-cell {
  background: rgb(135 206 250 / 22%);
}

.oml-md-result .matrix-root .table-body .table-row:hover .table-cell {
  background: transparent;
}

/* Matrix: highlight the hovered cell only. */
.oml-md-result .matrix-root .table-body .table-row .table-cell:hover {
  background: rgb(173 216 230 / 45%);
}

.vscode-light .oml-md-result .matrix-root .table-body .table-row .table-cell:hover,
.vscode-high-contrast-light .oml-md-result .matrix-root .table-body .table-row .table-cell:hover {
  background: rgb(173 216 230 / 45%);
}

.vscode-dark .oml-md-result .matrix-root .table-body .table-row .table-cell:hover,
.vscode-high-contrast .oml-md-result .matrix-root .table-body .table-row .table-cell:hover {
  background: rgb(135 206 250 / 22%);
}

.oml-md-result .table-header-cell {
  font-weight: 600;
  user-select: none;
  cursor: pointer;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--vscode-editor-background);
  padding-right: 16px;
}

.oml-md-result .table-header-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oml-md-result .table-column-resize-handle {
  position: absolute;
  top: 0;
  right: -3px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
}

.oml-md-result .table-column-resize-handle::before {
  content: '';
  position: absolute;
  top: 20%;
  bottom: 20%;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: transparent;
  transition: background-color 120ms ease-in-out;
}

.oml-md-result .table-header-cell:hover .table-column-resize-handle::before {
  background: var(--vscode-editorWidget-border, #d0d7de);
}

.oml-md-result .table-resizing,
.oml-md-result .table-resizing * {
  cursor: col-resize !important;
}

.oml-md-result .table-value {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.oml-md-result .table-editor-root .table-row-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.oml-md-result .table-editor-root .table-row-checkbox > .table-value {
  min-width: 0;
}

.oml-md-result .table-value-part {
  display: inline;
}

.oml-md-result .table-link,
.oml-md-result .wikilink {
  color: var(--table-link-foreground, var(--vscode-textLink-foreground));
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.oml-md-result .table-link:hover,
.oml-md-result .wikilink:hover {
  border-bottom-style: solid;
}

.oml-md-result .oml-md-inline-image {
  display: inline-block;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.oml-md-result .table-footer {
  padding: 0 0.5rem 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.oml-md-result .table-info-bar {
  font-size: 0.85rem;
  color: var(--vscode-editorWidget-foreground);
  text-align: left;
  flex: 1;
}

.oml-md-result .table-footer-pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  font-family: var(--vscode-font-family, var(--markdown-font-family, -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", system-ui, "Ubuntu", "Droid Sans", sans-serif));
  font-size: 0.85rem;
}

.oml-md-result .table-pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.oml-md-result .table-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--vscode-input-border);
  border-radius: 50%;
  background: transparent;
  color: var(--vscode-foreground);
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  padding: 0;
  box-sizing: border-box;
}

.oml-md-result .table-page-btn:hover:not(:disabled) {
  background: var(--vscode-toolbar-hoverBackground);
}

.oml-md-result .table-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.oml-md-result .table-page-label {
  min-width: 36px;
  text-align: center;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: 1.2;
}

.oml-md-result .graph-canvas-root {
  position: relative;
  width: 100%;
  resize: none;
  overflow: auto;
  max-height: none !important;
  border: 1px solid var(--vscode-editorWidget-border);
  background: var(--vscode-editor-background);
}

.oml-md-result .diagram-canvas-root {
  height: var(--oml-diagram-height, 920px);
  min-height: var(--oml-diagram-min-height, 220px);
  max-height: none !important;
  resize: none;
}

.oml-md-result .canvas-resize-handle {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  cursor: row-resize;
  z-index: 20;
  user-select: none;
  touch-action: none;
}

.oml-md-result .canvas-resize-handle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--vscode-scrollbarSlider-background, rgba(100, 100, 100, 0.4));
  opacity: 0;
  transition: opacity 120ms;
}

.oml-md-result .graph-canvas-root:hover .canvas-resize-handle::after,
.oml-md-result .diagram-canvas-root:hover .canvas-resize-handle::after,
.oml-md-result .canvas-resize-handle:hover::after {
  opacity: 1;
}

.oml-md-result .diagram-canvas-root .x6-graph,
.oml-md-result .diagram-canvas-root .x6-graph-svg,
.oml-md-result .diagram-canvas-root .x6-svg-stage,
.oml-md-result .diagram-canvas-root .x6-svg,
.oml-md-result .diagram-canvas-root svg {
  width: 100%;
  height: 100%;
  background: var(--vscode-editor-background);
  overflow: visible !important;
}

.oml-md-result .diagram-canvas-root .x6-edge .x6-edge-path {
  pointer-events: stroke;
}

.oml-md-result .graph-corner-hotspot {
  position: absolute;
  top: 0;
  right: 0;
  width: 220px;
  height: 64px;
  z-index: 4;
}

.oml-md-result .graph-corner-toolbar {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--vscode-editorWidget-border);
  border-radius: 6px;
  background: var(--vscode-editor-background);
  box-shadow: 0 2px 8px rgb(0 0 0 / 20%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 5;
}

.oml-md-result .graph-canvas-root.graph-toolbar-visible .graph-corner-toolbar {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.oml-md-result .graph-corner-toolbar .graph-filter {
  width: 170px;
  max-width: 170px;
  margin: 0;
}

.oml-md-result-list {
  margin: 0;
  padding-left: 1.25rem;
}

.oml-md-result-list > li + li {
  margin-top: 0.35rem;
}

.oml-md-result-list > li {
  overflow-wrap: anywhere;
}

.oml-md-result-list > li::marker {
  color: var(--oml-list-marker-color, currentColor);
  font-size: var(--oml-list-marker-font-size, inherit);
  font-weight: var(--oml-list-marker-font-weight, inherit);
  font-style: var(--oml-list-marker-font-style, inherit);
}

.oml-md-result-list > li .wikilink {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.oml-md-result-text > p {
  margin: 0;
}

.oml-md-result-text > p + p {
  margin-top: 0.5rem;
}

.vscode-dark h1,
.vscode-dark h2,
.vscode-dark hr,
.vscode-dark td {
  border-color: rgb(255 255 255 / 18%);
}

.oml-md-context-menu {
  position: fixed;
  z-index: 9999;
  min-width: 172px;
  padding: 4px;
  border: 1px solid var(--vscode-menu-border, var(--vscode-editorWidget-border));
  border-radius: 6px;
  background: var(--vscode-menu-background, var(--vscode-editor-background));
  box-shadow: 0 4px 12px rgb(0 0 0 / 28%);
}

.oml-md-context-item {
  width: 100%;
  border: 0;
  border-radius: 4px;
  padding: 6px 10px;
  text-align: left;
  background: transparent;
  color: var(--vscode-menu-foreground, var(--vscode-editor-foreground));
  cursor: pointer;
  font: inherit;
}

.oml-md-context-item:hover {
  background: var(--vscode-menu-selectionBackground, var(--vscode-list-hoverBackground));
  color: var(--vscode-menu-selectionForeground, var(--vscode-editor-foreground));
}

.oml-md-context-item.is-active {
  background: var(--vscode-menu-selectionBackground, var(--vscode-list-hoverBackground));
  color: var(--vscode-menu-selectionForeground, var(--vscode-editor-foreground));
}

/* Match editor-controller link/type picker styles */
.oml-link-dropdown-container {
  position: fixed;
  z-index: 9999;
  margin-top: 4px;
  background: var(--vscode-editorWidget-background);
  border: 1px solid var(--vscode-editorWidget-border);
  border-radius: 6px;
  box-shadow: 0 8px 16px rgb(0 0 0 / 25%);
  display: flex;
  flex-direction: column;
  width: 250px;
  padding: 8px;
  gap: 6px;
}

.oml-link-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--vscode-input-background);
  border: 1px solid var(--vscode-input-border);
  border-radius: 4px;
  color: var(--vscode-input-foreground);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 4px 6px;
}

.oml-link-input:focus {
  outline: 1px solid var(--vscode-focusBorder);
  border-color: var(--vscode-focusBorder);
}

.table-operations-type-dropdown {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 6;
  min-width: 160px;
  background: var(--vscode-editorWidget-background);
  border: 1px solid var(--vscode-editorWidget-border);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.table-operations-type-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--vscode-foreground);
  cursor: pointer;
  font-size: 0.85rem;
}

.table-operations-type-option:hover {
  background: var(--vscode-toolbar-hoverBackground);
}

.table-operations-type-option.is-active {
  background: var(--vscode-toolbar-hoverBackground);
}

.oml-properties-relation-dropdown {
  position: absolute;
  z-index: 10;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px 0;
  border-radius: 8px;
  border: 1px solid var(--vscode-widget-border);
  background: var(--vscode-editorWidget-background);
  box-shadow: 0 6px 18px rgb(0 0 0 / 20%);
}

.oml-properties-relation-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--vscode-editorWidget-foreground);
  font-family: var(--vscode-font-family);
  font-size: 0.95rem;
  cursor: pointer;
}

.oml-link-dropdown-container .oml-properties-relation-option {
  border: none;
}

.oml-properties-relation-option:hover {
  background: var(--vscode-list-hoverBackground);
}

.oml-properties-relation-option.is-active {
  background: var(--vscode-list-activeSelectionBackground);
  color: var(--vscode-list-activeSelectionForeground);
}

.oml-md-rename-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 28%);
}

.oml-md-rename-dialog {
  min-width: 360px;
  max-width: min(560px, calc(100vw - 36px));
  padding: 14px;
  border: 1px solid var(--vscode-editorWidget-border);
  border-radius: 8px;
  background: var(--vscode-editor-background);
  box-shadow: 0 8px 30px rgb(0 0 0 / 35%);
}

.oml-md-rename-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
}

.oml-md-rename-input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 8px;
  border: 1px solid var(--vscode-input-border, var(--vscode-editorWidget-border));
  border-radius: 5px;
  background: var(--vscode-input-background, var(--vscode-editor-background));
  color: var(--vscode-input-foreground, var(--vscode-editor-foreground));
}

.oml-md-rename-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.oml-md-rename-button {
  padding: 6px 12px;
  border: 1px solid var(--vscode-button-secondaryBorder, var(--vscode-editorWidget-border));
  border-radius: 5px;
  background: var(--vscode-button-secondaryBackground, transparent);
  color: var(--vscode-button-secondaryForeground, var(--vscode-editor-foreground));
  cursor: pointer;
}

.oml-md-rename-button.primary {
  border-color: var(--vscode-button-border, transparent);
  background: var(--vscode-button-background);
  color: var(--vscode-button-foreground);
}

.oml-properties-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1002;
}

.oml-properties-dialog {
  width: min(620px, 88vw);
  min-width: min(520px, 88vw);
  min-height: 280px;
  max-width: 92vw;
  max-height: 88vh;
  background: var(--vscode-editorWidget-background);
  border: 1px solid var(--vscode-editorWidget-border);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: auto;
  resize: both;
}

.oml-properties-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 10px 20px;
  border-bottom: 1px solid var(--vscode-editorWidget-border);
}

.oml-properties-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.oml-properties-body {
  padding: 16px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.oml-properties-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.oml-properties-cancel,
.oml-properties-confirm {
  border-radius: 6px;
  border: 1px solid var(--vscode-button-border, transparent);
  padding: 6px 12px;
  font-size: 0.85rem;
}

.oml-properties-cancel {
  background: var(--vscode-button-secondaryBackground);
  color: var(--vscode-button-secondaryForeground);
}

.oml-properties-confirm {
  background: var(--vscode-button-background);
  color: var(--vscode-button-foreground);
}

.oml-properties-empty {
  color: var(--vscode-descriptionForeground);
  font-size: 0.85rem;
}

.oml-properties-row {
  display: grid;
  grid-template-columns: minmax(96px, 130px) 1fr;
  gap: 4px;
  align-items: center;
  margin-bottom: 0;
}

.oml-properties-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--vscode-foreground);
  font-weight: 500;
  opacity: 0.85;
  font-family: var(--vscode-font-family);
  font-size: 1rem;
}

.oml-properties-required {
  color: var(--vscode-errorForeground);
  font-weight: 700;
}

.oml-properties-value {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.oml-properties-value > * {
  flex: 1 1 100%;
  align-self: stretch;
  min-width: 0;
}

.oml-properties-input,
.oml-properties-textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid var(--vscode-input-border);
  background: var(--vscode-input-background);
  color: var(--vscode-foreground);
  padding: 8px 10px;
  font-family: var(--vscode-font-family);
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.85;
}

.oml-input-field {
  position: relative;
  display: flex;
  width: 100%;
  flex: 1 1 100%;
  min-width: 0;
}

.oml-input-field > .oml-properties-input {
  flex: 1 1 auto;
  min-width: 0;
}

.oml-input-invalid {
  border-color: var(--vscode-input-border);
}

.oml-input-squiggle {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 9px;
  pointer-events: none;
  color: transparent;
  white-space: pre;
  font-family: var(--vscode-font-family);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  overflow: hidden;
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--vscode-errorForeground);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.oml-md-rename-button:disabled,
.oml-properties-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.oml-properties-static {
  width: 100%;
  color: var(--vscode-foreground);
  padding: 8px 10px;
  font-family: var(--vscode-font-family);
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.85;
}

.oml-properties-select {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid var(--vscode-input-border);
  background: var(--vscode-input-background);
  color: var(--vscode-foreground);
  padding: 6px 8px;
  font-family: var(--vscode-font-family);
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.85;
}

.oml-scalar-candidate-field {
  width: 100%;
  min-width: 0;
}

.oml-properties-checkbox {
  width: 18px;
  height: 18px;
}

.oml-properties-textarea {
  min-height: 88px;
  resize: vertical;
}

.oml-properties-chip-list {
  display: flex;
  flex-wrap: wrap;
  flex: 1 1 100%;
  min-width: 0;
  gap: 6px;
}

.oml-properties-relation {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 5px 7px;
  border-radius: 8px;
  border: 1px solid var(--vscode-input-border);
  background: var(--vscode-input-background);
}

.oml-properties-relation-input {
  border: none;
  background: transparent;
  color: var(--vscode-foreground);
  font-family: var(--vscode-font-family);
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.85;
  flex: 1;
  min-width: 160px;
}

.oml-properties-relation-input:focus {
  outline: none;
}

.oml-properties-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px;
  padding: 4px 8px;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  border-radius: 999px;
  background: var(--vscode-badge-background, color-mix(in srgb, var(--vscode-editor-background) 78%, var(--vscode-foreground) 22%));
  border: 1px solid var(--vscode-contrastBorder, color-mix(in srgb, var(--vscode-foreground) 30%, transparent));
  color: var(--vscode-textLink-foreground);
  font-weight: 500;
  font-size: 0.8rem;
  user-select: text;
}

.oml-properties-link {
  display: block;
  grid-column: 1;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: inherit;
  cursor: text;
  user-select: text;
}

.oml-properties-chip-close-btn {
  grid-column: 2;
  align-self: start;
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0.7;
}



.oml-md-result { margin: 1rem 0; }
.oml-md-result-message {
  border: 1px solid #e5b567;
  background: #fff8e8;
  color: #6b4c15;
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  font-size: 0.95rem;
}
.oml-md-table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.oml-md-table-controls-left,
.oml-md-table-controls-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.oml-md-table-filter,
.oml-md-table-page-size {
  font: inherit;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  background: #fff;
}
.oml-md-table-action-btn {
  font: inherit;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  background: #fff;
  cursor: pointer;
}
.oml-md-table-action-btn:hover {
  background: #f6f8fa;
}
.oml-md-table-wrap {
  overflow: auto;
  border: 1px solid #d0d7de;
  border-radius: 8px;
}
.oml-md-static-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.oml-md-static-table thead th {
  position: sticky;
  top: 0;
  background: #f6f8fa;
  z-index: 1;
}
.oml-md-static-table th,
.oml-md-static-table td {
  text-align: left;
  border-bottom: 1px solid #eaeef2;
  padding: 0.45rem 0.55rem;
  vertical-align: top;
}
.oml-md-static-table tbody tr:nth-child(even) {
  background: #fafbfc;
}
.oml-md-table-sortable {
  cursor: pointer;
  user-select: none;
}
.oml-md-table-pager {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.oml-md-table-pager-btn {
  font: inherit;
  border: 1px solid #d0d7de;
  background: #fff;
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
}
.oml-md-table-pager-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.oml-md-table-page-info {
  color: #57606a;
  font-size: 0.9rem;
}
.oml-md-tree-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.tree-toggle-button {
  width: 1rem;
  height: 1rem;
  padding: 0;
  line-height: 1;
  font-size: 0.85rem;
  border: 1px solid var(--vscode-editorWidget-border);
  background: var(--vscode-editor-background);
  color: var(--vscode-foreground);
  cursor: pointer;
  border-radius: 2px;
}
.tree-toggle-spacer {
  display: inline-block;
  width: 1rem;
}

/* Browser fallback theme values for static render (outside VS Code webview). */
.oml-md-result .tree-filter {
  background: var(--vscode-input-background, #ffffff);
  color: var(--vscode-input-foreground, #24292f);
  border: 1px solid var(--vscode-input-border, #d0d7de);
}

.oml-md-result .tree-filter:focus {
  border-color: var(--vscode-focusBorder, #0969da);
}

.oml-md-result .table-pagesize {
  background: var(--vscode-dropdown-background, #ffffff);
  color: var(--vscode-dropdown-foreground, #24292f);
  border: 1px solid var(--vscode-dropdown-border, #d0d7de);
}

.oml-md-result .table-results-table-container {
  border: 1px solid var(--vscode-editorWidget-border, #d0d7de);
}

.oml-md-result .table-header-cell,
.oml-md-result .table-cell,
.oml-md-result .table-header-row > .table-header-cell:not(:last-child),
.oml-md-result .table-row > .table-cell:not(:last-child) {
  border-color: var(--vscode-editorWidget-border, #d0d7de);
}

.oml-md-result .oml-md-static-table,
.oml-md-result .oml-md-static-table th,
.oml-md-result .oml-md-static-table td {
  border-color: var(--vscode-editorWidget-border, #d0d7de);
}

.oml-md-result .oml-md-static-table th:not(:last-child),
.oml-md-result .oml-md-static-table td:not(:last-child) {
  border-right: 1px solid var(--vscode-editorWidget-border, #d0d7de);
}

/* Static fallback framing for canvas widgets (graph/diagram/chart). */
.oml-md-result .graph-canvas-root {
  border: 1px solid var(--vscode-editorWidget-border, #b8c2cc);
  border-radius: 6px;
  background: var(--vscode-editor-background, var(--oml-static-background, #ffffff));
}

.oml-md-result .diagram-canvas-root .x6-graph,
.oml-md-result .diagram-canvas-root .x6-graph-svg,
.oml-md-result .diagram-canvas-root .x6-svg-stage,
.oml-md-result .diagram-canvas-root .x6-svg,
.oml-md-result .diagram-canvas-root svg {
  background: var(--vscode-editor-background, var(--oml-static-background, #ffffff));
}


