/*
 * Open Referral design system — colours & typography for MkDocs Material.
 * Tokens mirror https://app.openreferral.io/design-system (shadcn/Tailwind).
 * Semantic values are the design-system HSL triplets, used verbatim as hsl().
 */

/* ---- Typography (both schemes) --------------------------------------- */
:root {
  /* DS font-sans — body, nav, UI, h2–h6 ("tout sauf les h1") */
  --md-text-font: Calibri, -apple-system, system-ui, "Segoe UI", sans-serif;
  /* DS has no code font — sensible system monospace stack */
  --md-code-font: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* DS font-display — Georgia, page titles only (h1) */
.md-typeset h1 {
  font-family: Georgia, "Times New Roman", serif;
}

/* Header wordmark uses the display face too */
.md-header__topic:first-child .md-ellipsis {
  font-family: Georgia, "Times New Roman", serif;
}

/* ---- Light scheme (default) ------------------------------------------ */
[data-md-color-scheme="default"] {
  /* Primary = terracotta (terra-600) */
  --md-primary-fg-color:        hsl(14 74% 45%);
  --md-primary-fg-color--light: hsl(15 74% 52%);
  --md-primary-fg-color--dark:  hsl(14 73% 28%);
  --md-primary-bg-color:        hsl(0 0% 100%);
  --md-primary-bg-color--light: hsla(0, 0%, 100%, 0.7);

  /* Accent (hover/focus only) = honey-600 — legible on white, unlike honey-500 */
  --md-accent-fg-color:              hsl(43 78% 46%);
  --md-accent-fg-color--transparent: hsla(45, 90%, 61%, 0.1);

  /* Surfaces & text */
  --md-default-bg-color:           hsl(40 8% 98%);   /* paper */
  --md-default-fg-color:           hsl(218 17% 35%); /* slate */
  --md-default-fg-color--light:    hsl(210 16% 55%); /* muted text */
  --md-default-fg-color--lighter:  hsl(24 28% 87%);  /* borders */
  --md-default-fg-color--lightest: hsl(32 35% 94%);  /* hairlines / hover bg */

  /* Links → terracotta */
  --md-typeset-a-color: hsl(14 74% 45%);

  /* Code blocks on the muted/smoke tone */
  --md-code-bg-color: hsl(32 35% 94%);
}

/* ---- Dark scheme (slate) --------------------------------------------- */
[data-md-color-scheme="slate"] {
  /* Header/primary = terracotta in dark mode too (same as light) */
  --md-primary-fg-color:        hsl(14 74% 45%);
  --md-primary-fg-color--light: hsl(15 74% 52%);
  --md-primary-fg-color--dark:  hsl(14 73% 28%);
  --md-primary-bg-color:        hsl(0 0% 100%);
  --md-primary-bg-color--light: hsla(0, 0%, 100%, 0.7);

  /* Accent (hover/focus) = honey-500 — fine at full strength on dark */
  --md-accent-fg-color:              hsl(45 90% 61%);
  --md-accent-fg-color--transparent: hsla(45, 90%, 61%, 0.1);

  /* Surfaces & text */
  --md-default-bg-color:           hsl(211 53% 11%); /* night-800 */
  --md-default-fg-color:           hsl(0 0% 92%);
  --md-default-fg-color--light:    hsl(0 0% 65%);    /* muted text */
  --md-default-fg-color--lighter:  hsl(210 30% 30%); /* borders */
  --md-default-fg-color--lightest: hsl(210 44% 18%); /* hairlines / cards */

  /* Links → lightened terracotta for contrast on night-800 */
  --md-typeset-a-color: hsl(15 74% 58%);

  /* Code blocks on the dark card tone */
  --md-code-bg-color: hsl(210 44% 18%);
}

/* No logo — collapse the empty logo anchor and the drawer title */
.md-logo,
.md-nav__title[for="__drawer"] {
  display: none;
}

/* ---- Admonitions --------------------------------------------------- */
/* Drop the leading icon on every admonition / details block, and reclaim
   the space it left (title left padding was 40px for the icon). */
.md-typeset .admonition-title::before,
.md-typeset summary::before {
  display: none;
}
/* Match Material's own [dir]-scoped specificity to reclaim the icon gap */
[dir=ltr] .md-typeset .admonition-title,
[dir=ltr] .md-typeset summary {
  padding-left: 0.6rem; /* = the title's right padding */
}
[dir=rtl] .md-typeset .admonition-title,
[dir=rtl] .md-typeset summary {
  padding-right: 0.6rem;
}

/* Design-system semantic colours (border + tinted title bar). */
/* success → #2f9353 */
.md-typeset .admonition.success,
.md-typeset details.success {
  border-color: #2f9353;
}
.md-typeset .success > .admonition-title,
.md-typeset .success > summary {
  background-color: rgba(47, 147, 83, 0.1);
}
/* info → #2463eb */
.md-typeset .admonition.info,
.md-typeset details.info {
  border-color: #2463eb;
}
.md-typeset .info > .admonition-title,
.md-typeset .info > summary {
  background-color: rgba(36, 99, 235, 0.1);
}
