.markdown-preview-view .mermaid,
.markdown-rendered .mermaid {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
}

.mermaid svg {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 80%;
  margin: 0;
  padding: 0;
}

div:has(> .mermaid):hover {
  width: auto !important;
}

.mermaid:hover {
  overflow: scroll;
  padding: 0;
  margin: 0;
  text-align: left;
}

.mermaid:hover svg {
  display: block;
  width: auto;
  margin: 0;
  padding: 0;
}

