/* Docs-site tweaks (loaded via mkdocs.yml extra_css). */

/* Material's default header logo height (1.2rem) renders the bracket mark
   noticeably smaller than the site title; bump it for better balance. */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 1.6rem;
  width: auto;
}

/* Homepage hero logo (README <picture> header).
   Two fixes in one:
   1. The README pins its logo srcsets to raw.githubusercontent.com (needed
      for crates.io); on the docs site we prefer the locally staged copies.
   2. The <picture> picks its source by the OS prefers-color-scheme, but
      Material's palette toggle sets data-md-color-scheme independently of
      the OS — CSS `content:` overrides the picked source so the logo always
      matches the *site* scheme. (extra.css is served at docs/extra.css, so
      ../assets/ resolves to the staged assets dir.) */
.md-typeset h1 img[alt="agent-store"] {
  content: url("../assets/logo-light.svg");
}
[data-md-color-scheme="slate"] .md-typeset h1 img[alt="agent-store"] {
  content: url("../assets/logo-dark.svg");
}

/* Dark scheme: a dark header instead of Material's saturated green bar,
   with links in the brand's dark-palette accent green (assets/README.md). */
[data-md-color-scheme="slate"][data-md-color-primary="green"] {
  --md-primary-fg-color: #161b22;
  --md-primary-fg-color--light: #21262d;
  --md-primary-fg-color--dark: #0d1117;
  --md-typeset-a-color: #3fb950;
}

/* Keep identifiers in table cells whole (AGENT_STORE_EVENT, not
   AGENT_STOR / E_EVENT on a phone); a too-wide table scrolls instead. */
.md-typeset table:not([class]) code {
  white-space: nowrap;
  word-break: normal;
}

/* Reserve a strip above the first line for the copy button, so no line
   (however long) scrolls underneath it. */
.md-typeset .highlight .md-code__nav {
  padding: 0;
  top: 0.15em;
  right: 0.15em;
}
.md-typeset .highlight pre > code {
  padding-top: 2.1em;
}
