/* MVdW-Software brand for the MkDocs (Material) documentation of the Odoo apps.
 * Copy to docs/stylesheets/brand.css of the addon, list it first under extra_css, and use `primary: custom` and
 * `accent: custom` in the palette (see mkdocs-theme.yml). Needs docs/images/mvdw-mark-white.svg for the footer.
 * Colours: common/README.md. Per app, only --app-color changes (the colour of the app's icon tile). */

:root {
  --mvdw-indigo: #284cb5;
  --mvdw-indigo-dark: #1f3a8b;
  --mvdw-indigo-light: #3c63d4;
  --mvdw-mist: #a4b6eb;
  --mvdw-footer: #20344a;
  --mvdw-footer-light: #273f5b;
  --mvdw-odoo: #714b67;
  --app-color: #0078d4; /* set to the app colour in docs/stylesheets/extra.css */
}

[data-md-color-primary='custom'] {
  --md-primary-fg-color: var(--mvdw-indigo);
  --md-primary-fg-color--light: var(--mvdw-indigo-light);
  --md-primary-fg-color--dark: var(--mvdw-indigo-dark);
  --md-primary-bg-color: #fff;
  --md-primary-bg-color--light: #ffffffb3;
  --md-typeset-a-color: var(--mvdw-indigo);
  --md-footer-bg-color: var(--mvdw-footer-light);
  --md-footer-bg-color--dark: var(--mvdw-footer);
}
[data-md-color-accent='custom'] {
  --md-accent-fg-color: var(--mvdw-indigo-light);
  --md-accent-fg-color--transparent: #3c63d41a;
  --md-accent-bg-color: #fff;
  --md-accent-bg-color--light: #ffffffb3;
}
/* dark mode: the grey takes the hue of the brand indigo, links in the light indigo of the banners */
[data-md-color-scheme='slate'] {
  --md-hue: 226;
}
[data-md-color-scheme='slate'][data-md-color-primary='custom'] {
  --md-typeset-a-color: var(--mvdw-mist);
  --md-accent-fg-color: var(--mvdw-mist);
}

/* header as on mvdw-software.com: indigo to dark indigo, left to right */
.md-header,
.md-tabs {
  background-image: linear-gradient(to right, var(--mvdw-indigo), var(--mvdw-indigo-dark));
}
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 2rem;
  border-radius: 0.45rem; /* the icon tile is already rounded; this keeps the corners clean at small sizes */
}

/* footer: the white MVdW-Software mark before the copyright line */
.md-copyright {
  display: flex;
  align-items: center;
}
.md-copyright::before {
  flex: none;
  content: '';
  display: inline-block;
  width: 1.6rem;
  height: 1.05rem;
  margin-right: 0.5rem;
  background: url('../images/mvdw-mark-white.svg') no-repeat center / contain;
}

/* home and About open with the wordmark of the app (logo.png / logo-dark.png) as a hero:
 *   # MailBridge for Microsoft 365 { .app-title }
 *   <div class="app-hero" markdown> <img class="app-logo" ...> <p class="app-tagline">...</p> buttons </div> */
.md-typeset .app-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.md-typeset .app-hero {
  margin: 0.5rem 0 2rem;
  padding-left: 1rem;
  border-left: 0.25rem solid var(--app-color);
}
.md-typeset .app-logo {
  display: block;
  width: 26rem;
  max-width: 100%;
  margin: 0 0 1rem;
}
.md-typeset .app-tagline {
  font-size: 1.05rem;
  line-height: 1.5;
  max-width: 34rem;
}

/* buttons and headings: indigo, the app colour as a small accent */
.md-typeset .md-button {
  border-radius: 0.5rem;
}
[data-md-color-scheme='slate'] .md-typeset .md-button:not(.md-button--primary) {
  color: var(--mvdw-mist);
  border-color: var(--mvdw-mist);
}
.md-typeset h2 {
  font-weight: 700;
  color: var(--md-default-fg-color);
}
.md-typeset h2::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 0.15rem;
  margin-top: 0.35rem;
  border-radius: 0.1rem;
  background: var(--app-color);
}

/* Odoo screenshots are mostly white: frame them so they do not run into the page */
.md-typeset img[src*='images/odoo/'] {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.4rem;
}
