/* The plots are drawn on white. In the dark scheme they are shown
   inverted, with the hues turned back, so that they sit on the page
   instead of glaring. Recordings of a terminal are left as they are. */
[data-md-color-scheme="slate"] .md-typeset img[src$=".png"] {
  filter: invert(0.88) hue-rotate(180deg);
  border-radius: 4px;
}

/* The frame that docs/javascripts/diagram-zoom.js puts around a diagram. */
.diagram-zoom {
  position: relative;
  overflow: hidden;
  margin: 1em 0;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
  background: var(--md-default-bg-color);
  cursor: grab;
  touch-action: none;
}
.diagram-zoom .mermaid {
  margin: 0;
  transform-origin: 0 0;
}
.diagram-zoom__bar {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  padding: 4px;
  opacity: 0.35;
  cursor: default;
}
[data-md-color-scheme="slate"] .diagram-zoom--packet .mermaid {
  filter: invert(0.88) hue-rotate(180deg);
}
.diagram-zoom:hover .diagram-zoom__bar,
.diagram-zoom:focus-within .diagram-zoom__bar {
  opacity: 1;
}
.diagram-zoom__bar button {
  width: 1.8em;
  height: 1.8em;
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 4px;
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  cursor: pointer;
}
.diagram-zoom:fullscreen {
  border: 0;
  border-radius: 0;
}
