@import '@angular/material/theming';

@mixin es-table-theme($theme) {
    $primary: map-get($theme, primary);
    $accent: map-get($theme, accent);
    $warn: map-get($theme, warn);
    $background: map-get($theme, background);
    $foreground: map-get($theme, foreground);
    $isDark: map-get($theme, is-dark);

    .cdk-virtual-scroll-viewport{
        background: mat-color($background, card);
    }

    tr.es-table-row:not(.es-table-row-detail){
        transition: background 100ms;
    }

    tr.es-table-row:not(.es-table-row-detail):hover {
        background: mat-color($background, hover);
    }

    tr.es-table-row:not(.es-table-row-detail).active {
        background: mat-color($primary, 800);
        .mat-cell{
            color: mat-contrast($primary, 800);
        }
    }

    .es-table-reorder-lock .mat-mdc-icon-button{
        color: mat-color($foreground, text);
    }

    .es-table-footer-buttons{
        color: mat-color($foreground, secondary-text);
    }

    .resize-handle{
        border-right-color: mat-color($foreground, divider) !important;
    }

    .es-table-footer{
        background: mat-color($background, card);
    }

    .empty-row{
        font-style: italic;
        font-weight: 300;
        text-align: center;
        font-size: 0.75em;
        margin: 1em 0;
        color: mat-color($foreground, secondary-text);
    }

    .mat-mdc-header-cell {
        color: mat-color($foreground, secondary-text);
    }
}
