// ------------------- //
// LISTGROUP
// new with wrapper
// .listgroup-wrapper
//    .listgroup-intro
//    .listgroup-content /.list-group
//    .listgroup-footer
//    .listgroup-color

// -- to set page color -- //
.listgroup-color {
  color: @hwk-blue-light;
}

// -- DEFAULT -- //
.listgroup-wrapper {
  background-color: #fff;
  box-shadow: 1px 1px 6px rgba(127, 127, 127, 0.3);
  margin-left: -@listgroup-padding-x;
  margin-right: -@listgroup-padding-x;
  margin-bottom: (@grid-gutter-width - @listgroup-padding-x);

  @media (min-width: @screen-xl-min) {
    margin-left: -@listgroup-padding-x-xl;
    margin-right: -@listgroup-padding-x-xl;
  }

  // if NO INTRO
  /*& > div.list-group:first-child,
  & > div.listgroup-content:first-child {
    .list-group-item:first-child {
      border-top: none;
    }
  }*/

  // if blue box
  &.color-hwk-blue-light-25 {
    .listgroup-text {
      p, span,
      &::after, &::before {
        color: @hwk-blue-dark;
      }
    }
  }
}

// if .row.d-flex.d-flex-wrapper
.row.d-flex.d-flex-wrap,
.row.stretch {
  .listgroup-wrapper {
    //margin-bottom not working since height : 100% => set height instead
    height: calc(100% - ((@grid-gutter-width-half - @listgroup-padding-x) * 2)); // docu: needs row to have .d-flex.d-flex-wrap
    @media (min-width: @screen-xl-min) {
      height: calc(100% - ((@grid-gutter-width-half-xl - @listgroup-padding-x-xl) * 2));
    }
    //height: 100%; // @todo: docu: needs row to have .d-flex.d-flex-wrap
    display: flex;
    flex-direction: column;
  }
  .space-around {
    &.listgroup-wrapper, .listgroup-wrapper {
      justify-content: space-around;
    }
  }
}

body, .content {
  .listgroup-intro {
    h3, .h3, h4, .h4 {
      font-size: @font-size-base-p !important;
      color: @hwk-blue-light;
      padding: 12px @listgroup-padding-x 0 @listgroup-padding-x;
      @media (min-width: @screen-xl-min) {
        padding: 12px @listgroup-padding-x-xl 0 @listgroup-padding-x-xl;
      }
    }
  }
}
.listgroup-intro {
  figure {
    max-height: @listgroup-image-height;
    overflow: hidden;
  }
  // @todo: figcaption styling
  
  border-bottom: 1px solid @listgroup-border-color;
  margin-bottom: 0;
}

.list-group, listgroup-content {
  margin-bottom: 0;
  .list-group-item {
    display: flex;
    padding: @listgroup-padding-y 0;
    background-image: none;
    
    & > .listgroup-image,
    & > .listgroup-text {
      float: none;
    }

    &:active,
    &:focus,
    &:hover {
      background-color: @listgroup-hover-color;
    }
    p {
      font-weight: @font-weight-bold;
    }
    .listgroup-text {
      p, a {
        &:not(.h2):not(.h3):not(.h4):not(.h5):not(.h6) {
          font-size: @font-size-small;
          .glyphicon {
            top: 0;
            line-height: 1;
          }
        }
        font-weight: @font-weight-bold;
        padding: 0px 0px 0px;
        line-height: 1.4;
        hyphens: auto;
      }
    }

    // image / info
    .listgroup-image, .listgroup-info {
      @media (min-width: @screen-xl-min) {
        margin: 0 @listgroup-padding-x-xl;
      }
      width: 80px;
      min-width: 80px;
      margin: 0 0 0 @listgroup-padding-x;
      padding-right: @grid-gutter-width-half;
    }

    // new image (no padding left / slightly bigger)
    .listgroup-image-blog {

      &.listgroup-image,
      .listgroup-image {
        margin-left: 0;
        width: 80px + @listgroup-padding-x;
      }
    }

    // add borders on intro/footer instead
    &:first-child {
      border-top: none;
    }
    &:last-child {
      border-bottom: none;
    }
  }
}

.listgroup-footer {
  border-top: 1px solid @listgroup-border-color;
  margin-top: auto;
  & > p, & > a {
    padding: 8px @listgroup-padding-x;
    @media (min-width: @screen-xl-min) {
      padding: 8px @listgroup-padding-x-xl;
    }
  }
  p, span, i, a {
    font-size: 14px;
  }
  a {
    display: block;
    &:active,
    &:focus,
    &:hover {
      background-color: @listgroup-hover-color;
    }
  }

  .glyphicon {
    font-size: 16px;
    width: 26px;
    top: 0;
  }
}

// -- WITH ARROWS -- //
.listgroup-arrow:not(.listgroup-arrow-right) {
  .list-group-item {
    .listgroup-text {
      padding-left: @listgroup-padding-x + 22;
      @media (min-width: @screen-xl-min) {
        padding-left: @listgroup-padding-x-xl  + 22;
      }
      &::before {
        content: "\E072";
        position: absolute;
        font-family: @icon-font-name;
        top: @listgroup-padding-y + 1;
        left: @listgroup-padding-x;
        @media (min-width: @screen-xl-min) {
          left: @listgroup-padding-x-xl;
        }
      }
    }
  }
}
.listgroup-arrow-right {
  .list-group-item {
    .listgroup-text {
      padding-right: @listgroup-padding-x + 22;
      @media (min-width: @screen-xl-min) {
        padding-right: @listgroup-padding-x-xl  + 22;
      }
      &::after {
        content: "\E072";
        position: absolute;
        font-family: @icon-font-name;
        top: @listgroup-padding-y + 1;
        right: @listgroup-padding-x;
        @media (min-width: @screen-xl-min) {
          right: @listgroup-padding-x-xl;
        }
      }
    }
  }
}

// ----------------------- //
// LIST with IMAGES
// LIST with TEXT INFO
//
.listgroup-text {
  padding: 0 @listgroup-padding-x;
  @media (min-width: @screen-xl-min) {
    padding: 0 @listgroup-padding-x-xl;
  }
  //float: none !important;

  .col {
    @media (min-width: @screen-xl-min) {
      padding-left: @grid-gutter-width-half-xl;
      padding-right: @grid-gutter-width-half-xl;
    }
  }
}

.listgroup-image, .listgroup-info {
    & + .listgroup-text {
    padding-left: 0;
  }
}


// calendar, info text
.list-group-item {
  .listgroup-info {
    p {
      font-size: 36px;
      color: @hwk-blue-light;
      font-weight: @font-weight-bold;
      line-height: 1;
      margin-bottom: 0;
      padding-bottom: 0;
    }
    .small {
      display: block;
      font-size: 12px;
    }
  }
}

// ----------------------- //
// SPECIAL LIST with ICONS
// hwk-icon-menu
//
@media (max-width: @screen-xs-max) {
  .col.hwk-icon-menu {
    order: -1;
    .listgroup-wrapper {
      background-color: transparent !important;
      box-shadow: none;
      .list-group {
        display: flex;
        justify-content: space-around;
        padding-bottom: 10px;
        .list-group-item {
          border: none;
          padding: 10px 0;
        }
        .listgroup-text {
          padding: 0 10px;
          p {

            span.glyphicon {
              font-size: 22px;
              display: block;
              margin-bottom: 5px;
              width: 100%;
              margin-bottom: 7px;
            }
            text-align: center;
            font-size: 10px !important;
          }
          // hide arrows
          &::before,
          &::after {
            display: none;
          }
        }
      }
    }
  }
}
