// Custom Theming for Angular Material
// For more information: https://material.angular.io/guide/theming
@use '@angular/material' as mat;
@import '@angular/material/theming';

// Plus imports for other components in your app.
@import '../scss/utilities/index';
@import 'overrides/index';

// Include the common styles for Angular Material. We include this here so that you only
// have to load a single css file for Angular Material in your app.
// Be sure that you only ever include this mixin once!
@include mat.core();
@include mat.legacy-core();

$mat-primary: (
  100: var(--color-brand-dark),
  700: var(--color-brand-dark),
  A700: var(--color-brand-dark),
  contrast: (
    A700: $light-primary-text,
  ),
);

$mat-accent: (
  A700: var(--color-brand-light),
  contrast: (
    A700: $light-primary-text,
  ),
);

$mat-secondary: (
  100: var(--color-brand-dark),
  700: var(--color-brand-dark),
  A700: var(--color-brand-dark),
  contrast: (
    A700: $light-primary-text,
  ),
);

$mat-warning: (
  100: var(--color-error),
  500: var(--color-error),
  700: var(--color-error),
  A700: var(--color-error),
  contrast: (
    A700: $light-primary-text,
  ),
);

// Define the palettes for your theme using the Material Design palettes available in palette.scss
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
// hue. Available color palettes: https://material.io/design/color/
$cuorium-primary: mat.define-palette($mat-primary, A700);
$cuorium-accent: mat.define-palette($mat-secondary, A700);

// The warn palette is optional (defaults to red).
$cuorium-warn: mat.define-palette($mat-warning);

// Define a custom typography config that overrides the font-family as well as the
// `headlines` and `body-1` levels.
$custom-typography: mat.define-typography-config(
  $font-family: $font-family-primary,
  $body-1: mat.define-typography-level(
      $font-size-base,
      $base-line-height,
      $font-weight-regular,
    $letter-spacing: normal,
    $font-family: $font-family-primary,
  ),
  $button: mat.define-typography-level(
      $font-size-base,
    $letter-spacing: normal,
  ),
  $body-2: mat.define-typography-level(
      $font-size-base,
      $base-line-height,
      $font-weight-regular,
    $letter-spacing: normal,
    $font-family: $font-family-primary,
  )
);

// Create the theme object. A theme consists of configurations for individual
// theming systems such as "color" or "typography".
$cuorium-theme: mat.define-light-theme((
  color: (
    primary: $cuorium-primary,
    accent: $cuorium-accent,
    warn: $cuorium-warn,
  ),
  typography: $custom-typography
));


// Include theme styles for core and each component used in your app.
// Alternatively, you can import and @include the theme mixins for each component
// that you are using.
@include mat.all-component-themes($cuorium-theme);
@include mat.all-legacy-component-themes($cuorium-theme);
