.mat-card{
  border-radius: 0 !important;
  border: 1px solid $tertiary;
  border-bottom-width: 6px;
  box-shadow: none;
  padding: 1rem !important;
  margin-bottom: 1rem;

  &.card--borderless {
    border: none;
    padding: 0 !important;

    & .mat-card-title a,
    & .mat-card-title a:link,
    & .mat-card-title a:visited {
      color: $black-heading;
      font-weight: $black-weight;
      border-bottom: none;
      display: flex;
      align-items: center;
    }

    & .mat-card-header-text {
      width:100%;
    }


    & .mat-card-content p {
      margin-bottom: 1rem !important;
    }
  }

  & .mat-card-header .mat-card-title {
    line-height: 132%;
  }

  & .mat-card-content {
    color: $grey-6;
  }
}

.mat-card>.mat-card-actions:last-child {
  margin-bottom: 0 !important;
}
.mat-card-actions {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding : 0 !important;

  & .mat-button-base:first-child {
    margin-right: 1rem !important;
  }

  & .mat-button-base:not(:first-child) {
    margin-top: 0.5rem !important;
  }

  & .mat-button-base:last-child {
    margin-right: 0 !important;
  }

  & .mat-flat-button,
  & .mat-stroked-button,
  & .mat-button,
  & .mat-raised-button{
    padding: 0.25rem 0.5rem !important;
  }

  & .mat-button, & .mat-raised-button, & .mat-stroked-button {
    margin: 0 !important;
  }
}

.mat-card-header-text {
  margin: 0 ! important;
}


a:hover .mat-card {
  border-bottom-color: $ochre;

  & .mat-card-title {
    color: $ochre;
  }

  & .mat-card-content {
    color: $grey-6;
  }
}

a:focus .mat-card, a:active .mat-card {
  outline: 2px dotted $ochre-focus;
}

a .mat-card, a:link .mat-card, a:visited .mat-card {
  color: $black;

  & .mat-card-subtitle {
    font-weight: $regular-weight;
  }

  & p {
    font-weight: $regular-weight;
  }
}

@media print, (min-width: 992px) {
  .mat-card {
    margin-bottom: 0;
  }
}
