/* The menu's group headings (Getting started, The dashboard, Additional
   Features, Running it, Reference) set apart from the pages under them, which
   Material's default draws at the same size. Desktop only: on a phone the menu
   is a drawer that shows one level at a time. */
@media screen and (min-width: 76.25em) {
  .md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav__link {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--md-default-fg-color);
    margin-top: 1.1em;
  }
}

/* A distinct pointer beside the active page in the navigation menu.
   Material's default only tints the link text, which is too subtle against
   the monochrome background. Exclude section toggle labels ([for^="__nav"])
   so only the page link receives the pointer. */
.md-nav--primary .md-nav__link--active:not([for^="__nav"]) {
  font-weight: 700;
}
.md-nav--primary .md-nav__link--active:not([for^="__nav"])::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  border-left: 5px solid currentColor;
  margin-top: 0.38em;
  margin-right: 0.2rem;
  align-self: flex-start;
  flex-shrink: 0;
}
[dir="rtl"] .md-nav--primary .md-nav__link--active:not([for^="__nav"])::before {
  border-left: none;
  border-right: 5px solid currentColor;
  margin-right: 0;
  margin-left: 0.2rem;
}

/* The dashboard's own black and white: #000 with white in the dark theme,
   #f5f5f5 with black in the light one (server/assets/ui/ui.css), in place of
   Material's navy and indigo. */
[data-md-color-scheme="slate"] {
  --md-hue: 0;
  --md-default-bg-color: #000;
  --md-default-fg-color: rgba(255, 255, 255, 0.9);
  --md-default-fg-color--light: rgba(255, 255, 255, 0.6);
  --md-default-fg-color--lighter: rgba(255, 255, 255, 0.32);
  --md-default-fg-color--lightest: rgba(255, 255, 255, 0.12);
  --md-primary-fg-color: #000;
  --md-primary-bg-color: #fff;
  --md-accent-fg-color: #fff;
  --md-typeset-color: rgba(255, 255, 255, 0.82);
  --md-typeset-a-color: #fff;
  --md-code-bg-color: rgba(255, 255, 255, 0.06);
  --md-footer-bg-color: #000;
  --md-footer-bg-color--dark: #000;
}
[data-md-color-scheme="default"] {
  --md-default-bg-color: #f5f5f5;
  --md-primary-fg-color: #f5f5f5;
  --md-primary-bg-color: #000;
  --md-accent-fg-color: #000;
  --md-typeset-a-color: #000;
  --md-code-bg-color: rgba(0, 0, 0, 0.05);
  --md-footer-bg-color: #f5f5f5;
  --md-footer-fg-color: #000;
  --md-footer-fg-color--light: rgba(0, 0, 0, 0.6);
  --md-footer-fg-color--lighter: rgba(0, 0, 0, 0.4);
  --md-footer-bg-color--dark: #ebebeb;
}
.md-header, .md-tabs { border-bottom: 1px solid var(--md-default-fg-color--lightest); }
.md-footer { border-top: 1px solid var(--md-default-fg-color--lightest); }

/* Links in white or black need more than colour to be told from the text. */
.md-typeset a {
  text-decoration: underline;
  text-decoration-color: var(--md-default-fg-color--lighter);
  text-underline-offset: 0.2em;
}
.md-typeset a:hover { text-decoration-color: currentColor; }
.md-typeset a.headerlink, .md-typeset a.md-button { text-decoration: none; }

.md-typeset .md-button {
  color: var(--md-default-fg-color);
  border-color: var(--md-default-fg-color--lighter);
  border-radius: 0;
}
.md-typeset .md-button--primary, .md-typeset .md-button:hover {
  background-color: var(--md-default-fg-color);
  border-color: var(--md-default-fg-color);
  color: var(--md-default-bg-color);
}

/* Notes and tips in the same greys, as the dashboard's own notices are. */
.md-typeset .admonition, .md-typeset details {
  border-color: var(--md-default-fg-color--lighter) !important;
  border-radius: 0;
  box-shadow: none;
}
.md-typeset .admonition-title, .md-typeset summary {
  background-color: var(--md-default-fg-color--lightest) !important;
}
.md-typeset .admonition-title::before, .md-typeset summary::before {
  background-color: var(--md-default-fg-color) !important;
}

/* A screenshot of the dashboard's black page would otherwise have no edge
   against the black site. The logo keeps its own shape. */
.md-typeset img:not([src*="logo/"]) {
  border: 1px solid var(--md-default-fg-color--lighter);
}
/* The form behind the field is tinted too; over a light header that reads
   as a heavy grey bar. */
[data-md-color-scheme="default"] .md-search__form { background-color: rgba(0, 0, 0, 0.06); }
[data-md-color-scheme="slate"] .md-search__form { background-color: rgba(255, 255, 255, 0.08); }
[data-md-color-scheme="default"] .md-search__input {
  background-color: transparent;
  color: #000;
}
[data-md-color-scheme="default"] .md-search__input::placeholder,
[data-md-color-scheme="default"] .md-search__icon { color: rgba(0, 0, 0, 0.55); }

/* An entity id broken across lines cannot be read or copied whole, so the
   entity tables keep their code on one line and scroll if they must. Only
   there: elsewhere a long service path has to wrap to fit. */
.md-typeset .entity-tables table code { white-space: nowrap; }
