/* AVDASI 2 additions on top of the Flight Lab palette (flightlab.css). */

/* Screenshots and diagrams: give them a light card in dark mode. */
.md-typeset img {
  border-radius: 4px;
}
[data-md-color-scheme="slate"] .md-typeset figure img {
  background: #fff;
  padding: 4px;
}

/* Links from a session page to its slides and other resources. */
.md-typeset .lesson-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.5rem 0 1.5rem;
}
.md-typeset .lesson-links a {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--md-primary-fg-color);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
.md-typeset .lesson-links a:hover {
  background: var(--md-primary-fg-color);
  color: #fff;
}

/* ---------- Footer legibility ---------- */

/* The footer band is brand red (flightlab.css). Lift the copyright text to
   full white and underline its links, so they read as links by shape as well
   as colour. */
.md-footer-meta .md-copyright,
.md-footer-meta .md-copyright__highlight {
  color: #fff;
  opacity: 1;
}
.md-footer-meta .md-copyright {
  font-size: 0.7rem;
  line-height: 1.5;
}
.md-footer-meta.md-typeset a,
.md-footer-meta.md-typeset a:not(:focus, :hover) {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  text-decoration-color: #ffffffa6;
}
.md-footer-meta.md-typeset a:hover,
.md-footer-meta.md-typeset a:focus {
  color: #fff;
  text-decoration-color: #fff;
  text-decoration-thickness: 2px;
}
.md-footer-meta.md-typeset a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- The unit's mark on the Home entry ---------- */

/* The theme swaps this in for the stock plane icon that `icon: lucide/plane`
   puts beside Home, and paints it as a mask, so it follows the nav's colour in
   both schemes. The pitched version, square, to match the browser tab. Being a
   mask it uses alpha only, so the pivot is left out - at this size it would be
   a single pixel. The full mark is docs/assets/brand/favicon.svg. */
:root {
  --fl-nav-mark: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><g transform="translate(0,30)"><path d="M64 0 V64" stroke="black" stroke-width="11" stroke-linecap="round"/><g transform="rotate(14 64 70)"><g fill="black"><rect x="10" y="79.5" width="104" height="42" rx="21"/><path d="M152 60.5 L170 7 H188 V60.5 Z"/></g><path d="M22 70 H192" stroke="black" stroke-width="9" stroke-linecap="round"/></g></g></svg>');
}

/* ---------- The unit's mark in place of the crest ---------- */

/* The theme puts the University crest in the header and in the drawer title,
   and hides whatever `logo` points at. This unit shows its own mark there
   instead. Revert by deleting this block: the crest comes back on its own,
   because the theme's rule is still underneath. */
.md-header .md-logo {
  width: 2.6rem;
  background: url("../assets/brand/logo.svg") no-repeat center / contain;
}

.md-nav .md-nav__title[for="__drawer"] .md-logo {
  width: 3.4rem;
  background: url("../assets/brand/logo.svg") no-repeat center / contain;
}
