:root,
[data-md-color-scheme="default"],
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #1F40C8;
  --md-primary-fg-color--light: #8F9FE3;
  --md-primary-fg-color--dark: #1834A0;
  --md-primary-bg-color: #FFFFFF;
  --md-primary-bg-color--light: #ffffffb3;
  --md-accent-fg-color: #1F40C8;
  --md-accent-fg-color--transparent: #1F40C81a;
  --md-accent-bg-color: #FFFFFF;
  --md-accent-bg-color--light: #ffffffb3;
  --md-typeset-a-color: #1F40C8;
  --md-typeset-mark-color: #1F40C84d; /* search.highlight */
}

/* mkdocs-to-pdf injects a legacy class; match Material header button spacing. */
.md-header a.md-header-nav__button.md-icon {
  margin: 0.2rem;
  padding: 0.4rem;
}

/*
 * Desired header order (right side): mode, language, PDF, search.
 * PDF control is in overrides/partials/header.html (locale-aware href).
 * Flex order keeps PDF before search. Icon: white chrome, red PDF label.
 * Use .guide-pdf (not title=) so content.tooltips can rewrite title on hover.
 */
.md-header__inner > a.guide-pdf {
  order: 9;
  color: var(--md-primary-bg-color);
}

/* Material sets fill on .md-icon svg; keep the red label + white letters. */
.md-header__inner > a.guide-pdf svg path[fill="#F15642"] {
  fill: #F15642 !important;
}

.md-header__inner > a.guide-pdf svg g[fill="#fff"] path {
  fill: #fff !important;
}

.md-header__inner > label[for="__search"],
.md-header__inner > .md-search {
  order: 10;
}

/* Website: play the video; hide the PDF-only caption box. */
.guide-video-fallback,
.guide-video-fallback[hidden] {
  display: none !important;
}

/* PDF / print: WeasyPrint cannot play video — show a caption box instead. */
@media print {
  .guide-video video {
    display: none !important;
  }

  .guide-video-fallback,
  .guide-video-fallback[hidden] {
    display: block !important;
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    border: 1px solid #8F9FE3;
    border-radius: 0.25rem;
    background: #f7f8fc;
  }
}
