/* Plushy docs theme. The colour block is the brand's docs-theme.css
   (branding/plushy/dist), copied as is: change it there. Cyan marks the
   plugin arm only, so it is not a docs accent. */

:root,
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #4A2D8C;
  --md-primary-fg-color--light: #6B4FC0;
  --md-primary-fg-color--dark: #36206A;
  --md-primary-bg-color: #FFFFFF;
  --md-accent-fg-color: #6B4FC0;
  --md-typeset-a-color: #4A2D8C;
  --md-default-bg-color: #FFFFFF;
  --md-default-fg-color: #1D1B19;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #4A2D8C;
  --md-primary-fg-color--light: #6B4FC0;
  --md-primary-fg-color--dark: #36206A;
  --md-accent-fg-color: #D3C6F8;
  --md-typeset-a-color: #B39DF0;
}

/* The theme's "info" and "note" boxes are cyan and blue; cyan belongs to
   the plugin arm alone, so they take the brand violet. */
.md-typeset .admonition.info,
.md-typeset details.info,
.md-typeset .admonition.note,
.md-typeset details.note {
  border-color: var(--md-typeset-a-color);
  background-color: color-mix(in srgb, var(--md-typeset-a-color) 8%, transparent);
}

.md-typeset .info > .admonition-title::after,
.md-typeset .info > summary::after,
.md-typeset .note > .admonition-title::after,
.md-typeset .note > summary::after {
  color: var(--md-typeset-a-color);
}

.md-typeset .info > .admonition-title::before,
.md-typeset .info > summary::before,
.md-typeset .note > .admonition-title::before,
.md-typeset .note > summary::before {
  background-color: var(--md-typeset-a-color);
}

/* One file per colour scheme: never violet on a dark ground. */
.only-dark {
  display: none;
}

[data-md-color-scheme="slate"] .only-light {
  display: none;
}

[data-md-color-scheme="slate"] .only-dark {
  display: inline;
}

/* The header mark. The theme gives this img a display rule of higher
   specificity, so the scheme swap is restated here to win. */
.md-header__button.md-logo img {
  height: 1.5rem;
  width: auto;
}

.md-header__button.md-logo img.only-dark {
  display: none;
}

[data-md-color-scheme="slate"] .md-header__button.md-logo img.only-light {
  display: none;
}

[data-md-color-scheme="slate"] .md-header__button.md-logo img.only-dark {
  display: block;
}

/* The tagline lockup on the home page. */
.plushy-hero {
  margin: 1rem 0 2rem;
}

.plushy-hero img {
  width: 340px;
  max-width: 100%;
  height: auto;
}

/* Diagrams carry a white page of their own; frame them in dark mode. */
.md-typeset img[src*="img/"] {
  display: block;
  margin: 1.5em auto;
  max-width: 100%;
  border-radius: 6px;
}

[data-md-color-scheme="slate"] .md-typeset img[src*="/img/"] {
  box-shadow: 0 0 0 1px var(--md-default-fg-color--lightest);
}
