/* pyDIGGS docs: small additions to Material for MkDocs. Everything else is the theme's
   own styling, so light and dark modes keep their tested contrast. */

/* Home page hero */
.md-typeset .pd-hero {
  margin: 0 0 1.6rem;
}

.md-typeset .pd-hero h1 {
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.md-typeset .pd-hero .pd-tagline {
  font-size: 1.15em;
  max-width: 42rem;
  color: var(--md-default-fg-color--light);
}

.md-typeset .pd-hero .md-button {
  margin: 0.3rem 0.4rem 0.3rem 0;
}

/* "Choose your path" cards: the whole card is the link target */
.md-typeset .grid.cards > ul > li {
  position: relative;
}

.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid.cards > ul > li:focus-within {
  border-color: var(--md-accent-fg-color);
}

.md-typeset .grid.cards .pd-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* "Stay updated" email sign-up form (docs/stay-updated.md) */
.md-typeset .pd-subscribe {
  margin: 1rem 0;
  max-width: 32rem;
}

.md-typeset .pd-subscribe label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 700;
}

.md-typeset .pd-subscribe-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.md-typeset .pd-subscribe input[type="email"] {
  flex: 1 1 14rem;
  min-height: 2.4rem;
  padding: 0 0.6rem;
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 0.2rem;
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  font: inherit;
}

.md-typeset .pd-subscribe .md-button {
  margin: 0;
}

/* Keyboard focus stays visible everywhere (WCAG 2.2: 2.4.7 and 2.4.11) */
.md-typeset a:focus-visible,
.md-typeset button:focus-visible,
.md-typeset input:focus-visible,
.md-typeset summary:focus-visible,
.md-typeset .tabbed-labels > label:focus-visible {
  outline: 2px solid var(--md-accent-fg-color);
  outline-offset: 2px;
}

/* Respect the reader's motion setting */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Tutorial videos (tools/tutorials/mkdocs_tutorials.py). */
.md-typeset figure.tutorial {
  margin: 1.5em 0;
  width: 100%;
}
.md-typeset figure.tutorial video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 0.2rem;
  background: var(--md-code-bg-color);
}
.md-typeset figure.tutorial figcaption {
  max-width: none;
  margin-top: 0.4em;
  text-align: left;
}
.md-typeset details.tutorial-transcript {
  text-align: left;
}
