/* ============================================================================
   Erp Design System — Component styles
   ----------------------------------------------------------------------------
   Consumes the tokens in erp-tokens.css (load that FIRST). Naming convention is
   BEM-ish:  erp-{block}  /  erp-{block}__{element}  /  erp-{block}--{modifier}.
   Load AFTER MudBlazor.min.css so per-color overrides win specificity ties.
   ============================================================================ */

/* Index: split into per-component files under css/, imported in original order. */
@import "css/erp-button.643eabd541.css";
@import "css/erp-field.9790e5ea3d.css";
@import "css/erp-selection-controls.924f8eefa2.css";
@import "css/erp-status-badge.ede5850089.css";
@import "css/erp-breadcrumbs.997f6676d3.css";
@import "css/erp-page-header.21dcbc8825.css";
@import "css/erp-card.2af431e20c.css";
@import "css/erp-tabs.f6410de72d.css";
@import "css/erp-side-menu.19c716b2a3.css";
@import "css/erp-modal.d51d9313b2.css";
@import "css/erp-data-table.736c43a5bd.css";
@import "css/erp-form-sections.f0335f484f.css";
@import "css/erp-field-states.684472c026.css";
@import "css/erp-simple-text.4edf0808c1.css";
@import "css/erp-simple-label.110c963819.css";
@import "css/erp-advanced-search.880bea4d5f.css";
@import "css/erp-files-modal.28471a6be5.css";
@import "css/erp-table-toolbar.28b46f196a.css";
@import "css/erp-card-grid.ff4d72afeb.css";
@import "css/erp-org-chart.f5c7ba91d9.css";
@import "css/erp-list-toolbar.0a6962c94c.css";
@import "css/erp-org-structure.a90c2b589e.css";
@import "css/erp-pager.ea5dfe13ee.css";
@import "css/erp-topbar.6bf56b0957.css";
@import "css/erp-accessibility.e7d1e4879c.css";
@import "css/erp-reduced-motion.ad7d94c1f8.css";
@import "css/erp-motion.bbf0bfb5ea.css";
@import "css/erp-pickers.61d1d108ba.css";
@import "css/erp-menu-item.8f32abd62a.css";
@import "css/erp-menu.bd02baa507.css";
@import "css/erp-file-upload.8fe697de28.css";
@import "css/erp-toast.12e1ba5037.css";
@import "css/erp-select-menu.c2a64c8f3b.css";

/* ── Tooltips ── */
/* Colours: the design system's "Toast, tooltip, popover" row (design-system.html) — contentOverlayFill on
   textMainBodyDefault. MudBlazor's own default is --mud-palette-gray-darker on --mud-palette-dark-text,
   a fixed grey that is not a token, which is why light-mode tooltips looked off-system. The overlay fill is
   70% translucent, so it gets the popover shadow, a divider outline and a blur to stay legible over
   busy content (tables, charts). Colored tooltips (Color="Color.Error" etc.) keep MudBlazor's palette.
   The doubled class only raises specificity, so this wins over MudBlazor's own rules (and an embedded host's\n   scoped copy of them), whatever order a host loads the stylesheets in. */
.mud-tooltip.mud-tooltip-default.mud-tooltip-default {
    color: var(--ds-textMainBodyDefault);
    background-color: var(--ds-contentOverlayFill);
    border: 1px solid var(--ds-dividerDefault);
    box-shadow: var(--hr-gap-shadowPopover);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.mud-tooltip.mud-tooltip-default.mud-tooltip-default.mud-tooltip-arrow::after {
    border-color: var(--ds-dividerDefault) transparent transparent transparent;
}

/* ── MudBlazor coloured TEXT → design-system text tokens ───────────────────────────────────────────────
   MudBlazor paints coloured text (links, breadcrumbs, Text/Outlined buttons, Color= icon buttons, the
   .mud-*-text utilities) with the palette colour — and our palette holds the action FILL tokens, because
   MudBlazor needs those for its filled buttons. A fill is not a text colour: in dark the slate fill #5B77A2
   on the #171717 page is 3.9:1 and the danger fill on a card 2.3:1. The guide's rule is "text → textMain*"
   per role, so this maps each MudBlazor colour to its role's text token (ErpColor ↔ role as in ErpTheme:
   Mud Primary = design-system Secondary, Mud Secondary/Info = Primary, Error = Danger). Light Primary is
   unchanged (both #30486d); the other roles take the darker 700 shade in light and the 200 shade in dark.
   ErpButton is excluded — it has its own role tokens (erp-button.css). The utilities carry !important in
   MudBlazor, so they need it here too; the doubled class only raises specificity above MudBlazor's. */
.mud-primary-text.mud-primary-text { color: var(--ds-textMainSecondaryDefault) !important; }
.mud-secondary-text.mud-secondary-text,
.mud-info-text.mud-info-text { color: var(--ds-textMainPrimaryDefault) !important; }
.mud-success-text.mud-success-text { color: var(--ds-textMainSuccessDefault) !important; }
.mud-warning-text.mud-warning-text { color: var(--ds-textMainWarningDefault) !important; }
.mud-error-text.mud-error-text { color: var(--ds-textMainDangerDefault) !important; }

.mud-button-text.mud-button-text-primary:not(.erp-btn),
.mud-button-outlined.mud-button-outlined-primary:not(.erp-btn) { color: var(--ds-textMainSecondaryDefault); }
.mud-button-text.mud-button-text-secondary:not(.erp-btn),
.mud-button-outlined.mud-button-outlined-secondary:not(.erp-btn),
.mud-button-text.mud-button-text-info:not(.erp-btn),
.mud-button-outlined.mud-button-outlined-info:not(.erp-btn) { color: var(--ds-textMainPrimaryDefault); }
.mud-button-text.mud-button-text-success:not(.erp-btn),
.mud-button-outlined.mud-button-outlined-success:not(.erp-btn) { color: var(--ds-textMainSuccessDefault); }
.mud-button-text.mud-button-text-warning:not(.erp-btn),
.mud-button-outlined.mud-button-outlined-warning:not(.erp-btn) { color: var(--ds-textMainWarningDefault); }
.mud-button-text.mud-button-text-error:not(.erp-btn),
.mud-button-outlined.mud-button-outlined-error:not(.erp-btn) { color: var(--ds-textMainDangerDefault); }
