/* Custom theme colors based on frontend/src/state/colors.ts */

[data-md-color-scheme="default"] {
  /* Primary: #5C778F (frontend primary) */
  --md-primary-fg-color: #5C778F;
  --md-primary-fg-color--light: #7A96AD;
  --md-primary-fg-color--dark: #3E5871;

  /* Accent: #2f67e1 (frontend accentBlue) */
  --md-accent-fg-color: #2f67e1;
  --md-accent-fg-color--light: #5683E9;
  --md-accent-fg-color--dark: #2451B4;

  /* App canvas: #F6F8FB (frontend bg), met witte kaart-/codevlakken (frontend panel) */
  --md-default-bg-color: #F6F8FB;
  --md-code-bg-color: #FFFFFF;
}

.md-header__button.md-logo img,
.md-nav__button.md-logo img {
  width: 2rem;
  height: 2rem;
  border-radius: 22.5%;
}

.md-typeset .mermaid {
  width: 100%;
  margin: 1.25rem 0 1.75rem;
  padding: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(92, 119, 143, 0.2);
  border-radius: 0.75rem;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 32rem);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.md-typeset .mermaid svg {
  display: block;
  max-width: none;
  height: auto;
  margin: 0 auto;
}

.md-typeset .mermaid .node rect,
.md-typeset .mermaid .node polygon,
.md-typeset .mermaid .node circle,
.md-typeset .mermaid .node ellipse {
  filter: drop-shadow(0 5px 10px rgba(15, 23, 42, 0.08));
}

.md-typeset .mermaid .cluster rect {
  rx: 12px;
  ry: 12px;
}

.md-typeset .mermaid .edgeLabel {
  border-radius: 999px;
}

.md-typeset .mermaid .er.entityBox {
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.08));
}

@media screen and (min-width: 960px) {
  .md-typeset .mermaid {
    padding: 1.25rem;
  }
}

@media screen and (max-width: 700px) {
  .md-typeset .mermaid {
    margin-right: -0.8rem;
    margin-left: -0.8rem;
    padding: 0.75rem;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
    touch-action: pan-x;
  }

  .md-typeset .mermaid svg {
    width: auto !important;
    min-width: 42rem;
  }
}
