@color-success: #2ca471;
@color-warning: #e37319;
@color-error: #d54a42;
@color-processing: #16c0ff;
@color-processed: #385aff;
@color-disabled: rgba(51, 51, 51, 0.5);

.@{prefixCls}-state {
  display: inline-flex;
  align-items: center;
  font-size: 14px;

  &-shape {
    &-default {
      position: relative;
      padding-left: 12px;

      &::before {
        position: absolute;
        top: 50%;
        left: 0;
        display: block;
        width: 4px;
        height: 4px;
        margin-top: -2px;
        border-radius: 2px;
        content: '';
      }
    }

    &-order {
      position: relative;
      padding: 0 5px;

      & > span {
        z-index: 2;
      }

      &::before {
        position: absolute;
        top: 50%;
        right: 0;
        left: 0;
        z-index: 1;
        display: block;
        height: 12px;
        margin-top: -6px;
        content: '';
      }
    }
  }

  .defaultShapeColor(@color) {
    color: @color;

    &::before {
      background-color: @color;
    }
  }

  .orderShapeColor(@color) {
    color: @color;

    &::before {
      background-color: fade(@color, 5);
    }
  }

  &-type-default&-shape-default {
    &::before {
      background-color: #c0c0c0;
    }
  }

  &-type-success&-shape-default {
    .defaultShapeColor(@color-success);
  }

  &-type-processing&-shape-default {
    .defaultShapeColor(@color-processing);
  }

  &-type-processed&-shape-default {
    .defaultShapeColor(@color-processed);
  }

  &-type-warning&-shape-default {
    .defaultShapeColor(@color-warning);
  }

  &-type-error&-shape-default {
    .defaultShapeColor(@color-error);
  }

  &-type-disabled&-shape-default {
    .defaultShapeColor(@color-disabled);
  }

  &-type-default&-shape-order {
    &::before {
      background-color: #fafafa;
    }
  }

  &-type-success&-shape-order {
    .orderShapeColor(@color-success);
  }

  &-type-processing&-shape-order {
    .orderShapeColor(@color-processing);
  }

  &-type-processed&-shape-order {
    .orderShapeColor(@color-processed);
  }

  &-type-warning&-shape-order {
    .orderShapeColor(@color-warning);
  }

  &-type-error&-shape-order {
    .orderShapeColor(@color-error);
  }

  &-type-disabled&-shape-order {
    .orderShapeColor(@color-disabled);
  }

  &-type-success&-shape-text {
    color: @color-success;
  }

  &-type-processing&-shape-text {
    color: @color-processing;
  }

  &-type-processed&-shape-text {
    color: @color-processed;
  }

  &-type-warning&-shape-text {
    color: @color-warning;
  }

  &-type-error&-shape-text {
    color: @color-error;
  }

  &-type-disabled&-shape-text {
    color: @color-disabled;
  }
}
