/*
 * @file Eldora brand CSS served by the CDN (the --theme-* variables + self-hosted @font-face faces).
 * @description Brand artifact loaded by every Eldora browser surface. It carries five things:
 *   1. `@font-face` for the self-hosted Eldora fonts (relative `fonts/*.woff2` URLs).
 *   2. the `:root` `--theme-*` brand block — colours + fonts.
 *   3. one hand-owned colour decision on a CONTENT element of the data console (see section 3).
 *   4. one hand-owned OPTIONAL token of the shared surface sheet (see section 4).
 *   5. one hand-owned OPTIONAL token of the shared button rules (see section 5).
 * Sections 1 and 2 sit between the `GENERATED:*` markers and are DERIVED from
 * the `brand/theme.yaml` beside this file (this environment's own authored Eldora brand): edit the brand there
 * and run `pnpm --filter @apps/theming generate:brand`; the drift check (brand-generation.test.ts) fails if
 * these regions go stale. Everything OUTSIDE the markers — this header and sections 3 to 5 — is hand-owned.
 * The hand-owned region carries TOKENS ONLY — never a chrome rule. How the admin and data surfaces are laid
 * out (the left rail, its entries, the title band) is shared code, declared once in
 * packages/app-shell/src/styles/surface.css and coloured for every customer through the `--theme-*` contract
 * below, so Eldora's rail is green because Eldora's brand is green and for no other reason. A rule written
 * here is served from the CDN after that sheet and would silently win; the surface-optin.test.ts guard in
 * @apps/app-shell fails on any selector this file shares with it.
 */

/* === 1. Self-hosted Eldora fonts === */

/* GENERATED:brand-fonts — do not edit by hand; run `pnpm --filter @apps/theming generate:brand` */
/* Roboto 400 normal */
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/Roboto-Regular.woff2") format("woff2");
}

/* Roboto 500 normal */
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("fonts/Roboto-Medium.woff2") format("woff2");
}

/* Bricolage 600 normal */
@font-face {
    font-family: "Bricolage";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("fonts/Bricolage-SemiBold.woff2") format("woff2");
}
/* GENERATED:brand-fonts:end */

/* === 2. Brand token block — the SPA / Hosted-UI `--theme-*` custom properties === */
:root {
    /* GENERATED:brand-vars — do not edit by hand; run `pnpm --filter @apps/theming generate:brand` */
    --theme-font: "Roboto", -apple-system, "Segoe UI", system-ui, sans-serif;
    --theme-serif-font: "Bricolage", "Roboto", system-ui, sans-serif;
    --theme-primary: #80ba27;
    --theme-primary-hover: #71a422;
    --theme-primary-light: #b3d67d;
    --theme-primary-light-shadow: rgba(128, 186, 39, 0.6);
    --theme-primary-extra-light: #f0f7e5;
    --theme-secondary: #212631;
    --theme-secondary-soft: #d9dbdf;
    --theme-secondary-light: #7a7d83;
    --theme-secondary-light-shadow: rgba(33, 38, 49, 0.6);
    --theme-secondary-shadow: rgba(33, 38, 49, 0.79);
    --theme-secondary-extra-light: #e4e5e6;
    --theme-background: #f1f1f1;
    --theme-surface: #ffffff;
    --theme-surface-muted: #e9e9ea;
    --theme-border: #babcbf;
    --theme-text: #212631;
    --theme-text-muted: #6a6e75;
    --theme-text-strong: #0e1015;
    --theme-text-inverse: #ffffff;
    --theme-shadow: rgba(128, 186, 39, 0.18);
    --theme-subtle-shadow: rgba(33, 38, 49, 0.25);
    --theme-subtle-border: #cecfd2;
    --theme-success: #0f7a3d;
    --theme-error: #c0261f;
    --theme-warning: #9c5400;
    --theme-rail: #212631;
    --theme-rail-text: #ffffff;
    --theme-rail-active: rgba(255, 255, 255, 0);
    --theme-rail-active-text: #80ba27;
    /* GENERATED:brand-vars:end */
}

/* === 3. Data-console content colour — the ONE hand-owned rule, and not chrome === */

/* Data-lake names are navigation inside the table, not branded calls to action. Mantine Anchors otherwise default
   to the primary colour, so keep their text in Eldora's standard near-black text token. This is a decision about
   the COLOUR OF A CONTENT ELEMENT of the data console, predating the shared rail and scoped to a grid the shared
   sheet is forbidden to touch — it is deliberately not part of the shared chrome, and unifying it would change
   what every other customer sees. */
.explorer-children-table .mantine-Anchor-root {
    color: var(--theme-text) !important;
}

/* === 4. Rail current-entry marker — an OPTIONAL token of the shared surface sheet, and not chrome === */

/* Eldora names its current rail entry by its label and a leading bar rather than by a fill: `railActiveColor` is
   authored fully transparent in this environment's brand, so the slate ground runs unbroken behind the rail and
   the eldora green does the whole job — the label in `railActiveTextColor`, the bar here. The shape, the width
   and the placement of that bar are the shared sheet's (`.app-sidebar__link[data-active="true"]` in
   packages/app-shell/src/styles/surface.css); this file supplies its COLOUR alone, which is why a token is the
   right form and a rule would be the wrong one. The shared sheet leaves the property undeclared and falls back
   to `transparent`, so a brand that says nothing here keeps the filled-tab treatment untouched. */
:root {
    --surface-rail-active-marker: var(--theme-primary);
}

/* === 5. Bordered secondary-button label — an OPTIONAL token of the shared button rules, and not chrome === */

/* Eldora's bordered secondary buttons (`.default-button` in Mantine's `default` variant) take their label in the
   same slate as their border rather than in the eldora green, so the green stays reserved for the filled primary
   action. The rule itself — border, fill, hover — is the shared one in packages/app-shell/src/styles/app.css,
   which reads this token and falls back to `--theme-primary` when a brand leaves it undeclared. */
:root {
    --default-button-label-color: var(--theme-secondary);
}
