/* mermaid 라이트박스 — javascripts/mermaid-zoom.js 와 짝 */

.mermaid {
  cursor: zoom-in;
}

#mermaid-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 200; /* Material 헤더(z-index 4)·검색보다 위 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72); /* 페이지 디밍 */
  cursor: zoom-out;
  animation: mermaid-zoom-fade 0.15s ease-out;
}

@keyframes mermaid-zoom-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

#mermaid-zoom-overlay .mermaid-zoom-panel {
  position: relative;
  max-width: 96vw;
  max-height: 92vh;
  overflow: auto; /* 초대형 다이어그램은 패널 안에서 스크롤 */
  padding: 1.5rem;
  border-radius: 0.4rem;
  background: var(--md-default-bg-color, #fff);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  cursor: default;
}

#mermaid-zoom-overlay .mermaid-zoom-close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  border: 0;
  background: none;
  color: var(--md-default-fg-color--light, #666);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

#mermaid-zoom-overlay .mermaid-zoom-close:hover {
  color: var(--md-default-fg-color, #000);
}
