/* Allow Mermaid diagrams to use full available width and scroll horizontally */
.mermaid {
  overflow-x: auto;
  display: block;
}

.mermaid svg {
  max-width: 100% !important;
  height: auto !important;
  cursor: zoom-in;
}

/* Fullscreen overlay for Mermaid zoom */
.mermaid-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.mermaid-zoom-overlay.mermaid-zoom-visible {
  opacity: 1;
}

.mermaid-zoom-svg {
  max-width: 95vw !important;
  max-height: 90vh !important;
  width: auto !important;
  height: auto !important;
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-sizing: border-box;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
}

.mermaid-zoom-hint {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-family: sans-serif;
  pointer-events: none;
}
