/* Drawio Viewer uses color-scheme attribute to switch between light and dark mode
   Let it synchronize with the Material for MkDocs theme color scheme */
:root {
  color-scheme: light;
}

/* Material for MkDocs Theme */
[data-md-color-scheme="slate"] {
  color-scheme: dark;
}

/* Mkdocs Theme */
[data-bs-theme="dark"] {
  color-scheme: dark;
}

@font-face {
  font-family: "Roboto";
  src: url("/fonts/Roboto-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Roboto Medium";
  src: url("/fonts/Roboto-Medium.ttf") format("truetype");
}

@font-face {
  font-family: "Roboto Condensed";
  src: url("/fonts/RobotoCondensed-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Roboto Mono";
  src: url("/fonts/RobotoMono-Regular.ttf") format("truetype");
}

.mxgraph {
  width: 100% !important;
  max-width: 100% !important;
  display: flex;
  justify-content: center;
  overflow-x: auto;
  box-sizing: border-box;
}

.drawio-caption {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.95em;
  color: var(--md-default-fg-color--lighter);
  gap: 0.3em;

  margin-top: 0.25em;
  margin-bottom: 0;
  line-height: 1.3;
}

.drawio-caption p {
  margin: 0;
}

.drawio-caption-icon {
  display: inline-block;
  vertical-align: super;
  margin-left: 0.25em;
  width: 0.9em;
  height: 0.9em;
  fill: currentColor;
  opacity: 0.5;
  transition: opacity 0.2s ease-in-out, transform 0.2s;
}

.drawio-caption-icon:hover {
  opacity: 1;
  transform: scale(1.05);
}

.drawio-container {
  position: relative;
}

.drawio-floating-edit,
.drawio-floating-edit:visited {
  position: absolute;
  top: 4px;
  left: 6px;
  z-index: 1000;
  display: none;
  color: #666666;
}

.drawio-floating-edit:hover {
  color: var(--md-accent-fg-color); /* or a highlight like --md-primary-fg-color */
}

.drawio-floating-edit svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.drawio-container:hover .drawio-floating-edit {
  display: block;
}

