@import "./global/variables.scss";
@import "./global/mixins";

.progress-container {
  min-height: 40px;
  margin-right: auto;
  margin-left: auto;
}

.progress-stages {
  @include clearfix;
  position: relative;
  padding: 0;
  margin-left: 30px;
  list-style: none;

  label {
    position: absolute;
    bottom: -25px;
    left: -33px;
    width: 80px;
    font-size: 12px;
    text-align: center;
  }

  li {
    position: relative;
    float: left;
    width: 16px;
    height: 16px;
    margin-left: 80px;
    color: $slate-80;
    background-color: transparent;
    border: 1px solid $slate-80;
    border-radius: 50%;
    opacity: 0.6;

    &::after {
      display: block;
      width: 75px;
      margin-top: 6px;
      margin-left: 17px;
      border-bottom: 1px solid $slate-80;
      content: "";
    }

    &::before {
      position: absolute;
      width: 14px;
      padding-top: 3px;
      font-size: 9px;
      line-height: 9px;
      text-align: center;
    }

    &:nth-child(1)::before {
      content: "1";
    }

    &:nth-child(2)::before {
      content: "2";
    }

    &:nth-child(3)::before {
      content: "3";
    }

    &:nth-child(4)::before {
      content: "4";
    }

    &:nth-child(5)::before {
      content: "5";
    }

    &:nth-child(6)::before {
      content: "6";
    }

    &:nth-child(7)::before {
      content: "7";
    }

    &:nth-child(8)::before {
      content: "8";
    }

    &:nth-child(9)::before {
      content: "9";
    }

    &:first-child {
      margin-left: 5px;
    }

    &:last-child::after {
      display: none;
    }

    &.is-selected,
    &.is-done,
    &.selected,
    &.done {
      background-color: $slate-80;
      opacity: 1;
    }

    &.is-selected::before,
    &.is-done::before,
    &.selected::before,
    &.done::before {
      color: $white;
    }

    &.is-selected label,
    &.selected label {
      font-weight: 600;
    }

    &.is-done::before,
    &.done::before {
      font-family: "styleguideicons";
      font-size: 6px;
      content: $icon-check;
      speak: none;
    }
  }
}

.progress-container.is-vertical,
.progress-container.vertical {
  .progress-stages {
    margin-left: 0;
  }

  .progress-stages li {
    float: none;
    margin-bottom: 40px;
    margin-left: 0;

    &::after {
      width: 0;
      height: 36px;
      margin-top: 17px;
      margin-left: 6px;
      border-bottom: 0;
      border-left: 1px solid $slate-80;
    }

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

  label {
    top: 2px;
    left: 20px;
    width: 120px;
    line-height: 12px;
    text-align: left;
  }
}
