@import "settings.fonts";
@import "settings.colors";

@import "mixins/settings.fonts";
@import "mixins/tools.mixins";
@import "mixins/components.article-list";

.c-article-list__heading {
  @include font-gm-sans-bold;
  @include article-list-heading;
}

//special heading-link (exist only for thumbnail)
.c-article-list__label {
  @include font-gm-sans-bold;
  @include article-list-heading;
  display: block;
  text-decoration: none;

  &:hover span, &:focus span {
    text-decoration: underline;
  }

  .c-article-list__label-link__icon {
    width: rem(10);
    height: rem(10);
    fill: $color-grey-300;
    display: inline-block;
  }
}

.c-article-list__content {
  margin: 0 0 rem(15) 0;
  padding: 0;
  list-style: none;
}

.c-article-list__item-content {
  padding-top: rem(15);
  padding-bottom: rem(15);
  border-bottom: 1px solid $color-stone-200;
  position: relative;
  .c-article-list__item:last-child & {
    border-bottom: none;
  }
}

.c-article-list__link {
  @include font-pratt;
  display: block;
  font-size: rem(17);
  line-height: line-height(17, 21);
  color: $color-grey-900;
  text-decoration: none;
  &:focus,
  &:hover {
    // Prevent underline from appearing below icon
    text-decoration: none;
    .c-article-list__link-text {
      text-decoration: underline;
    }
  }
}

.c-article-list__icon-wrapper {
  margin-right: rem(2);
}

// Ordered
// See: http://www.456bereastreet.com/archive/201105/styling_ordered_list_numbers/
.c-article-list__content--ordered {
  counter-reset: party;
  .c-article-list__item-content::before {
    @include font-pratt;
    content: counter(party);
    counter-increment: party;
    position: absolute;
    top: rem(14);
    left: 0;
    font-size: rem(38);
    line-height: line-height(38, 38);
    color: $color-grey-900;
  }
  .c-article-list__link {
    margin-left: rem(35);
  }
  // Extra margin for double-digit numbered list items
  .c-article-list__item:nth-of-type(n+10) .c-article-list__link {
    margin-left: rem(50);
  }
}

// Thumbnail
.c-article-list__content--thumbnail {
  .c-article-list__link {
    display: flex;
    align-items: flex-start;
  }
  .c-article-list__item-content {
    padding-top: rem(10);
    padding-bottom: rem(10);
  }
  .c-article-list__img {
    width: 100%;
    height: auto;
    display: block;
  }
  //special margins for sponsored for this feature
  .u-always-bleed {
    margin-left: rem(-10);
    margin-right: rem(-10);
  }
  .c-article-list__item--sponsored {
    padding-left: rem(10);
    padding-right: rem(10);
  }
}

.c-article-list__icon-text-wrapper {
  flex: 1;
}

// Sponsored
.c-article-list__item--sponsored {
  padding-left: rem(20);
  padding-right: rem(20);
  background-color: $color-blue-steel;
  .c-article-list__link-text {
    font-family: $font-sans-stack;
    font-weight: bold;
    font-size: rem(15);
    line-height: rem(18);
  }
}

//Label for sponsored content only
.c-article-list__link-label {
  font-family: $font-sans-stack;
  font-size: rem(11);
  padding-bottom: rem(5);
  letter-spacing: rem(1);
  color: $color-grey-660;
  text-transform: uppercase;
  display: block;
  line-height: rem(18);
}

.c-article-list__link-text {
  display: block;
}
