/*!*
 * @package   ats
 * @copyright Copyright (c)2011-2026 Nicholas K. Dionysopoulos / Akeeba Ltd
 * @license   GNU General Public License version 3, or later
 */

@use '../variables' as *;

@mixin cardHeader($class, $bgColor, $textColor) {
  &.#{$class} {
    background-color: $bgColor;
    color: $textColor;

    a {
      color: $textColor;
    }
  }
}

@mixin ats_cards
{
  div.card {
    padding: 0;
    border: thin solid $light-grey;
    border-radius: $border-radius;

    h3.card-header {
      background-color: $light-grey;
      color: $black;
      margin: 0;
      padding: .25em;
      border-bottom: thin solid $light-grey;
      border-radius: $border-radius $border-radius 0 0;

      a {
        color: $black;
      }

      @include cardHeader('bg-primary', $teal, $white);
      @include cardHeader('bg-secondary', $light-grey, $grey);
      @include cardHeader('bg-danger', $red, $white);
      @include cardHeader('bg-warning', $orange, $black);
      @include cardHeader('bg-success', $green, $white);
      @include cardHeader('bg-dark', $grey, $white);
    }

    .card-body {
      padding: .5em;
    }
  }
}
