$color-list-group: $color-white !default;
$color-list-group-hover: $color-primary !default;
$border-color-list-group: $color-gray-dark !default;

@mixin list-group-item() {
  @include no-link();
  @include auto-text-color($color-list-group);
  background-color: $color-list-group;
  display: block;
  padding: $padding-vertical $padding-horizontal;
  white-space: nowrap;
  border-bottom: 1px solid $border-color-list-group;
  overflow: hidden;
  text-overflow: ellipsis;
}

@mixin list-group-item-select() {
  background-color: $color-list-group-hover;
  @include auto-text-color($color-list-group-hover);
}

@mixin list-group-item-interactive-select($color-list-group-hover: $color-list-group-hover) {
  background-color: $color-list-group-hover;
  @include auto-text-color($color-list-group-hover);
}

@mixin list-group-item-interactive($color-list-group-hover: $color-list-group-hover) {
  @include list-group-item();
  cursor: pointer;

  &:hover {
    @include list-group-item-interactive-select($color-list-group-hover);
  }

  &:visited:hover {
    @include list-group-item-interactive-select($color-list-group-hover);
  }

}

@mixin list-group() {
  @include list();

  > li {

    &:first-child > a {
      border-top-left-radius: $border-radius-primary;
      border-top-right-radius: $border-radius-primary;
    }

    &:last-child > a {
      border-bottom-left-radius: $border-radius-primary;
      border-bottom-right-radius: $border-radius-primary;
      border-bottom: none;
    }

    > a {
      @include list-group-item();
    }

  }

}

@mixin list-group-interactive() {

  @include list-group();

  > li  {
    > a {
      @include list-group-item-interactive();
    }
  }

}
