/* Design tokens of the Casafari API and MCP Platform (developers.casafari.com, its assets/site.css), light theme.
   The dark theme below swaps the same tokens; Bootstrap's own variables are pointed at them so its components follow. */
:root {
    color-scheme: light;
    --pc-bg: #faf9f6;
    --pc-bg2: #f3f2ed;
    --pc-fg: #1c1b18;
    --pc-fg2: #46433c;
    --pc-muted: #625e55;
    --pc-line: #e5e2db;
    /* A stronger line (field and button borders), between the platform's `line` and its much darker `line2`. */
    --pc-line2: #d6d2c9;
    --pc-accent: #0a5bc0;
    --pc-accent2: #094fa8;
    --pc-accent-rgb: 10, 91, 192;
    --pc-accent2-rgb: 9, 79, 168;
    --pc-accent-bg: #e8f1fd;
    --pc-accent-text: #fff;
    --pc-ok: #0f6e35;
    --pc-ok-bg: #e6f6ec;
    --pc-warn: #8a5a00;
    --pc-warn-bg: #fff4de;
    --pc-bad: #c4332d;
    --pc-bad-bg: #fdecea;
    --pc-code-bg: #f4f2ed;
    /* The fixed navbar's height: body padding, the docs tabs and the Settings sidebar are placed under it. */
    --pc-navbar-height: 4rem;
    /* Fixed bars let the page show through, blurred, as on the platform's own header. */
    --pc-bar-alpha: 82%;
    /* A dark bar over a light page turns gray at the light bar's alpha, so it stays nearly opaque. */
    --pc-dark-bar-alpha: 94%;
    --pc-bar-blur: saturate(180%) blur(12px);
    --pc-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
    /* Surfaces that stay dark in both themes: the navbar and Redoc's code panel. */
    --pc-dark-bg: #12110f;
    --pc-dark-bg2: #1d1c18;
    --pc-dark-bg3: #2a2824;
    --pc-dark-fg: #eeebe4;
    --pc-dark-muted: #9d978b;
    --pc-dark-line: #2e2c27;
    --pc-dark-line2: #3b3832;
    --pc-font: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --pc-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    /* The platform docs' headings. */
    --pc-head: Newsreader, Georgia, 'Times New Roman', serif;

    --bs-body-bg: var(--pc-bg);
    --bs-body-color: var(--pc-fg);
    --bs-emphasis-color: var(--pc-fg);
    --bs-secondary-color: var(--pc-muted);
    --bs-secondary-bg: var(--pc-bg2);
    --bs-tertiary-bg: var(--pc-bg2);
    --bs-border-color: var(--pc-line);
    --bs-heading-color: var(--pc-fg);
    --bs-code-color: var(--pc-fg);
    --bs-link-color: var(--pc-accent);
    --bs-link-color-rgb: var(--pc-accent-rgb);
    --bs-link-hover-color: var(--pc-accent2);
    --bs-link-hover-color-rgb: var(--pc-accent2-rgb);
}

/* The platform's dark theme. theme.js sets the attribute from the shared `casafari_theme` choice; Bootstrap reads it
   too. Only the tokens change: the --bs-* variables above refer to them, and this file loads after Bootstrap. */
:root[data-bs-theme="dark"] {
    color-scheme: dark;
    --pc-bg: #181714;
    --pc-bg2: #1d1c18;
    --pc-fg: #eeebe4;
    --pc-fg2: #c4bfb4;
    --pc-muted: #9d978b;
    --pc-line: #3b3832;
    --pc-line2: #4d4942;
    --pc-accent: #5aa6ff;
    --pc-accent2: #7ab8ff;
    --pc-accent-rgb: 90, 166, 255;
    --pc-accent2-rgb: 122, 184, 255;
    --pc-accent-bg: #1d2b40;
    --pc-accent-text: #181714;
    --pc-ok: #3dbf72;
    --pc-ok-bg: #102a1b;
    --pc-warn: #e8b14a;
    --pc-warn-bg: #2e2210;
    --pc-bad: #ff7b72;
    --pc-bad-bg: #331715;
    --pc-code-bg: #12110f;
    --pc-shadow: none;
}

body {
    background: var(--pc-bg);
    color: var(--pc-fg);
}
