/* docs/stylesheets/theme.css: the site takes its two colours from the banner:
 * the sky behind the wordmark and the highlight on the art.
 *
 * mkdocs.yml sets `primary: custom` and `accent: custom`, which means Material
 * paints nothing until these variables exist.
 */
:root {
  --md-primary-fg-color:        #100e0f;  /* banner sky */
  --md-primary-fg-color--light: #211d19;
  --md-primary-fg-color--dark:  #0a0a0f;
  --md-primary-bg-color:        #ffffff;  /* text on the header */
  --md-primary-bg-color--light: #c9c2b6;

  --md-accent-fg-color:         #c9c563;  /* banner highlight */
  --md-accent-fg-color--transparent: #c9c5631a;
}

/* Dark scheme: the page body uses the banner sky too, so the header and the
   page read as one surface. */
[data-md-color-scheme="slate"] {
  --md-default-bg-color:        #100e0f;
  --md-code-bg-color:           #211d19;
  --md-typeset-a-color:         #c9c563;
}

/* Light scheme: the highlight on white is too faint for body links.
   #7c792b is the same hue darkened to 4.5:1 or better on white. */
[data-md-color-scheme="default"] {
  --md-typeset-a-color:         #7c792b;
  --md-accent-fg-color:         #7c792b;
}

/* Give the header logo a fixed size so it does not crowd the site name. */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 1.6rem;
  width: 1.6rem;
}

/* The site name, set the way banner.svg sets its wordmark: weight 700, white,
   slightly tracked (0.5 to 1 on 27 to 44px, about 0.02em).
 *
 * Only the first topic is styled. Material puts the site name in one
 * .md-header__topic and the page title in a second one, and swaps them on
 * scroll. Styling both would change the page title too.
 */
.md-header__topic:first-child .md-ellipsis {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Keep the mark and the name close, so they read as one unit. */
.md-header__button.md-logo {
  padding-right: 0.2rem;
}

.md-header__title {
  margin-left: 0.2rem;
}

/* Buttons.
 *
 * Material paints .md-button in --md-primary-fg-color, the header colour. On
 * the dark page that is also the page background, so a button would show as
 * plain text. Outline buttons take the link colour instead. */
.md-typeset .md-button {
  color: var(--md-typeset-a-color);
  border-color: var(--md-typeset-a-color);
  border-radius: 0.5rem;
}

.md-typeset .md-button:focus,
.md-typeset .md-button:hover {
  background-color: var(--md-typeset-a-color);
  border-color: var(--md-typeset-a-color);
  color: #100e0f;
}

/* Grid cards: the border picks up the accent on hover, so the cards match
   the buttons and links. */
.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card {
  border-radius: 0.5rem;
}

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

/* The home page keeps an H1 for search, screen readers and the browser tab.
   The banner under it already shows the name, so the H1 is hidden visually.
   Use it as: # Awesome Euskadi { .aw-visually-hidden } */
.md-typeset h1.aw-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* The per-entry shields.io badges are inline images inside list items. Keep
   them on the text baseline and stop a wrapped line from opening a gap. */
.md-typeset li > a > img,
.md-typeset li > img {
  vertical-align: middle;
}
