@import 'foundation/spacing';
@import 'shared/typography';

$number-size: 1.2rem;
$bullet-size: 1.8rem;
$font-color: #616161;
$border-color: #dbdbdb;


@mixin fontStyle($fontSize, $fontWeight) {
  font-size: $fontSize;
  font-weight: $fontWeight;
  font-stretch: normal;
  font-style: normal;
  line-height: 1.23;
  letter-spacing: normal;
}

.list {
  list-style: none;
  margin-top: 0;
  padding-left: 0;

  + .list {
    margin-top: spacing();
  }

  ul {
    padding-left: spacing(loose);
  }
}

.typeBullet {
  > .item::before {
    content: '\2022'; // bullet
    font-size: $bullet-size;
  }
}

.typeNumber {
  counter-reset: ordered-counter;

  > .item::before {
    @include text-emphasis-strong;
    content: counter(ordered-counter, decimal) '.';
    counter-increment: ordered-counter;
    font-size: $number-size;
    vertical-align: top;
  }
}

.list-divider {
  margin: 0;
  + div {
    padding: 1.6rem 2.4rem;
    margin: 0 auto;
  }
}

.list-divider > li:nth-child(n+2) {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
}

.list-divider > li {
   padding: 1.5rem;
   margin: 0;
   span {
    &:first-child {
      @include fontStyle(1.3rem, normal);
      color: $font-color;
      min-width: 4.5rem;
      display: inline-block;
    }
    &:nth-child(2) {
      @include fontStyle(1.4rem, normal);
      margin-left: 2.5rem;
    }
  }
   &:last-child {
    border-bottom: 1px solid $border-color;
  }
}

.list-striped > li {
  padding: 1rem;
}
.list-striped > li:nth-of-type(odd) {
  border-top: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
}
.list-striped > li:nth-of-type(odd) {
  background: #f8f8f8;
}
.list-striped > li:nth-child(n+2) {
  margin-top: 0;
}

.item {
  position: relative;
  padding-left: spacing();

  &:last-child {
    margin-bottom: 0;
  }

  &::before {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
  }

  .naked {
    list-style-type: none;
  }

  .list:first-child {
    margin-top: spacing(tighter);
  }
}
