.pcs-lightbox-trigger {
  cursor: zoom-in;
}

/* Diagram SVGs are generated for a white canvas. In dark docs mode, render
   them as dark diagrams without maintaining a second SVG set. The white
   background is intentional: it is inverted by the same filter as the SVG. */
[data-md-color-scheme="slate"] .md-content img[src$=".svg"],
[data-md-color-scheme="slate"] .pcs-lightbox__image[src$=".svg"] {
  background: #ffffff;
  filter: invert(0.92) hue-rotate(180deg) saturate(0.85) contrast(0.95);
}

[data-md-color-scheme="slate"] .md-content img[src$=".svg"] {
  border-radius: 6px;
}

.pcs-lightbox-open {
  overflow: hidden;
}

.pcs-lightbox {
  align-items: center;
  background: rgba(15, 23, 42, 0.88);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 0.75rem;
  position: fixed;
  z-index: 10000;
}

.pcs-lightbox--open {
  display: flex;
}

.pcs-lightbox__hint {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 600;
  left: 50%;
  padding: 0.45rem 0.9rem;
  position: fixed;
  top: 1rem;
  transform: translateX(-50%);
  user-select: none;
}

.pcs-lightbox__image {
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  cursor: zoom-in;
  max-height: calc(100vh - 1.5rem);
  max-width: calc(100vw - 1.5rem);
  object-fit: contain;
  transform-origin: center center;
  transition: transform 80ms ease-out;
  will-change: transform;
}

.pcs-lightbox__image[src$=".svg"] {
  height: calc(100vh - 3.5rem);
  width: calc(100vw - 3.5rem);
}

.pcs-lightbox__image--zoomed {
  cursor: grab;
}

.pcs-lightbox__image--dragging {
  cursor: grabbing;
  transition: none;
}

.pcs-lightbox__close {
  align-items: center;
  background: #ffffff;
  border: 0;
  border-radius: 999px;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  font-size: 1.25rem;
  font-weight: 700;
  height: 2.25rem;
  justify-content: center;
  line-height: 1;
  position: fixed;
  right: 1rem;
  top: 1rem;
  width: 2.25rem;
}

.pcs-lightbox__close:focus-visible {
  outline: 3px solid #22d3ee;
  outline-offset: 2px;
}
