/* App-global styles. Kept intentionally minimal — nearly all styling is component-scoped .razor.css.

   The "Navigate to ..." nav dialogs dock as a full-height panel flush against the 72px nav-menu
   drawer, below the 72px fixed app bar, instead of floating centred. It is hooked via an inert
   marker element rendered inside the dialog because MudBlazor 9.7's DialogOptions still exposes no
   dialog-level custom class (only BackgroundClass, which lands on the overlay); the dialog also renders
   in the overlay, out of reach of scoped CSS. */
.mud-dialog:has(.kompan-nav-dialog-marker) {
    position: fixed !important;
    top: 72px !important;
    left: 72px !important;
    margin: 0 !important;
    width: max-content !important;
    min-width: 600px !important;
    max-width: calc(100vw - 72px) !important;
    height: calc(100vh - 72px) !important;
    max-height: calc(100vh - 72px) !important;
    border-radius: 0 !important;
    transform: none !important;
}

/* Docked nav dialogs read as an attached panel, not a modal — drop the dimming scrim.
   MudBlazor 9.7's gray is `background-color: var(--mud-palette-overlay-dark)` on the
   `.mud-overlay-scrim.mud-overlay-dark` element; BackgroundClass lands on the overlay, so zero
   the scrim (matched both as the classed element and as its descendant). */
.kompan-nav-dialog-no-scrim,
.kompan-nav-dialog-no-scrim .mud-overlay-scrim {
    background-color: transparent !important;
}

/* Pin the Cancel/Confirm actions to the bottom of the full-height panel. KompanModal nests the
   MudDialog content/actions inside a plain wrapper <div>, a MudFocusTrap, and a focus-trap child
   container (confirmed via the rendered DOM), so the actions are NOT a direct flex child of the
   flex-column .mud-dialog. Make that whole wrapper chain a filling flex column so .mud-dialog-content
   grows and .mud-dialog-actions drops to the bottom. */
.mud-dialog:has(.kompan-nav-dialog-marker) > div,
.mud-dialog:has(.kompan-nav-dialog-marker) .mud-focus-trap,
.mud-dialog:has(.kompan-nav-dialog-marker) .mud-focus-trap-child-container {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
}
.mud-dialog:has(.kompan-nav-dialog-marker) .mud-dialog-actions {
    margin-top: auto !important;
}

/* Navigate-dialog selected list row: a left accent bar plus a clearer (opaque) tint than
   mud-primary-hover, since the faint hover tint alone was too subtle to spot the selected row. */
.kompan-nav-selected-row td {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 12%, var(--mud-palette-surface)) !important;
}
.kompan-nav-selected-row td:first-child {
    box-shadow: inset 4px 0 0 0 var(--mud-palette-primary) !important;
}

/* Bookmarked/Recent tabs render as a MudList; give the selected list item the same accent bar + tint
   as the table rows (MudBlazor's default .mud-selected-item is only a faint action-hover gray). */
.mud-dialog:has(.kompan-nav-dialog-marker) .mud-list-item.mud-selected-item {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 12%, var(--mud-palette-surface)) !important;
    box-shadow: inset 4px 0 0 0 var(--mud-palette-primary) !important;
}
