/* Mermaid samples: the rendered diagram above its source. Full width, because most
   diagram types are wide and shrink to unreadable text in half a column. */

.mg-gallery {
  display: grid;
  gap: 12px;
}

.guide-chips + .mg-gallery {
  margin-top: 12px;
}

.mg-preview {
  display: grid;
  place-items: center;
  min-height: 340px;
  padding: 24px;
  overflow: auto;
  border: 1px solid var(--hub-border);
  border-radius: var(--guide-radius);
  background: var(--hub-surface);
}

.mg-preview > svg {
  max-width: 100%;
  max-height: 480px;
  height: auto;
  transition: opacity 0.15s ease;
}

.mg-preview[aria-busy="true"] > svg {
  opacity: 0.5;
}

.mg-status {
  font-size: 14px;
  color: var(--hub-muted);
}

.mg-source > pre {
  max-height: 360px;
}

@media (max-width: 580px) {
  .mg-preview {
    min-height: 260px;
    padding: 16px;
  }
}
