/* DISPATCH docs theme - matches the DISPATCH interface, which shares AAVJ's look
   (Settings > General colours, Arial). Default UI and LINK colours are the same as AAVJ's:
   UI colour   rgb(0.36, 0.38, 0.83) = #5C61D4
   LINK colour rgb(0.19, 0.79, 0.67) = #30C9AB                                    */

[data-md-color-scheme="dispatch"] {
  color-scheme: dark;

  /* surfaces: DISPATCH uses pure black with 5% grey bars and panels */
  --md-default-bg-color: #000000;
  --md-default-bg-color--light: #0d0d0d;
  --md-default-bg-color--lighter: #141414;
  --md-default-bg-color--lightest: #1f1f1f;

  --md-default-fg-color: #cccccc;
  --md-default-fg-color--light: #9a9a9a;
  --md-default-fg-color--lighter: #5a5a5a;
  --md-default-fg-color--lightest: #2a2a2a;

  /* header / tabs = DISPATCH tool bar */
  --md-primary-fg-color: #0d0d0d;
  --md-primary-fg-color--light: #141414;
  --md-primary-fg-color--dark: #000000;
  --md-primary-bg-color: #e6e6e6;
  --md-primary-bg-color--light: #9a9a9a;

  /* accents */
  --md-accent-fg-color: #30c9ab;
  --md-accent-fg-color--transparent: rgba(48, 201, 171, 0.12);
  --md-accent-bg-color: #000000;

  --md-typeset-color: #cccccc;
  --md-typeset-a-color: #8b8fe6;            /* UI colour, lifted for contrast on black */
  --md-typeset-mark-color: rgba(92, 97, 212, 0.35);
  --md-typeset-table-color: #2a2a2a;
  --md-typeset-table-color--light: #141414;

  --md-code-bg-color: #0d0d0d;
  --md-code-fg-color: #d4d4d4;
  --md-code-hl-color: rgba(92, 97, 212, 0.25);

  --md-footer-bg-color: #0d0d0d;
  --md-footer-bg-color--dark: #000000;
  --md-footer-fg-color: #9a9a9a;
  --md-footer-fg-color--light: #6a6a6a;

  --md-admonition-bg-color: #0d0d0d;
  --md-admonition-fg-color: #cccccc;     /* body text in note / warning / tip boxes */
  --md-shadow-z1: none;
  --md-shadow-z2: none;
  --md-shadow-z3: none;
}

/* Arial everywhere, like the DISPATCH UI */
body, input, .md-typeset {
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* flat, square DISPATCH look */
.md-typeset .admonition, .md-typeset details,
.md-typeset pre > code, .md-typeset code,
.md-search__form, .md-search__output, .md-typeset table:not([class]) {
  border-radius: 0;
}

/* header + tabs: tool-bar strip with a hairline */
.md-header { border-bottom: 1px solid #1f1f1f; }
.md-tabs   { background-color: #0d0d0d; border-bottom: 1px solid #1f1f1f; }
.md-tabs__link--active, .md-tabs__link:hover { color: #ffffff; }

/* logo + "Documentation" */
.md-header__button.md-logo { padding-right: 0.2rem; }
.md-header__button.md-logo img { height: 1.1rem; width: auto; }
.md-header__title { font-weight: 400; letter-spacing: 0.02em; }

/* headings */
.md-typeset h1 { color: #ffffff; font-weight: 700; letter-spacing: 0.01em; }
.md-typeset h2 {
  color: #ffffff; font-weight: 700;
  border-bottom: 1px solid #1f1f1f; padding-bottom: 0.3em;
}
.md-typeset h3 { color: #e6e6e6; font-weight: 700; }
.md-typeset h4 { color: #cccccc; font-weight: 700; text-transform: none; }

/* links: UI colour, LINK colour on hover */
.md-typeset a:hover { color: var(--md-accent-fg-color); }

/* navigation: active item gets the UI colour + a side marker like DISPATCH's selected tabs */
.md-nav__link--active, .md-nav__item .md-nav__link--active {
  color: #8b8fe6; font-weight: 700;
}
.md-nav__link:hover { color: var(--md-accent-fg-color); }

/* tables like the DISPATCH listers: dark header row, thin borders */
.md-typeset table:not([class]) { border: 1px solid #2a2a2a; font-size: 0.68rem; }
.md-typeset table:not([class]) th { background: #141414; color: #ffffff; }
.md-typeset table:not([class]) tr:hover { background: rgba(92, 97, 212, 0.08); }

/* inline code / ```names``` used for interface element names */
.md-typeset code { background: #141414; color: #e6e6e6; }

/* admonitions: note = UI colour, tip = LINK colour */
.md-typeset .admonition.note, .md-typeset details.note { border-color: #5c61d4; }
.md-typeset .note > .admonition-title, .md-typeset .note > summary { background: rgba(92, 97, 212, 0.15); }
.md-typeset .note > .admonition-title::before, .md-typeset .note > summary::before { background-color: #5c61d4; }
.md-typeset .admonition.tip, .md-typeset details.tip { border-color: #30c9ab; }
.md-typeset .tip > .admonition-title, .md-typeset .tip > summary { background: rgba(48, 201, 171, 0.12); }
.md-typeset .tip > .admonition-title::before, .md-typeset .tip > summary::before { background-color: #30c9ab; }

/* Review notes: every "> **TODO (Jack): ...**" blockquote shows in red while drafting.
   (Blockquotes are only used for these - remove the TODOs before publishing.) */
.md-typeset blockquote {
  border-left: 0.2rem solid #e5484d !important;   /* beats the theme's grey quote bar */
  background: rgba(229, 72, 77, 0.08);
  color: #ff6b6b;
  padding: 0.4rem 0.8rem;
}
.md-typeset blockquote strong { color: #ff8a8a; }

/* images: thin frame like DISPATCH panels */
.md-typeset img { border: 1px solid #1f1f1f; }
.md-header img, .md-footer img { border: 0; }

/* search */
.md-search__form { background-color: #141414; }
.md-search__form:hover { background-color: #1f1f1f; }

/* language selector dropdown: a panel like DISPATCH's dropdown menus */
.md-select__inner {
  background-color: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 0;
  box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.6);
}
.md-select__inner::after { border-bottom-color: #2a2a2a; }      /* the little pointer */
.md-select__list { border-radius: 0; max-height: inherit; }
.md-select:hover .md-select__inner,
.md-select:focus-within .md-select__inner { max-height: 70vh; }   /* fit all languages */
.md-select__link { color: #cccccc; }
.md-select__link:hover, .md-select__link:focus { color: #ffffff; background-color: rgba(92, 97, 212, 0.25); }
.md-header__option .md-header__button:hover { color: var(--md-accent-fg-color); }

