//============================================================
// Styled Lists
//============================================================
$listCounterName: listCounter;

%list-unstyled {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.#{$prefix}list-bullet-circular {
  @extend %list-unstyled;

  list-style-type: none !important;
  counter-reset: $listCounterName;
  margin-bottom: 2rem;
  margin-top: 2rem;

  > li {
    padding-left: 3rem;
    position: relative;
    min-height: 2rem;
    display: flex;
    // width: 100%;
    align-items: center;
    flex-wrap: wrap;

    > * {
      display: block;
      width: 100%;
    }

    > *:first-child[class*="sf-"] {
      margin-top: 0;
    }

    &:before {
      position: absolute;
    }
  }

  // Create atom classes for changing ordered list starting number
  @for $i from 1 through 20 {
    &.#{$prefix}list-counter-reset-#{$i} {
      counter-reset: $listCounterName $i;
    }
  }
}

ol.#{$prefix}list-bullet-circular {
  > li {
    margin-bottom: 1rem !important;

    &:before {
      counter-increment: $listCounterName;
      content: counter($listCounterName);
      width: 2rem;
      height: 2rem;
      left: 0;
      top: 0;
      text-align: center;
      font-size: 0.875rem;
      font-weight: 600;
      font-family: $theme-font-family;
      background-color: lighten($theme-text-color,75%);
      line-height: 2.3;
      padding: 0;
      border-radius: 10rem;
      color: lighten($theme-text-color,10%);
    }
  }
}

ul.#{$prefix}list-bullet-circular {
  > li {
    $dim: 0.5rem;
    margin-bottom: 0.5rem !important;
    font-family: $theme-font-family;
    &::before {
      content: '';
      width: $dim;
      height: $dim;
      top: 6px;
      left: 0.9rem;
      border-radius: 100%;
      background-color: lighten($theme-text-color,10%);
    }
  }
}

.#{$prefix}list-bullet-circular {
  > li {
    > ol > li:before {
      padding: 5px 8px;
      top: -7px;
    }
    > ul {
      margin-top: 1rem;
      margin-bottom: 1rem;
      > li:before {
        width: 0.4rem;
        height: 0.4rem;
      }
    }
  }
}
