@charset "UTF-8";
@import "./common/var.css";

@component-namespace el {
  @b step {
    position: relative;
    vertical-align: top;

    @when horizontal {
      display: inline-block;
    }

    @when vertical {
      & .el-step__head,
      & .el-step__main {
        display: inline-block;
      }

      & .el-step__main {
        padding-left: 10px;
      }
    }

    @e line {
      display: inline-block;
      position: absolute;
      border-color: inherit;
      background-color: var(--color-extra-light-silver);

      @when icon {
        @when horizontal {
          right: 4px;
        }
      }

      @when horizontal {
        top: 15px;
        height: 2px;
        left: 32px;
        right: 0;
      }

      @when vertical {
        width: 2px;
        box-sizing: border-box;
        top: 32px;
        bottom: 0;
        left: 15px;
      }
    }

    @e line-inner {
      display: block;
      border-width: 1px;
      border-style: solid;
      border-color: inherit;
      transition: all 150ms;
      width: 0;
      height: 0;
    }

    @e icon {
      display: block;
      line-height: 28px;

      > * {
        line-height: inherit;
        vertical-align: middle;
      }
    }

    @e head {
      circle: 28px transparent;
      text-align: center;
      line-height: 28px;
      font-size: 28px;
      vertical-align: top;
      transition: all 150ms;

      @when text {
        font-size: 14px;
        border-width: 2px;
        border-style: solid;

        @when process {
          color: var(--color-white);
          background-color: var(--color-extra-light-silver);
          border-color: var(--color-extra-light-silver);
        }

        @when wait {
          color: var(--color-extra-light-silver);
          background-color: var(--color-white);
          border-color: var(--color-extra-light-silver);
        }

        @when success {
          color: var(--color-white);
          background-color: var(--color-success);
          border-color: var(--color-success);
        }

        @when error {
          color: var(--color-white);
          background-color: var(--color-danger);
          border-color: var(--color-danger);
        }

        @when finish {
          color: var(--color-white);
          background-color: var(--color-primary);
          border-color: var(--color-primary);
        }
      }

      @when process {
        color: var(--color-extra-light-silver);
        border-color: var(--color-extra-light-silver);
      }

      @when wait {
        color: var(--color-extra-light-silver);
        border-color: var(--color-extra-light-silver);
      }

      @when success {
        color: var(--color-success);
        border-color: var(--color-success);
      }

      @when error {
        color: var(--color-danger);
        border-color: var(--color-danger);
      }

      @when finish {
        color: var(--color-primary);
        border-color: var(--color-primary);
      }
    }

    @e main {
      white-space: normal;
      padding-right: 10px;
      text-align: left;
    }

    @e title {
      font-size: 14px;
      line-height: 32px;
      display: inline-block;

      @when process {
        font-weight: 700;
        color: var(--color-extra-light-black);
      }

      @when wait {
        font-weight: normal;
        color: var(--color-light-silver);
      }

      @when success {
        font-weight: 700;
        color: var(--color-success);
      }

      @when error {
        font-weight: 700;
        color: var(--color-danger);
      }

      @when finish {
        font-weight: 700;
        color: var(--color-primary);
      }
    }

    @e description {
      font-size: 12px;
      font-weight: normal;
      line-height: 14px;

      @when process {
        color: var(--color-base-silver);
      }

      @when wait {
        color: var(--color-extra-light-silver);
      }

      @when success {
        color: var(--color-success);
      }

      @when error {
        color: var(--color-danger);
      }

      @when finish {
        color: var(--color-primary);
      }
    }
  }
}
