@import '../core/theming/palette';
@import '../core/theming/theming';
@import '../core/style/elevation';
@import '../core/typography/typography-utils';


@mixin mat-card-theme($theme) {
  $background: map-get($theme, background);
  $foreground: map-get($theme, foreground);

  .mat-card {
    @include _mat-theme-overridable-elevation(1, $theme);
    background: mat-color($background, card);
    color: mat-color($foreground, text);

    // Needs extra specificity to be able to override the elevation selectors.
    &.mat-card-flat {
      @include _mat-theme-overridable-elevation(0, $theme);
    }
  }

  .mat-card-subtitle {
    color: mat-color($foreground, secondary-text);
  }
}

@mixin mat-card-typography($config) {
  .mat-card {
    font-family: mat-font-family($config);
  }

  .mat-card-title {
    font: {
      size: mat-font-size($config, headline);
      weight: mat-font-weight($config, title);
    }
  }

  .mat-card-header .mat-card-title {
    font-size: mat-font-size($config, title);
  }

  .mat-card-subtitle,
  .mat-card-content {
    font-size: mat-font-size($config, body-1);
  }
}
