/* ------------------------------------------------ */
/* ############### 4.6 jQuery Steps ############### */
/* ------------------------------------------------ */

/***** DEFAULT STYLE WIZARD *****/
.wizard {
  > .steps {
    margin-bottom: 10px;

    > ul {
      padding: 0;
      margin-bottom: 0;
      display: flex;

      li {
        float: none;
        display: block;
        width: auto;

        .current-info { display: none; }

        .title {
          margin-left: 5px;
          white-space: nowrap;
          @include transition($transition-base);

          @include media-breakpoint-up(sm) {
            display: none;
            margin-left: 10px;
          }

          @include media-breakpoint-up(md) { display: inline-block; }
        }

        + li {
          margin-left: 5px;
          @include media-breakpoint-up(lg) { margin-left: 10px; }
        }
      }
    }

    a,
    a:hover,
    a:active {
      font-weight: 500;
      font-size: 14px;
      display: flex;
      justify-content: center;
      align-items: center;
      background-color: $gray-200;
      padding: 12px 15px;
      @include border-radius();

      @include media-breakpoint-up(xl) {
        justify-content: flex-start;
      }

      .number {
        flex-shrink: 0;
        font-weight: 700;
        font-family: $font-family-sans-serif;
        display: block;
        text-align: center;
        line-height: 1.8;
        width: 30px;
        height: 30px;
        border: 2px solid $gray-500;
        @include border-radius(100%);
        @include transition($transition-base);

        @include media-breakpoint-up(sm) {
          font-size: 13px;
          font-weight: 700;
          line-height: 1.9;
          width: 30px;
          height: 30px;
        }
      }
    }

    .disabled {
      display: none;
      @include media-breakpoint-up(sm) { display: block; }

      a,
      a:hover,
      a:active { color: $gray-500; }
    }

    .current a {
      &,&:hover,&:active {
        background-color: $cyan;
        color: #fff;

        .title {
          display: none;
          @include media-breakpoint-up(sm) { display: inline-block; }
        }
        
        .number { border-color: #fff; }
      }
    }

    .done a {
      &,&:hover,&:active {
        background-color: $teal;
        color: #fff;

        .title {
          display: none;
          @include media-breakpoint-up(md) { display: inline-block; }
        }
        .number { border-color: #fff; }
      }
    }
  }

  > .content {
    background-color: $gray-200;
    min-height: 150px;
    padding: 20px;
    @include border-radius();

    @include media-breakpoint-up(md) { padding: 25px; }
    @include media-breakpoint-up(lg) { padding: 30px; }

    > .title {
      font-size: 18px;
      color: $gray-900;
      font-weight: 700;
      margin-bottom: 5px;
      display: none;

      &.current { display: block; }
    }

    > .body {
      float: none;
      position: static;
      width: auto;
      height: auto;

      input.parsley-error {
        border-color: theme-color('danger');

        + ul { list-style: none !important; }
      }
    }
  }

  > .actions {
    margin-top: 10px;

    > ul {
      margin: 0;
      padding: 0;
      list-style: none;
      display: flex;
      justify-content: space-between;

      > li:last-child a { background-color: $teal; }
    }

    a,
    a:hover,
    a:active {
      display: block;
      background-color: $cyan;
      padding: 9px 25px;
      line-height: 1.573;
      color: #fff;
      @include border-radius();
    }

    .disabled {
      a,
      a:hover,
      a:active { background-color: $gray-500; }
    }
  }

  &.vertical {
    > .steps {
      padding-right: 10px;

      @include media-breakpoint-up(sm) {
        float: left;
        width: 20%;
      }

      @include media-breakpoint-up(md) { width: 15%; }
      @include media-breakpoint-up(lg) { width: 30%; }

      ul {
        @include media-breakpoint-up(sm) { flex-direction: column; }

        li {
          + li {
            margin-left: 10px;

            @include media-breakpoint-up(sm) {
              margin-top: 10px;
              margin-left: 0;
            }
          }

          .title {
            display: none;
            @include media-breakpoint-up(lg) {
              display: block;
            }
          }
        }
      }

      a {
        @include media-breakpoint-up(lg) { justify-content: flex-start; }
      }

      .current a {
          .title {
            display: inline-block;
            @include media-breakpoint-up(sm) { display: none; }
            @include media-breakpoint-up(lg) { display: inline-block; }
          }
      }
    }

    > .content {
      margin: 0;
      padding: 20px;

      @include media-breakpoint-up(sm) {
        border-top-width: 0;
        border-bottom-width: 0;
        width: 80%;
        float: right;
      }

      @include media-breakpoint-up(md) { width: 85%; }

      @include media-breakpoint-up(lg) {
        width: 70%;
        padding: 25px;
      }
    }

    > .actions {

      @include media-breakpoint-up(sm) {
        width: 80%;
        float: right;
      }

      @include media-breakpoint-up(md) { width: 85%; }
      @include media-breakpoint-up(lg) { width: 70%; }

      ul {
        float: none;
        margin: 0;
        padding: 0;
      }
    }
  }
}

/****** EQUAL COLUMN WIDTH STEP INDICATOR *****/
.step-equal-width {
  > .steps {
    > ul {
      display: flex;

      > li {
        flex: 1;
        width: auto;
        float: none;
      }
    }
  }
  > .content {}
  > .actions {}
}

/***** CUSTOM STYLES *****/
.wizard-style-1 {
  > .steps {
    > ul {
      a,a:hover,a:active {
        padding: 0;
        height: 50px;

        .number {
          width: 50px;
          height: 100%;
          border: 0;
          font-size: 18px;
          font-weight: bold;
          color: $gray-600;
          background-color: $gray-300;
          @include border-left-radius($border-radius);
          @include border-right-radius(0);
          display: flex;
          align-items: center;
          justify-content: center;
        }

        .title {
          margin-right: 20px;
          margin-left: 20px;
        }
      }

      .current a {
        &,&:hover,&:active {
          .number {
            background-color: darken($cyan, 5%);
            color: #fff;
          }
        }
      }

      .done a {
        &,&:hover,&:active {
          .number {
            background-color: darken($teal, 5%);
            color: #fff;
          }
        }
      }
    }
  }
}

.wizard-style-2 {
  > .steps {
    > ul {
      a,a:hover,a:active {
        padding: 0;
        height: 50px;
        @include border-radius(50px);

        .number {
          width: 50px;
          height: 100%;
          border: 2px solid $gray-200;
          font-size: 18px;
          font-weight: bold;
          color: $gray-600;
          background-color: #fff;
          display: flex;
          align-items: center;
          justify-content: center;
        }

        .title { margin-right: 20px; }
      }

      .current a {
        &,&:hover,&:active {
          .number {
            border-color: $cyan;
            color: $cyan;
          }
        }
      }

      .done a {
        &,&:hover,&:active {
          .number {
            border-color: $teal;
            color: $teal;
          }
        }
      }
    }
  }
}

.wizard-style-3 {
  > .steps {
    > ul {
      a,a:hover,a:active {
        padding: 0;
        height: 50px;
        @include border-radius(0);
        background-color: transparent;

        .number {
          width: 50px;
          height: 100%;
          border-width: 0;
          background-color: $gray-200;
          font-weight: bold;
          font-size: 18px;
          color: $gray-500;
          display: flex;
          align-items: center;
          justify-content: center;
        }

        .title { margin-right: 20px; }
      }

      .current a {
        &,&:hover,&:active {
          color: $cyan;
          background-color: transparent;

          .number {
            background-color: $cyan;
            color: #fff;
          }
        }
      }

      .done a {
        &,&:hover,&:active {
          background-color: transparent;
          color: $teal;

          .number {
            background-color: $teal;
            color: #fff;
          }
        }
      }
    }
  }
}


/***** RTL SUPPORT *****/
.rtl {
  .wizard {
    > .steps > ul > li {
      .title {
        margin-left: 0;
        margin-right: 5px;
        @include media-breakpoint-up(sm) { margin-right: 10px; }
      }

      + li {
        margin-left: 0;
        margin-right: 5px;

        @include media-breakpoint-up(lg) { margin-right: 10px; }
      }
    }

    &.vertical > .steps > ul > li + li {
      margin-right: 0;
    }
  }

  .wizard-style-1,
  .wizard-style-2 {
    > .steps > ul {
      a { padding-left: 15px; }
    }
  }

  .wizard-style-1 > .steps > ul {
    .number {
      @include border-left-radius(0);
      @include border-right-radius($border-radius);
    }
  }
}
