.outside-card-header {
  padding: $card-spacer-y $card-spacer-x;
  margin: 0;

  h1, h2, h3, h4 {
    margin: 0;

    @include font-size($h2-font-size);
  }

  &:first-child {
    padding-top: ($container-padding-x - $card-spacer-x);
  }
}

.card {
  box-shadow: 0 0 4px 0 rgba(0, 0, 0, .14), 0 3px 4px 0 rgba(0, 0, 0, .12), 0 1px 5px 0 rgba(0, 0, 0, .2);

  .card-title {
    font-weight: 400;
    margin-bottom: 0;

    @include font-size($h4-font-size);
  }

  .card-subtitle {
    font-weight: normal;
    margin-bottom: 0;

    @include font-size($h5-font-size);
  }

  .card-body.alert {
    border-left: 0;
    border-right: 0;
    border-top: 0;
    border-radius: 0;
    margin-bottom: 0;

    &:last-of-type {
      border-bottom: 0;
    }
  }

  .card-header,
  .alert {
    &:first-child {
      border-top-left-radius: var(--bs-card-border-radius);
      border-top-right-radius: var(--bs-card-border-radius);
    }

    &:last-child {
      border-bottom-left-radius: var(--bs-card-border-radius);
      border-bottom-right-radius: var(--bs-card-border-radius);
    }
  }

  & > .table:last-child tbody tr:last-child {
    td:first-child {
      border-bottom-left-radius: var(--bs-card-border-radius);
    }

    td:last-child {
      border-bottom-right-radius: var(--bs-card-border-radius);
    }
  }

  & > .list-group-flush > .list-group-item:last-child {
    border-bottom-left-radius: var(--bs-card-border-radius);
    border-bottom-right-radius: var(--bs-card-border-radius);
  }

  .card-body {
    .card-body-flush {
      margin: (0-$card-spacer-y) (0-$card-spacer-x);
    }

    nav.nav-tabs {
      background: var(--bs-tertiary-bg);

      margin: (0-$card-spacer-y) (0-$card-spacer-x) 0 (0-$card-spacer-x);
      padding: $card-spacer-y $card-spacer-x 0 $card-spacer-x;
    }
  }
}

.row-of-cards {
  & .card {
    margin-bottom: 1.5rem !important;
  }
}
