@use "sass:map";
@use "@angular/material" as mat;
@use "../old-variables" as old-vars;
@use "./typography" as stark-typography;
@use "./material-palette" as stark-mat-palette;

@mixin stark-base-theme($material-theme-config, $stark-theme-config) {
  $primary-palette: map.get($material-theme-config, primary);
  $typography-config: map.get($material-theme-config, typography);

  body {
    background-color: old-vars.$offwhite;
    color: old-vars.$primary-dark-text-color;
  }

  a {
    color: mat.get-color-from-palette($primary-palette, 700);
  }

  /*
  Angular Material body-1, body-2,... are to be used only for components
  In the body, a different font size is used
  */
  body {
    font-family: mat.font-family($typography-config);
    font-size: 16px;
    font-weight: 400;
    line-height: 26px;
  }

  h1 {
    font-size: mat.font-size($typography-config, headline);
    font-weight: mat.font-weight($typography-config, headline);
    line-height: mat.line-height($typography-config, headline);
    margin: 0 0 16px;
  }

  h2 {
    font-size: mat.font-size($typography-config, title);
    font-weight: mat.font-weight($typography-config, title);
    line-height: mat.line-height($typography-config, title);
    margin: 0 0 16px;
  }

  h3 {
    font-size: mat.font-size($typography-config, subheading-2);
    font-weight: mat.font-weight($typography-config, subheading-2);
    line-height: mat.line-height($typography-config, subheading-2);
    margin: 0 0 16px;
  }

  h4 {
    font-size: mat.font-size($typography-config, subheading-1);
    font-weight: mat.font-weight($typography-config, subheading-1);
    line-height: mat.line-height($typography-config, subheading-1);
    margin: 0 0 16px;
  }
}
