/* Clickable Mermaid diagrams — paired with diagram-lightbox.js */

picture[data-mermaid-clickable] {
  cursor: zoom-in;
  /* Center every Mermaid diagram in the content column. */
  display: block;
  margin-left: auto;
  margin-right: auto;
  transition: filter 0.15s ease;
}
picture[data-mermaid-clickable]:hover {
  filter: brightness(1.05);
}
picture[data-mermaid-clickable] img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.boson-diagram-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.88);
  cursor: zoom-out;
  /* fade in */
  animation: boson-diagram-lightbox__fade-in 120ms ease-out;
}
@keyframes boson-diagram-lightbox__fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/*
 * Stage layout. The cloned <picture> has no intrinsic width (the SVG inside is
 * width="100%"), so we force a definite width on the picture itself; the img
 * then fills it and the SVG's viewBox keeps the aspect ratio.
 */
.boson-diagram-lightbox__stage {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}
.boson-diagram-lightbox__stage picture {
  display: block;
  width: min(92vw, 1400px);
  margin: 0 auto;
  /* The card is always white; the lightbox JS strips <source> tags from the
     cloned <picture> so the light SVG variant is shown regardless of the
     OS color scheme — navy text and pale-mint nodes read cleanly on white. */
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  padding: 20px;
  box-sizing: border-box;
}
.boson-diagram-lightbox__stage picture img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 82vh;
  background: transparent;
}

.boson-diagram-lightbox__hint {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-family: var(--vocs-fontFamily_default, system-ui, sans-serif);
  user-select: none;
}
