@use "variables";

// Steps
.step {
  display: flex;
  flex-wrap: nowrap;
  list-style: none;
  margin: variables.$unit-1 0;
  width: 100%;

  .step-item {
    flex: 1 1 0;
    margin-top: 0;
    min-height: 1rem;
    text-align: center;
    position: relative;

    &:not(:first-child)::before {
      background: variables.$primary-color;
      content: "";
      height: 2px;
      left: -50%;
      position: absolute;
      top: 9px;
      width: 100%;
    }

    a {
      color: variables.$primary-color;
      display: inline-block;
      padding: 20px 10px 0;
      text-decoration: none;

      &::before {
        background: variables.$primary-color;
        border: variables.$border-width-lg solid variables.$light-color;
        border-radius: 50%;
        content: "";
        display: block;
        height: variables.$unit-3;
        left: 50%;
        position: absolute;
        top: variables.$unit-1;
        transform: translateX(-50%);
        width: variables.$unit-3;
        z-index: variables.$zindex-0;
      }
    }

    &.active {
      a {
        &::before {
          background: variables.$light-color;
          border: variables.$border-width-lg solid variables.$primary-color;
        }
      }

      & ~ .step-item {
        &::before {
          background: variables.$border-color;
        }

        a {
          color: variables.$gray-color;

          &::before {
            background: variables.$border-color;
          }
        }
      }
    }
  }
}
