/* SPDX-License-Identifier: MIT
 *
 * BAUER GROUP brand stylesheet for mkdocs-material.
 *
 * Source of truth for the brand tokens: brand.docs.bauer-group.com.
 * This file maps those tokens onto mkdocs-material's published CSS
 * variables so any docs site that calls the
 * `mkdocs-deploy-pages` reusable picks up the brand without
 * hand-tuning a per-repo theme.
 *
 * Consumers wire it into their own mkdocs.yml with a single line:
 *
 *     extra_css:
 *       - assets/_bauer-brand.css
 *
 * The reusable copies this file into <docs_dir>/assets/_bauer-brand.css
 * before the build runs.
 */

:root {
  /* ─── BAUER tokens (lifted from brand.docs.bauer-group.com) ─── */

  /* Primary: Orange */
  --orange-50:  #FFF7ED;
  --orange-100: #FFEDD5;
  --orange-200: #FED7AA;
  --orange-300: #FDBA74;
  --orange-400: #FB923C;
  --orange-500: #FF8500;  /* Brand Primary */
  --orange-600: #EA6D00;
  --orange-700: #C2570A;  /* Text AA */
  --orange-800: #9A4509;  /* Text AAA */
  --orange-900: #7C3A0A;

  /* Warm Gray */
  --warm-50:  #F9F8F6;
  --warm-100: #F0EDEA;
  --warm-200: #E0DBD6;
  --warm-300: #C4BDB7;
  --warm-400: #A69E97;
  --warm-500: #887F78;
  --warm-600: #6B635C;   /* Body Text AA */
  --warm-700: #524B45;   /* Strong Text AAA */
  --warm-800: #3A3430;   /* Headlines, Brand Dark */
  --warm-900: #231F1C;   /* Brand Black */

  /* Neutral Gray (print / technical) */
  --gray-50:  #F7F7F7;
  --gray-100: #EBEBEB;
  --gray-200: #D1D1D1;
  --gray-300: #B8B8B8;
  --gray-400: #9E9E9E;
  --gray-500: #7F7F7F;
  --gray-600: #666666;
  --gray-700: #4D4D4D;
  --gray-800: #333333;
  --gray-900: #1C1C1C;

  /* Brand neutrals */
  --brand-white: #FFFFFF;
  --brand-light: var(--warm-50);
  --brand-dark:  var(--warm-800);
  --brand-black: var(--warm-900);

  /* Semantic */
  --success-100: #DCFCE7; --success-500: #22C55E; --success-700: #15803D;
  --warning-100: #FEF9C3; --warning-500: #EAB308; --warning-700: #A16207;
  --error-100:   #FEE2E2; --error-500:   #EF4444; --error-700:   #B91C1C;
  --info-100:    #DBEAFE; --info-500:    #3B82F6; --info-700:    #1D4ED8;

  /* Accents */
  --accent-blue:   #2563EB;
  --accent-teal:   #0D9488;
  --accent-amber:  #D97706;
  --accent-indigo: #6366F1;

  /* Typography */
  --font-body: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code",
               "Segoe UI Mono", Consolas, monospace;

}

/* ─── mkdocs-material variable overrides ─────────────────────────────
 * The named-palette selectors ([data-md-color-primary],
 * [data-md-color-accent]) outrank :root by attribute-selector
 * specificity. We restate the BAUER colours under the same selectors
 * so the brand wins regardless of which palette the consumer
 * happens to have set in mkdocs.yml — including the indigo / amber /
 * red defaults.
 */
:root,
[data-md-color-primary],
[data-md-color-accent] {
  /* Header / primary band — dark warm-gray with white text.
   *
   * The brand-orange #FF8500 is *Brand Primary* — meant for UI
   * accents (links, hover, active tabs), not flooded bands.
   * White on #FF8500 only hits ~2.5:1 contrast, well below
   * WCAG-AA's 4.5:1 floor. Warm-800 (#3A3430) is the brand's
   * "Headlines, Brand Dark" token; white on it is ~12:1, passing
   * AAA comfortably and matching how the BAUER brand site itself
   * uses dark headers with orange CTAs.
   */
  --md-primary-fg-color:        var(--warm-800);
  --md-primary-fg-color--light: var(--warm-700);
  --md-primary-fg-color--dark:  var(--warm-900);
  --md-primary-bg-color:        var(--brand-white);
  --md-primary-bg-color--light: rgba(255, 255, 255, 0.7);

  /* Accent — orange-700 (Text AA token) for links, hover, active
   * states on the white body background. Passes AA against white. */
  --md-accent-fg-color:             var(--orange-700);
  --md-accent-fg-color--transparent: rgba(194, 87, 10, 0.1);
  --md-accent-bg-color:             var(--brand-white);
  --md-accent-bg-color--light:      rgba(255, 255, 255, 0.7);

  /* Body palette — warm-gray scale */
  --md-default-fg-color:           var(--warm-900);
  --md-default-fg-color--light:    var(--warm-600);
  --md-default-fg-color--lighter:  var(--warm-500);
  --md-default-fg-color--lightest: var(--warm-300);
  --md-default-bg-color:           var(--brand-white);
  --md-default-bg-color--light:    var(--warm-50);
  --md-default-bg-color--lighter:  var(--warm-100);
  --md-default-bg-color--lightest: var(--warm-200);

  /* Typeset (running text) — strong text against warm BG */
  --md-typeset-color:   var(--warm-700);
  --md-typeset-a-color: var(--orange-700);

  /* Code blocks — warm-gray background, dark headline foreground */
  --md-code-fg-color: var(--warm-800);
  --md-code-bg-color: var(--warm-100);

  /* Admonitions / callouts use semantic colors directly. mkdocs-material
   * sets per-admonition vars; only override the most-used four so the
   * distinct admonition types still feel BAUER. */
  --md-admonition-bg-color: var(--warm-50);
  --md-admonition-fg-color: var(--warm-700);

  /* Footer — dark warm band, white text */
  --md-footer-bg-color:       var(--warm-800);
  --md-footer-bg-color--dark: var(--warm-900);
  --md-footer-fg-color:       var(--brand-white);
  --md-footer-fg-color--light: rgba(255, 255, 255, 0.7);
  --md-footer-fg-color--lighter: rgba(255, 255, 255, 0.45);

  /* Tables, headings, fonts */
  --md-text-font: var(--font-body);
  --md-code-font: var(--font-mono);
}

/* ─── Slate / dark scheme overrides ─────────────────────────────────
 * mkdocs-material switches CSS variables under
 * [data-md-color-scheme="slate"]. Re-map the body palette so the dark
 * scheme is also BAUER — primary stays orange, body inverts to dark
 * warm-gray with light text.
 */
[data-md-color-scheme="slate"] {
  --md-default-fg-color:           var(--warm-100);
  --md-default-fg-color--light:    var(--warm-300);
  --md-default-fg-color--lighter:  var(--warm-400);
  --md-default-fg-color--lightest: var(--warm-600);
  --md-default-bg-color:           var(--warm-900);
  --md-default-bg-color--light:    var(--warm-800);
  --md-default-bg-color--lighter:  #2A2522;
  --md-default-bg-color--lightest: #312C29;

  --md-typeset-color:   var(--warm-100);
  --md-typeset-a-color: var(--orange-400);

  --md-code-fg-color: var(--warm-100);
  --md-code-bg-color: var(--warm-800);

  --md-admonition-bg-color: var(--warm-800);
  --md-admonition-fg-color: var(--warm-100);
}
