/* Posbel documentation theme — white page, existing indigo primary.
   The primary and accent colours are Material's indigo and are deliberately
   left alone. What this file changes is the reading surface: white background,
   and the text, border, table and callout colours used by the Posbel help
   centre, so the two read as one product.

   Scoped to [data-md-color-scheme="default"] rather than :root — Material
   defines these tokens at that specificity, and a :root rule loses to it. */

[data-md-color-scheme="default"] {
  --pb-text: #1a1a1a;
  --pb-text-muted: #595959;
  --pb-text-faint: #737373;
  --pb-border: #e6e6e6;
  --pb-border-strong: #cccccc;
  --pb-surface: #f2f2f2;
  --pb-pale: #f6f7fc;

  --md-default-bg-color: #ffffff;
  --md-typeset-color: var(--pb-text);
  --md-default-fg-color--light: var(--pb-text-muted);
}

/* Headings ---------------------------------------------------------------- */

.md-typeset h1 {
  color: var(--pb-text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.md-typeset h2 {
  color: var(--pb-text);
  font-weight: 650;
  margin-top: 2.2em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--pb-border);
}

.md-typeset h3,
.md-typeset h4 {
  color: var(--pb-text);
  font-weight: 600;
}

/* Links ------------------------------------------------------------------- */

.md-typeset a {
  text-underline-offset: 0.15em;
}

.md-typeset a:hover,
.md-typeset a:focus {
  text-decoration: underline;
}

/* Horizontal rules -------------------------------------------------------- */

.md-typeset hr {
  border-bottom: 1px solid var(--pb-border);
}

/* Tables ------------------------------------------------------------------ */

.md-typeset table:not([class]) {
  border: 1px solid var(--pb-border);
  border-radius: 6px;
  box-shadow: none;
  font-size: 0.75rem;
}

.md-typeset table:not([class]) th {
  background: var(--pb-pale);
  color: var(--pb-text);
  font-weight: 650;
  border-bottom: 1px solid var(--pb-border-strong);
}

.md-typeset table:not([class]) td {
  border-top: 1px solid var(--pb-border);
}

.md-typeset table:not([class]) tr:hover {
  background: var(--pb-pale);
}

/* Code -------------------------------------------------------------------- */

.md-typeset code {
  background: var(--pb-surface);
  color: #b24d00;
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

.md-typeset pre > code {
  background: var(--pb-surface);
  color: var(--pb-text);
  padding: 0.8em 1em;
}

/* Callouts — mirroring the help centre's colour language ------------------ */

.md-typeset .admonition,
.md-typeset details {
  border: 1px solid var(--pb-border);
  border-left-width: 4px;
  border-radius: 6px;
  box-shadow: none;
  font-size: 0.76rem;
}

.md-typeset .admonition-title,
.md-typeset summary {
  font-weight: 650;
}

/* Note — indigo, following the site's primary */
.md-typeset .admonition.note,
.md-typeset details.note {
  border-left-color: var(--md-primary-fg-color);
}
.md-typeset .note > .admonition-title,
.md-typeset .note > summary {
  background: #dce1f9;
  color: var(--md-primary-fg-color);
}
.md-typeset .note > .admonition-title::before,
.md-typeset .note > summary::before {
  background-color: var(--md-primary-fg-color);
}

/* Tip — green */
.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-left-color: #0f7134;
}
.md-typeset .tip > .admonition-title,
.md-typeset .tip > summary {
  background: #d7efdc;
  color: #0f7134;
}
.md-typeset .tip > .admonition-title::before,
.md-typeset .tip > summary::before {
  background-color: #0f7134;
}

/* Warning — amber */
.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-left-color: #b24d00;
}
.md-typeset .warning > .admonition-title,
.md-typeset .warning > summary {
  background: #ffebdb;
  color: #b24d00;
}
.md-typeset .warning > .admonition-title::before,
.md-typeset .warning > summary::before {
  background-color: #b24d00;
}

/* Danger — red */
.md-typeset .admonition.danger,
.md-typeset details.danger {
  border-left-color: #df2020;
}
.md-typeset .danger > .admonition-title,
.md-typeset .danger > summary {
  background: #ffdbdb;
  color: #df2020;
}
.md-typeset .danger > .admonition-title::before,
.md-typeset .danger > summary::before {
  background-color: #df2020;
}

/* Blockquotes ------------------------------------------------------------- */

.md-typeset blockquote {
  border-left: 4px solid #dce1f9;
  color: var(--pb-text-muted);
}

/* Sidebar navigation ------------------------------------------------------ */

/* Note: the sticky section titles must keep Material's own opaque background.
   Forcing them transparent lets the scrolling list show through and the two
   overlap. */

.md-nav__title {
  color: var(--pb-text-faint);
  font-weight: 700;
}

.md-nav__link {
  color: var(--pb-text-muted);
  border-radius: 4px;
}

.md-nav__link:hover,
.md-nav__link:focus {
  color: var(--md-primary-fg-color);
}

.md-nav__link--active,
.md-nav__item .md-nav__link--active {
  color: var(--md-primary-fg-color);
  font-weight: 650;
}

.md-nav--secondary .md-nav__title {
  color: var(--pb-text);
}

/* Table of contents ------------------------------------------------------- */

.md-nav--secondary .md-nav__link--active {
  border-left: 2px solid var(--md-primary-fg-color);
  padding-left: 0.5rem;
  margin-left: -0.6rem;
}

/* Search ------------------------------------------------------------------ */

.md-search__form {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
}

.md-search__form:hover {
  background: rgba(255, 255, 255, 0.28);
}

[data-md-toggle="search"]:checked ~ .md-header .md-search__form {
  background: #ffffff;
  color: var(--pb-text);
}

.md-search-result__link:hover,
.md-search-result__link[data-md-state="active"] {
  background: var(--pb-pale);
}

.md-search-result mark {
  color: var(--md-primary-fg-color);
  background: #dce1f9;
}

/* Header and tabs --------------------------------------------------------- */

.md-header {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.07);
}

.md-tabs__link {
  opacity: 0.82;
  font-weight: 500;
}

.md-tabs__link:hover,
.md-tabs__link--active {
  opacity: 1;
}

/* Images ------------------------------------------------------------------ */

.md-typeset img {
  border: 1px solid var(--pb-border);
  border-radius: 6px;
}
