// ==================================================================
// Card
// ==================================================================

//
// Available Variables
///
$sprk-card-max-width: 26.5625rem !default;
$sprk-card-breakpoint: $sprk-split-breakpoint-s !default;
$sprk-card-shadow: 0 3px 10px 1px rgba(0, 0, 0, 0.08) !default;
$sprk-card-shadow-wide-viewport: 0 3px 18px 1px rgba(0, 0, 0, 0.08) !default;
$sprk-card-shadow-standout: 0 4px 20px 2px rgba(0, 0, 0, 0.1) !default;
$sprk-card-shadow-standout-wide-viewport: 0 4px 40px 2px rgba(0, 0, 0, 0.1) !default;
$sprk-card-border-radius: 8px !default;
$sprk-card-content-padding: $sprk-space-misc-a !default;
$sprk-card-header-bg-color:$sprk-green !default;
$sprk-card-header-text-color: $sprk-white !default;

.sprk-c-Card {
  box-shadow: $sprk-card-shadow;
  border-radius: $sprk-card-border-radius;
  max-width: $sprk-card-max-width;

  @media all and (min-width: $sprk-card-breakpoint) {
    box-shadow: $sprk-card-shadow-wide-viewport;
  }
}

.sprk-c-Card--standout {
  box-shadow: $sprk-card-shadow-standout;

  @media all and (min-width: $sprk-card-breakpoint) {
    box-shadow: $sprk-card-shadow-standout-wide-viewport;
  }
}

.sprk-c-Card__content,
.sprk-c-Card__header {
  padding: $sprk-card-content-padding;
}

.sprk-c-Card__header {
  background-color: $sprk-card-header-bg-color;
  color: $sprk-card-header-text-color;
}

// Use when you have an img, svg or header element
// with a bg color
// at top of the card to
// have border-radius match the card container
.sprk-c-Card__media,
.sprk-c-Card__header {
  border-radius: $sprk-card-border-radius $sprk-card-border-radius 0 0;
}

.sprk-c-Card__container {
  flex: 0 1 $sprk-card-max-width;
  min-width: 0;
}

// IE11 flexbox fix - https://github.com/philipwalton/flexbugs#flexbug-17
.sprk-o-Stack__item.sprk-o-Stack__item--flex\@xs.sprk-c-Card {
  @media all and (min-width: $sprk-split-breakpoint-xs) {
    flex: 0 1 $sprk-card-max-width;
    min-width: 0%;
  }
}

.sprk-o-Stack__item.sprk-o-Stack__item--flex\@s.sprk-c-Card {
  @media all and (min-width: $sprk-split-breakpoint-s) {
    flex: 0 1 $sprk-card-max-width;
    min-width: 0%;
  }
}

.sprk-o-Stack__item.sprk-o-Stack__item--flex\@m.sprk-c-Card {
  @media all and (min-width: $sprk-split-breakpoint-m) {
    flex: 0 1 $sprk-card-max-width;
    min-width: 0%;
  }
}

.sprk-o-Stack__item.sprk-o-Stack__item--flex\@l.sprk-c-Card {
  @media all and (min-width: $sprk-split-breakpoint-l) {
    flex: 0 1 $sprk-card-max-width;
    min-width: 0%;
  }
}

.sprk-o-Stack__item.sprk-o-Stack__item--flex\@xl.sprk-c-Card {
  @media all and (min-width: $sprk-split-breakpoint-xl) {
    flex: 0 1 $sprk-card-max-width;
    min-width: 0%;
  }
}
