/*
    AB-96 — Radzen dressed in Fingli's tokens.

    Radzen exposes ~1,800 CSS custom properties, so matching the page is a mapping exercise rather than
    a fight with specificity: nothing here overrides a selector, it only redefines variables that
    Radzen's own rules already read. That is why this file is short and why it should stay short — the
    moment it starts carrying `.rz-something { ... !important }` the component is being fought rather
    than themed, and that is the signal to reconsider.

    Right-hand sides are the app's own tokens from aurora-blazor.Client/wwwroot/css/theme.css, so this
    inherits light/dark and any future brand change for free rather than restating #4b01f9 anywhere.

    Two selectors do live at the bottom, against that rule and with their reasons written out. They are
    not theming — they undo markup Radzen emits unconditionally — and they are global rather than
    scoped because a scope attribute never lands on a child component's output (CLAUDE.md §5), so
    written in SlotTimeline.razor.css they would compile clean and do nothing.

    Loaded AFTER material-base.css (see iframe.html) — these are plain :root definitions with no extra
    specificity, so order is what decides.
*/

:root {
    /* Brand. Radzen ships #4340D2 indigo; ours is Fingli purple. */
    --rz-primary: var(--brand-purple);
    --rz-on-primary: var(--primary-foreground);

    /* Task bars. Radzen routes these through --rz-info (a blue), not through --rz-primary. */
    --rz-scheduler-event-background-color: var(--brand-purple);
    --rz-scheduler-event-color: var(--primary-foreground);

    /* Surfaces and rules. */
    --rz-base-background-color: var(--background);
    --rz-text-color: var(--foreground);
    --rz-gantt-background-color: var(--card);
    --rz-gantt-border: 1px solid var(--border);

    /* Shape and type. Radzen's 4px against our 0.625rem is the single most obvious tell that a
       component came from somewhere else. */
    --rz-border-radius: var(--radius);
    --rz-gantt-event-border-radius: var(--radius);
    --rz-text-font-family: var(--font-sans);
    --rz-font-family: var(--font-sans);

    /* Matches the RowHeightPx passed to the component, so grid pane and chart pane agree. */
    --rz-gantt-row-height: 38px;

    /* Containment, not cosmetics. material-base.css carries exactly two rules that reach bare
       elements: `body { margin: 0 }`, which the app already does, and `input { color; font-size }`,
       which reaches every input on every page. A bare `input` selector loses to any class, so
       BlazorBlueprint's own fields are unaffected — but an unclassed input anywhere in the app would
       silently pick up Radzen's colour and size. Pointing those two variables back at our own tokens
       makes that rule a no-op instead of a difference, without fighting the selector. */
    --rz-input-value-color: var(--foreground);
    --rz-input-font-size: inherit;
}

/*
    AB-96 — the two places the slot timeline has to reach into Radzen's own markup.

    Both are scoped under .slot-timeline, so nothing else that ever renders a RadzenGantt inherits
    them. Neither uses !important; if either ever needs to, that is the signal the component is being
    fought rather than configured.
*/

/* The row expander. RadzenGantt wires LoadChildData on its inner grid unconditionally, so the grid
   renders a chevron button on every row and merely hides it (visibility:hidden) when the row has no
   children — which ours never do, see SlotBar.ParentId. Hidden is not gone: the button still took the
   whole 28px content box of a 60px first column, so the slot number rendered into zero width and the
   column read as empty.

   The button, not its wrapper. `.rz-cell-toggle` is the flex container holding both the chevron *and*
   the cell's value, so hiding it takes the number with it — which looks identical to the bug being
   fixed. */
.slot-timeline .rz-grid-table td .rz-cell-toggle > .rz-button {
    display: none;
}

/* Header columns sized by the widths Radzen asked for, rather than by their contents.

   Auto layout was letting a header cell grow past its span — a "listopad 2026" over four days of
   November stretched the table 8px wider than the timeline it sits above. The bars are positioned as a
   percentage of that timeline, so any difference between the two is a bar drifting away from the column
   it names: 8px across seven weeks put the right-hand end of a bar most of a day off its own date.
   Fixed layout makes the two exactly equal. */
.slot-timeline .rz-gantt-table {
    table-layout: fixed;
}

/* Day labels at an axis size rather than a body size. Radzen sets these header cells in the same 14px
   as running text, where "niedz. 20" needs a 62px column — so a booking of any length becomes a very
   long horizontal scroll to read dates that are, after all, tick marks. At 11px the widest Polish label
   fits 49px, which is most of a working fortnight on screen instead of ten days.

   A selector because Radzen publishes no variable for it; measured rather than chosen, and paired with
   LegibleDayWidthPx in SlotTimeline — change one and the other stops being true. */
.slot-timeline tr:not(.rz-gantt-header-group-row) > th.rz-gantt-table-header-cell {
    font-size: 0.6875rem;
    letter-spacing: normal;
}
