.mcp-mermaid-wrapper {
  background: #fff;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
  color: #1f2937;
  margin: 14px 0;
  max-width: 100%;
  overflow: hidden;
}

.mcp-mermaid-diagram {
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: auto;
  padding: 16px;
  text-align: center;
}

.mcp-mermaid-diagram svg {
  display: inline-block;
  height: auto;
  max-width: 100%;
}

.mcp-mermaid-source {
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
}

.mcp-mermaid-source summary {
  background: #f8fafc;
  color: #4b5563;
  cursor: pointer;
  line-height: 1.4;
  padding: 8px 12px;
}

.mcp-mermaid-source pre {
  background: #f8fafc;
  border: 0;
  border-radius: 0;
  margin: 0;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  text-align: left;
  white-space: pre;
}

.mcp-mermaid-error {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 6px;
  color: #7c2d12;
  display: inline-block;
  max-width: 100%;
  padding: 10px 12px;
  text-align: left;
}

.mcp-mermaid-error-message {
  font-family: Consolas, Monaco, "Liberation Mono", monospace;
  font-size: 12px;
  margin-top: 6px;
  white-space: pre-wrap;
}

html.dark .mcp-mermaid-wrapper,
body.dark .mcp-mermaid-wrapper,
html.dark-mode .mcp-mermaid-wrapper,
body.dark-mode .mcp-mermaid-wrapper,
html.theme-dark .mcp-mermaid-wrapper,
body.theme-dark .mcp-mermaid-wrapper,
html[data-theme="dark"] .mcp-mermaid-wrapper,
body[data-theme="dark"] .mcp-mermaid-wrapper,
.theme-PurpleMine2_mcp.dark .mcp-mermaid-wrapper {
  background: #171b22;
  border-color: #343b48;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  color: #e5e7eb;
}

html.dark .mcp-mermaid-source,
body.dark .mcp-mermaid-source,
html.dark-mode .mcp-mermaid-source,
body.dark-mode .mcp-mermaid-source,
html.theme-dark .mcp-mermaid-source,
body.theme-dark .mcp-mermaid-source,
html[data-theme="dark"] .mcp-mermaid-source,
body[data-theme="dark"] .mcp-mermaid-source,
.theme-PurpleMine2_mcp.dark .mcp-mermaid-source {
  border-top-color: #343b48;
}

html.dark .mcp-mermaid-source summary,
html.dark .mcp-mermaid-source pre,
body.dark .mcp-mermaid-source summary,
body.dark .mcp-mermaid-source pre,
html.dark-mode .mcp-mermaid-source summary,
html.dark-mode .mcp-mermaid-source pre,
body.dark-mode .mcp-mermaid-source summary,
body.dark-mode .mcp-mermaid-source pre,
html.theme-dark .mcp-mermaid-source summary,
html.theme-dark .mcp-mermaid-source pre,
body.theme-dark .mcp-mermaid-source summary,
body.theme-dark .mcp-mermaid-source pre,
html[data-theme="dark"] .mcp-mermaid-source summary,
html[data-theme="dark"] .mcp-mermaid-source pre,
body[data-theme="dark"] .mcp-mermaid-source summary,
body[data-theme="dark"] .mcp-mermaid-source pre,
.theme-PurpleMine2_mcp.dark .mcp-mermaid-source summary,
.theme-PurpleMine2_mcp.dark .mcp-mermaid-source pre {
  background: #11151b;
  color: #cbd5e1;
}

html.dark .mcp-mermaid-error,
body.dark .mcp-mermaid-error,
html.dark-mode .mcp-mermaid-error,
body.dark-mode .mcp-mermaid-error,
html.theme-dark .mcp-mermaid-error,
body.theme-dark .mcp-mermaid-error,
html[data-theme="dark"] .mcp-mermaid-error,
body[data-theme="dark"] .mcp-mermaid-error,
.theme-PurpleMine2_mcp.dark .mcp-mermaid-error {
  background: #331c12;
  border-color: #9a5a20;
  color: #fed7aa;
}
