/* Hide the banner image on the website (preserved in raw markdown files) */
img[alt="Wiz⚡Blitz Banner"] {
  display: none !important;
}

/* Customizing Mermaid diagram styles to align with Deep Purple palette */
:root {
  --md-mermaid-node-bg: #ede7f6;       /* Very Light Purple 50 */
  --md-mermaid-node-border: #673ab7;   /* Deep Purple 500 */
  --md-mermaid-edge-color: #7e57c2;    /* Deep Purple 400 */
  --md-mermaid-label-bg: #ffffff;
}

[data-md-color-scheme="slate"] {
  --md-mermaid-node-bg: #211235;       /* Extremely Dark Slate Purple */
  --md-mermaid-node-border: #9575cd;   /* Deep Purple 300 */
  --md-mermaid-edge-color: #b39ddb;    /* Deep Purple 200 */
  --md-mermaid-label-bg: #1e1e24;
}

.mermaid {
  display: flex;
  justify-content: center;
  background-color: transparent;
  padding: 1rem;
  border-radius: 8px;
}

/* Click-to-Enlarge Lightbox styling for Mermaid Diagrams */
.mermaid, .mermaid svg, .mermaid * {
  cursor: zoom-in !important;
}

.mermaid {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mermaid:hover {
  filter: brightness(1.05);
}

/* Fullscreen expanded state */
.mermaid.fullscreen, .mermaid.fullscreen svg, .mermaid.fullscreen * {
  cursor: zoom-out !important;
}

.mermaid.fullscreen {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.3);
  width: 90vw;
  max-width: 1200px;
  max-height: 85vh;
  z-index: 9999;
  background-color: #ffffff !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  padding: 2.5rem;
  border-radius: 12px;
  cursor: zoom-out;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dark mode compatibility for expanded background */
[data-md-color-scheme="slate"] .mermaid.fullscreen {
  background-color: #1e1e24 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

/* Fullscreen transition layout helper */
.mermaid.fullscreen svg {
  max-width: 100% !important;
  height: auto !important;
  max-height: 100% !important;
}

/* Overlay dark mask behind fullscreen diagram */
.mermaid-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.7); /* Hardened Slate Overlay */
  z-index: 9998;
  cursor: pointer;
  backdrop-filter: blur(4px); /* Modern frosted-glass backdrop blur */
}

.mermaid-overlay.active {
  display: block;
}

/* Footer Attribution Centering */
.md-footer-meta__inner {
  display: flex !important;
  justify-content: center !important;
  text-align: center !important;
}

.md-copyright {
  width: 100% !important;
  text-align: center !important;
  margin: 0 auto !important;
}

.md-copyright__highlight {
  display: inline-block;
  text-align: center !important;
}
