@import "./card-subtitle";
@import "./card-subtitle.md.vars";

// Material Design Card Subtitle
// --------------------------------------------------

.card-subtitle-md {
  @include padding($card-md-subtitle-padding-top, $card-md-subtitle-padding-end, $card-md-subtitle-padding-bottom, $card-md-subtitle-padding-start);

  font-size: $card-md-subtitle-font-size;
  color: $card-md-subtitle-color;
}


// Generate Material Design Card subtitle Colors
// --------------------------------------------------

@each $color-name, $color-value in $colors-md {
  $color-base: ion-color($colors-md, $color-name, base, md);
  $color-contrast: ion-color($colors-md, $color-name, contrast, md);

  .card-md-#{$color-name} {

    .card-subtitle-md {
      color: $color-contrast;
    }

    @each $color-name, $color-value in $colors-md {
      $color-base: ion-color($colors-md, $color-name, base, md);

      .card-subtitle-md-#{$color-name} {
        color: $color-base;
      }
    }
  }

  .card-subtitle-md-#{$color-name} {
    color: $color-base;
  }
}
