/*
 * Look of the guide, on top of the Material theme. It uses the purple and the gold that the Scrite
 * application itself uses for links, in a light and a dark scheme. Nothing here changes the text of
 * any page, so the search index that the application reads is the same with or without it.
 */

@import url("https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&display=swap");

/* Colors */

[data-md-color-scheme="default"] {
  --md-primary-fg-color: #583985;
  --md-primary-fg-color--light: #7a5cab;
  --md-primary-fg-color--dark: #3d2765;
  --md-primary-bg-color: #ffffff;
  --md-primary-bg-color--light: #ffffffb3;

  --md-accent-fg-color: #7a4fc0;
  --md-accent-fg-color--transparent: #7a4fc01a;

  --md-default-bg-color: #fbfaf8;
  --md-typeset-a-color: #583985;
  --md-code-bg-color: #f1edf7;

  --scrite-tint: 88, 57, 133;
  --scrite-heading: #3d2765;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #3d2765;
  --md-primary-fg-color--light: #583985;
  --md-primary-fg-color--dark: #2a1a47;

  --md-accent-fg-color: #e9bf59;
  --md-accent-fg-color--transparent: #e9bf591a;

  --md-default-bg-color: #17121f;
  --md-default-bg-color--light: #ffffff4d;
  --md-default-fg-color: #ffffffe6;
  --md-default-fg-color--light: #ffffffb3;
  --md-typeset-a-color: #e9bf59;
  --md-code-bg-color: #241b33;

  --scrite-tint: 233, 191, 89;
  --scrite-heading: #e9bf59;
}

/* Header and tabs, with a larger logo */

.md-tabs {
  background-color: var(--md-primary-fg-color--dark);
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 1.8rem;
  width: auto;
}

/* Text, in a size and a line length that suit long reading */

.md-typeset {
  font-size: 0.86rem;
  line-height: 1.75;
}

.md-typeset p,
.md-typeset ul,
.md-typeset ol {
  max-width: 46rem;
}

/* Headings. The title is set in Courier Prime, as a nod to the screenplay page. */

.md-typeset h1 {
  font-family: "Courier Prime", monospace;
  font-weight: 700;
  font-size: 2.1em;
  letter-spacing: -0.01em;
  color: var(--scrite-heading);
  margin-bottom: 0.8em;
}

.md-typeset h2 {
  font-weight: 600;
  color: var(--scrite-heading);
  margin-top: 2.2em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid rgba(var(--scrite-tint), 0.25);
}

.md-typeset h3 {
  font-weight: 600;
}

/* Callouts. The notes, tips and warnings of the guide are block quotes. */

.md-typeset blockquote {
  max-width: 46rem;
  margin: 1.2em 0;
  padding: 0.7em 1.1em;
  color: inherit;
  background: rgba(var(--scrite-tint), 0.07);
  border-left: 4px solid var(--md-primary-fg-color--light);
  border-radius: 0 8px 8px 0;
}

[data-md-color-scheme="slate"] .md-typeset blockquote {
  border-left-color: var(--md-accent-fg-color);
}

.md-typeset blockquote > :first-child {
  margin-top: 0;
}

.md-typeset blockquote > :last-child {
  margin-bottom: 0;
}

/* Screenshots */

.md-typeset img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.8em 0 1.4em;
  border: 1px solid rgba(var(--scrite-tint), 0.2);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(40, 20, 70, 0.16);
}

[data-md-color-scheme="slate"] .md-typeset img {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
}

/* Tables */

.md-typeset table:not([class]) {
  font-size: 0.8rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(var(--scrite-tint), 0.2);
}

.md-typeset table:not([class]) th {
  background-color: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  font-weight: 600;
}

/* Inline code */

.md-typeset code {
  border-radius: 4px;
}

/* Navigation */

.md-nav__title {
  font-weight: 700;
}

.md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav__link {
  color: var(--scrite-heading);
}
