//
// List Group Mixins
// --------------------------------------------------

@mixin list-group-lite() {
  .list-group-item,
  a.list-group-item,
  button.list-group-item {
    @include themes(color, color-new-heading);

    &:hover {
      @include themes(background-color, color-new-bg);
    }

    &.active,
    &:focus {
      $border-radius: $border-radius-base * 2.5;

      position: relative;

      @include themes(color, color-new-heading);
      @include themes(background-color, color-new-bg);

      &:before {
        content: "";
        position: absolute;
        display: block;
        top: 0;
        left: 0;
        bottom: 0;
        width: $panel-bordered-border-height;
        background-color: $brand-primary;

        @include border-radius(0 $border-radius $border-radius 0);
      }

      &,
      .list-group-item-icon {
        @include themes(color, color-new-heading);
      }
    }
  }
}

@mixin list-group-transparent() {
  .list-group-item {
    background-color: transparent;
    border-width: 0;

    &:first-child {
      @include border-top-radius(0);
    }

    &:last-child {
      @include border-bottom-radius(0);
    }

    &:hover,
    &:focus {
      border-width: 0;
    }
  }
}

@mixin list-group-item-variant($state, $background, $color) {
  .list-group-item-#{$state} {
    color: $color;
    background-color: $background;
  }

  a.list-group-item-#{$state},
  button.list-group-item-#{$state} {
    color: $color;

    .list-group-item-heading {
      color: inherit;
    }

    &:hover,
    &:focus {
      color: $color;
      background-color: darken($background, 5%);
    }

    &.active,
    &.active:hover,
    &.active:focus {
      color: $color-white;
      background-color: $color;
      border-color: $color;
    }
  }
}
