/* EduBase Help: brand layer on top of Material for MkDocs. Rules and reasons: branding/README.md. */

/* Colors: Material's deep purple for the header, links and accents; Royal Purple and grays in diagrams */

:root {
  /* Diagrams (see branding/README.md, "Diagrams") */
  --eb-purple: #7700b5;
  --eb-accent: #7700b5;
  --eb-surface: #f1f1f1;
  --eb-card: #ffffff;
  --eb-line: #d9d9d9;
  --eb-connector: #8c8c8c;
  --eb-text: rgba(0, 0, 0, 0.87);
  --eb-muted: #6b6b6b;

  --md-mermaid-font-family: "Titillium Web", var(--md-text-font-family), sans-serif;
  --md-mermaid-node-bg-color: #fafafa;
  --md-mermaid-node-fg-color: #7700b5;
  --md-mermaid-edge-color: #8c8c8c;
  --md-mermaid-label-bg-color: var(--md-default-bg-color);
  --md-mermaid-label-fg-color: var(--md-default-fg-color);
}

[data-md-color-scheme="slate"] {
  --eb-accent: #c78bf0;
  --eb-surface: #2a2c36;
  --eb-card: #1e2029;
  --eb-line: #444755;
  --eb-connector: #8a8d99;
  --eb-text: #e2e4e9;
  --eb-muted: #a0a3b4;

  --md-mermaid-node-bg-color: #2a2c36;
  --md-mermaid-node-fg-color: #c78bf0;
  --md-mermaid-edge-color: #8a8d99;
}

/* Type: Titillium Web Light for titles, Source Sans 3 for the rest -------------------------------- */

.md-typeset h1,
.md-typeset h2,
.md-header__topic {
  font-family: "Titillium Web", var(--md-text-font-family), sans-serif;
  font-weight: 300;
}

.md-header__topic:first-child {
  font-weight: 600;
}

/* Sidebar: a thin line beside nested levels, purple beside the list that holds the current page ---- */

@media screen and (min-width: 76.25em) {
  .md-nav--primary .md-nav[data-md-level]:not([data-md-level="0"]) > .md-nav__list {
    margin-left: 0.3rem;
    padding-left: 0.6rem;
    border-left: 0.05rem solid var(--eb-line);
  }

  .md-nav--primary .md-nav[data-md-level]:not([data-md-level="0"]) > .md-nav__list:has(> .md-nav__item > .md-nav__link--active) {
    border-left-color: var(--md-typeset-a-color);
  }

  /* No scrollbar in the sidebars: on every page load Material scrolls the menu to the current page,
     and the bar flashed up for a moment. Wheel, touch and keyboard scrolling still work. */
  .md-sidebar__scrollwrap {
    scrollbar-width: none;
  }

  .md-sidebar__scrollwrap::-webkit-scrollbar {
    display: none;
  }
}

/* Captions: small, upright and quiet, so the screenshot stays the subject ------------------------ */

.md-typeset figure img {
  border: 1px solid var(--eb-line);
  border-radius: 6px;
}

.md-typeset figcaption {
  max-width: none;
  margin: 0.5em auto 0;
  font-size: 0.7rem;
  font-style: normal;
  color: var(--md-default-fg-color--light);
}

.md-typeset figcaption p {
  margin: 0;
}

.md-typeset figcaption strong {
  font-weight: 600;
}

/* SVG diagrams, drawn by tools/diagrams/layers.py ------------------------------------------------ */

.md-typeset .eb-diagram {
  margin: 1.5em 0;
  overflow-x: auto;
}

.md-typeset .eb-diagram svg {
  display: block;
  width: 100%;
  min-width: 620px;
  height: auto;
}

.eb-diagram .card-main { fill: var(--eb-purple); }

.eb-diagram text {
  font-family: var(--md-text-font-family), sans-serif;
  font-size: 13px;
  fill: var(--eb-muted);
}

.eb-diagram .t-title {
  font-family: "Titillium Web", var(--md-text-font-family), sans-serif;
  font-size: 16px;
  font-weight: 600;
  fill: var(--eb-text);
}

.eb-diagram .t-body { fill: var(--eb-text); font-size: 14px; }
.eb-diagram .t-edge {
  font-size: 12px;
  paint-order: stroke;
  stroke: var(--md-default-bg-color);
  stroke-width: 5px;
  stroke-linejoin: round;
}
.eb-diagram .t-on { fill: #ffffff; }
.eb-diagram .t-on-muted { fill: rgba(255, 255, 255, 0.82); }

/* Bands, boxes, outlines and connectors: gray for the rest, purple for the main path */

.eb-diagram .v-layer { font-family: "Titillium Web", var(--md-text-font-family), sans-serif; font-weight: 300; font-size: 22px; fill: var(--eb-text); }
.eb-diagram .v-sep { fill: none; stroke: var(--eb-line); stroke-width: 1; }
.eb-diagram .v-q { fill: var(--eb-card); stroke: var(--eb-connector); stroke-width: 1.5; }
.eb-diagram .v-set-a { fill: none; stroke: var(--eb-connector); stroke-width: 2; stroke-dasharray: 8 6; }
.eb-diagram .v-set-b { fill: none; stroke: var(--eb-accent); stroke-width: 2; stroke-dasharray: 8 6; }
.eb-diagram .v-box-a { fill: var(--eb-card); stroke: var(--eb-connector); stroke-width: 1.5; }
.eb-diagram .v-box-b { fill: var(--eb-card); stroke: var(--eb-accent); stroke-width: 2; }
.eb-diagram .v-link-a { fill: none; stroke: var(--eb-connector); stroke-width: 1.3; }
.eb-diagram .v-link-b { fill: none; stroke: var(--eb-accent); stroke-width: 1.5; }
.eb-diagram .v-dash { stroke-dasharray: 4 4; }
.eb-diagram .v-ah-a { fill: var(--eb-connector); }
.eb-diagram .v-ah-b { fill: var(--eb-accent); }
.eb-diagram .v-t-b { fill: var(--eb-accent); }
