@use 'sass:map';
@use '@angular/material' as mat;
@use './styles/margins.scss';
@use './styles/material-scrolling-fixes.scss';
@use './styles/table.scss';
@use './styles/typography.scss';
@use './styles/buttons';
@use './styles/dialog.scss';
@use './styles/fab.scss';
@use './styles/icons.scss';
@use './styles/backgrounds.scss';
@use './styles/material-overrides.scss';
@use './modules/panels/panels.scss';
@use './modules/sidenav/sidenav.scss';
@use './modules/alert/alert.scss';

[data-color-scheme='auto'] {
    color-scheme: light dark;
}

[data-color-scheme='light'] {
    color-scheme: light;
}

[data-color-scheme='dark'] {
    color-scheme: dark;
}

[data-is-dark='false'] .nat-for-dark {
    display: none;
}

[data-is-dark='true'] .nat-for-light {
    display: none;
}

/**
 * Global css
 */
.mat-mdc-table .mdc-button__label {
    white-space: nowrap;
}

html,
body,
app-root {
    margin: 0;
    height: 100%;
    min-height: 100%;
}

app-root {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

body {
    background-color: var(--mat-sys-surface-container);
    color: var(--mat-sys-on-surface);
    font: var(--mat-sys-body-medium);

    --nat-elevation: inset 0 1px rgba(255, 255, 255, 0.3), var(--mat-sys-level1);
}

.nat-elevation {
    box-shadow: var(--nat-elevation);
}

.nat-bold {
    font-weight: 500;
}

.nat-fixed-fab {
    position: fixed !important;
    right: 32px;
    bottom: 32px;
    z-index: 999;
}

// Most of our sidenav menus (mainly in admin) use simple nat-gradient-* that applies a contrasted text color
// that is overridden by material on child element
// This instruction activate text color inheritance to simplify html and css for active routes.
.mat-mdc-list-item {
    &[routerlinkactive*='nat-frame-'],
    &[routerlinkactive*='nat-gradient-'] {
        .mdc-list-item__start,
        .mdc-list-item__primary-text {
            color: inherit !important;
        }
    }
}
