/*
    Fix: Sorting on collpased tables only sorts one direction by default and cannot be undone.
    We'd need to implement custom sort buttons for the affected mobile layouts if we don't want to confuse our users. 
*/
.mud-table-smalldevices-sortselect {
  display: none !important;
}

/*
    Fix: Table toolbar does not support Grid 
    https://github.com/MudBlazor/MudBlazor/issues/11529
*/
.mud-table .mud-toolbar:has(.mud-grid) {
  height: auto;
  padding-top: 16px;
  padding-bottom: 8px;
}

/*
    Fix: Remove scrollbar in nested expansion panels.
    https://github.com/MudBlazor/MudBlazor/issues/12392
*/
.mud-collapse-wrapper-inner {
  overflow: hidden;
}

/*
    Fix: NavLink active icon color should match with text color
    https://github.com/MudBlazor/MudBlazor/discussions/1865
*/
.mud-nav-link.active:not(.mud-nav-link-disabled) svg {
  fill: var(--mud-palette-primary);
}

.mud-nav-link.active:not(.mud-nav-link-disabled) span.mud-icon-root {
  color: var(--mud-palette-primary);
}

/*
    Only the last (deepest) active nav link stays highlighted.
    A group header is dimmed as long as one of its nested links is active.
*/
.mud-menu:has(~ .mud-nav-group .mud-nav-link.active) .nav-group-header .mud-nav-link.active:not(.mud-nav-link-disabled),
.mud-menu:has(~ .mud-nav-group .mud-nav-link.active) .nav-group-header .mud-nav-link.active:not(.mud-nav-link-disabled) * {
  color: var(--mud-palette-drawer-text);
}

.mud-menu:has(~ .mud-nav-group .mud-nav-link.active) .nav-group-header .mud-nav-link.active:not(.mud-nav-link-disabled) svg {
  fill: var(--mud-palette-drawer-text);
}

/*
    Fix: Responsive Design - NavBar (Indentation is off at exactly 960px)
*/
.mud-drawer-close-mini-md-left.mud-drawer-left-clipped-docked .mud-appbar {
  margin-left: 0 !important;
  width: 100% !important;
}

/*
    Fix: Growing MudGrid must not shift other children of same parent.
*/
.mud-grid.flex-grow-1 {
  min-width: 0;
  min-height: 0;
}

/*
    Fix: Secondary MudText must use correct secondary color from theme.
    https://github.com/MudBlazor/MudBlazor/issues/8028
*/
.mud-secondary-text {
  color: var(--mud-palette-text-secondary) !important;
}
