/* Athena design tokens aliasing the MudBlazor/AthenaTheme palette, so the theme stays the single
   source of truth and consumers track light/dark automatically.

   Loaded app-wide from the host index.html. This is the design-system home for the tokens; the
   parallel src/UI cv-tokens.css is the pre-migration copy, and tokens retire from it as each
   component that uses them moves into Athena.Design. */
:root {
    --athena-blue: var(--mud-palette-primary);
    --athena-blue-deep: var(--mud-palette-primary-darken);
    --athena-blue-700: var(--mud-palette-primary-darken);
    --athena-blue-300: var(--mud-palette-primary);
    --athena-blue-100: var(--mud-palette-primary-lighten);
    --athena-blue-50: var(--mud-palette-primary-lighten);
    --athena-green: var(--mud-palette-success);
    --athena-green-deep: var(--mud-palette-success-darken);
    --athena-green-50: var(--mud-palette-success-lighten);
    --athena-ink: var(--mud-palette-text-primary);
    --athena-ink-2: var(--mud-palette-text-primary);
    --athena-ink-3: var(--mud-palette-text-secondary);
    --athena-ink-4: var(--mud-palette-gray-default);
    --athena-ink-5: var(--mud-palette-text-disabled);
    --athena-line: var(--mud-palette-lines-default);
    --athena-line-soft: var(--mud-palette-divider-light);
    --athena-bg: var(--mud-palette-background);
    --athena-bg-soft: var(--mud-palette-surface);
    --athena-surface: var(--mud-palette-surface);
    --athena-warn: var(--mud-palette-warning);
    --athena-warn-bg: var(--mud-palette-warning-lighten);
    --athena-warn-deep: var(--mud-palette-warning-darken);
    --athena-danger-deep: var(--mud-palette-error-darken);
    --athena-danger-bg: var(--mud-palette-error-lighten);
    --athena-danger-border: color-mix(in srgb, var(--mud-palette-error) 35%, var(--mud-palette-error-lighten));
    --athena-danger-tint: var(--mud-palette-error-lighten);
    --shadow-1: var(--mud-elevation-1);
    --shadow-2: var(--mud-elevation-2);
    --shadow-3: var(--mud-elevation-8);
    --font-display: "Inter", "Segoe UI", system-ui, sans-serif;
    /* Mirrors AthenaColors.MonospaceFontFamily so chart C# and CSS agree on tabular figures. */
    --font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;

    /* Radius scale by surface role. The Mud theme default (8px) is the card step, so controls and the
       smaller steps need naming or every component re-guesses them. */
    --athena-radius-overlay: 12px;
    --athena-radius-card: 8px;
    --athena-radius-control: 4px;
    --athena-radius-cell: 3px;

    /* Categorical hues identifying a page-variable's type. Distinct from the semantic palette on
       purpose — these encode identity, not state, so there is no Mud equivalent to alias.
       Backgrounds are mixed against the surface at use time so tints follow light/dark. */
    --athena-type-text: #4A5870;
    --athena-type-number: #2D4F9E;
    --athena-type-boolean: #0E7490;
    --athena-type-datetime: #6E2A91;
    --athena-type-location: #2E8C36;
    --athena-type-struct: #8E5E12;
    --athena-type-geometry: #2A4480;
    --athena-type-guid: #6B7890;
}

/* The Mud theme default radius is the card step, and MudIconButton is a circle. Controls that owe the
   4px step opt in with this, since a scoped rule cannot reach a MudBlazor component's root element. */
.athena-control-radius {
    border-radius: var(--athena-radius-control);
}

/* The drawer palette is themed for the dark nav rail; page panels opt in to surface colors. */
.athena-drawer-surface.mud-drawer {
    --mud-palette-drawer-background: var(--mud-palette-surface);
    --mud-palette-drawer-text: var(--mud-palette-text-primary);
    --mud-palette-drawer-icon: var(--mud-palette-text-secondary);
}

/* AthenaResponsiveDrawer's side drawer before the viewport answers: shown from Md up, where it will stay. */
@media (max-width: 959.98px) {
    .athena-drawer-pending.mud-drawer {
        display: none !important;
    }
}

/* Data values — offsets, times, counts — so stacked columns of them stay aligned. */
.athena-mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}
