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

export const STATIC_MARKDOWN_RUNTIME_BUNDLE_FILE = 'browser-runtime.bundle.js';

export const STATIC_MARKDOWN_RUNTIME_CSS = `
.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));
}

`;
