/*
 * Option Trading University (/learn/, MkDocs Material) in the site's theme: the same
 * toolbar, accent and light/dark palette as every other page (theme.css). Material's own
 * light/dark switch is replaced by the site's, in the site header above.
 */

/* Material's palette: the site's accent for headings, links and buttons */
:root,
[data-md-color-scheme="default"],
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: var(--at-accent);
  --md-primary-fg-color--light: var(--at-accent-hover);
  --md-primary-fg-color--dark: var(--at-accent-hover);
  --md-primary-bg-color: var(--at-accent-ink);
  --md-accent-fg-color: var(--at-accent-hover);
  --md-typeset-a-color: var(--at-accent);
  --md-footer-bg-color: var(--at-navy);
  --md-footer-bg-color--dark: var(--at-navy-3);
  /* The course's own colours (levels, quiz answers) */
  --otu-green: var(--at-up);
  --otu-red: var(--at-down);
  --otu-orange: var(--at-warn);
}
/* Page, text and panels in the site's colours, in both of Material's schemes */
:root,
[data-md-color-scheme="default"],
[data-md-color-scheme="slate"] {
  --md-default-bg-color: var(--at-bg);
  --md-default-fg-color: var(--at-text);
  --md-default-fg-color--light: var(--at-text-2);
  --md-default-fg-color--lighter: var(--at-text-3);
  --md-default-fg-color--lightest: var(--at-border);
  --md-typeset-color: var(--at-text);
  --md-code-bg-color: var(--at-surface-2);
  --md-admonition-bg-color: var(--at-surface);
}

/* Cards (the module list) like the site's cards */
.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card {
  border: 1px solid var(--at-border);
  border-radius: var(--at-radius);
  background: var(--at-surface);
}
:root:not([data-theme="dark"]) .md-typeset .grid.cards > ul > li,
:root:not([data-theme="dark"]) .md-typeset .grid > .card {
  box-shadow: var(--at-shadow);
}
.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid > .card:hover {
  border-color: color-mix(in srgb, var(--at-accent) 50%, transparent);
}

/* Buttons side by side keep a gap when they wrap onto two lines */
.md-typeset .md-button {
  margin: 0.25em 0.5em 0.25em 0;
  border-radius: var(--at-radius-sm);
}

/* The header and the tabs, in the page's surface colour like every tool's top bar */
.md-header,
.md-tabs {
  background-color: var(--at-surface);
  color: var(--at-text);
}
.md-header {
  box-shadow: 0 1px 0 var(--at-border);
}
.md-header--shadow {
  box-shadow: 0 1px 0 var(--at-border), 0 2px 8px rgba(0, 0, 0, 0.06);
}
.md-tabs {
  border-bottom: 1px solid var(--at-border);
}
.md-tabs__link {
  color: var(--at-text-2);
  opacity: 1;
}
.md-tabs__link--active,
.md-tabs__link:hover,
.md-tabs__item--active .md-tabs__link {
  color: var(--at-accent);
}
.md-header__button.md-logo,
.md-header__button {
  color: var(--at-text);
}
.md-search__input {
  background-color: var(--at-surface-2);
  color: var(--at-text);
}
.md-search__input::placeholder,
.md-search__icon,
.md-search__input + .md-search__icon,
.md-search__input ~ .md-search__icon {
  color: var(--at-text-3);
}
.md-search__input:hover {
  background-color: var(--at-surface-3);
}

/* Material's own light/dark switch: the site's switch replaces it */
.md-header__option[data-md-component="palette"] {
  display: none;
}

/* The course's own header, under the site header: the same height as every section's
   toolbar, with the course's name (Material's title) first */
.md-header__inner {
  height: 52px;
  padding-left: 8px;
}
.md-sidebar {
  top: 52px;
}

/* The site header carries the brand: the course's own logo would repeat it (the Home tab
   still leads to the course's start) */
.md-header__button.md-logo {
  display: none;
}

/* Desktop (no menu button before it): the course's name where every section's name is,
   in the same type */
.md-header__title,
.md-header__topic,
.md-header__topic:first-child {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.005em;
}
@media screen and (min-width: 76.25em) {
  .md-header__inner {
    padding-left: 16px;
  }
  [dir] .md-header__title {
    margin-left: 0;
  }
}
