.hs-mermaid-figure {
  margin: 2rem auto;
  max-width: 100%;
}

.hs-mermaid-viewport {
  box-sizing: border-box;
  width: 100%;
  overflow-x: auto;
  padding: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.72);
  text-align: center;
  -webkit-overflow-scrolling: touch;
}

.hs-mermaid-viewport svg {
  display: inline-block;
  max-width: 100% !important;
  height: auto !important;
}

.hs-user-content pre.hs-mermaid-source-error,
.hs-user-content pre.hs-mermaid-source-warning {
  overflow-x: auto;
  white-space: pre;
}

@media (min-width: 900px) {
  .hs-mermaid-viewport {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 640px) {
  .hs-mermaid-figure {
    margin: 1.5rem auto;
  }

  .hs-mermaid-viewport {
    padding: 0.875rem;
    border-radius: 10px;
  }
}

@media print {
  .hs-mermaid-viewport {
    overflow: visible;
    border: 0;
    padding: 0;
    background: transparent;
  }
}
