.mermaid[data-diagram-lightbox="ready"] {
  cursor: zoom-in;
}

.mermaid[data-diagram-lightbox="ready"]:focus-visible {
  outline: 3px solid #67e8f9;
  outline-offset: 4px;
}

.diagram-lightbox {
  width: min(96vw, 1440px);
  max-width: 96vw;
  height: min(92vh, 960px);
  max-height: 92vh;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 1.25rem;
  padding: 0;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 32px 120px rgba(2, 6, 23, 0.45);
}

.diagram-lightbox::backdrop {
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(6px);
}

.diagram-lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
  padding: 0.85rem 1rem;
}

.diagram-lightbox__title {
  margin: 0;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 800;
}

.diagram-lightbox__close {
  min-height: 2.5rem;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 999px;
  padding: 0 0.9rem;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.diagram-lightbox__close:focus-visible {
  outline: 3px solid #0891b2;
  outline-offset: 3px;
}

.diagram-lightbox__content {
  height: calc(100% - 4.25rem);
  overflow: hidden;
  padding: 1.25rem;
}

.diagram-lightbox__frame {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: hidden;
}

.diagram-lightbox__frame svg {
  width: 100% !important;
  max-width: 100%;
  height: 100% !important;
  max-height: 100%;
}

.diagram-lightbox__frame pre {
  width: 100%;
  margin: 0;
  white-space: pre-wrap;
}
