$card-title-height: 44px;
$card-header-font-size: 16px;

.card {
  @include scrollbars(.4em, rgba(0, 0, 0, 0.6), rgba(255, 255, 255, 0.7));
  color: $default-text;
  background-color: $default;
  border: none;
  border-radius: 5px;
  position: relative;
  margin-bottom: 24px;
  box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.25);
  &.animated {
    animation-duration: 0.5s;
  }
  &.small-card {
    height: $small-card-height;
  }
  &.xsmall-card {
    height: $xsmall-card-height;
  }
  &.medium-card {
    height: $medium-card-height;
  }
  &.xmedium-card {
    height: $extra-medium-card-height;
  }
  &.large-card {
    height: $large-card-height;
  }
  &.viewport100 {
    height: calc(100vh - 218px);
  }

  &.with-scroll {
    .card-body {
      height: calc(100% - #{$card-title-height});
      overflow-y: auto;
    }
  }
}

.card.card-blur {
  $blurredBgUrl: $images-root + 'blur-bg-blurred.jpg';
  background: url($blurredBgUrl);
  transition: none;
  background-attachment: fixed;

  .card-header, .card-footer {
    background: transparent;
  }
}

.card {
  > .card-body {
    padding: 15px 22px;
    height: 100%;
  }
  > .card-header {
    color: $default-text;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  > .card-footer {
    color: $default-text;
  }
}

.card-header, .card-footer {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.12);
  height: $card-title-height;
  font-size: $card-header-font-size;
  $vertical-padding: ($card-title-height - $card-header-font-size) / 2;
  padding: $vertical-padding 22px;
  background-color: $default;
}

.card-title {
  font-weight: $font-normal;
  font-size: $card-header-font-size;
  text-transform: uppercase;
  opacity: 0.9;
}


.card-primary {
  > .card-header {
    background-color: $primary-bg;
    border-color: $primary-bg;
  }
}

.card-success {
  > .card-header {
    background-color: $success-bg;
    border-color: $success-bg;
  }
}

.card-info {
  > .card-header {
    background-color: $info-bg;
    border-color: $info-bg;
  }
}

.card-warning {
  > .card-header {
    background-color: $warning-bg;
    border-color: $warning-bg;
  }
}

.card-danger {
  > .card-header {
    background-color: $danger-bg;
    border-color: $danger-bg;
  }
}

//.bootstrap-card {
//  background-color: $bootstrap-card-bg;
//  .card-body{
//    color: $bootstrap-card-text;
//  }
//}

.accordion-card.card {
  &.card-primary,
  &.card-success,
  &.card-info,
  &.card-warning,
  &.card-danger {
    .card-header {
      p, div, span {
        color: rgba(255, 255, 255, 0.8);
      }
    }
  }
}

.card-group .card.accordion-card {
  .card-header {
    border-bottom: 0;
  }
}

.card-group .card {
  .card-header {
    border-bottom: 1px solid #ddd;
  }
}

.p-with-code {
  line-height: 1.5em;
}

.contextual-example-card {
  height: 120px;
}

.footer-card {
  height: 142px;
}

.light-text {
  font-weight: $font-light;
}
