@scFormScope: ~'@{prefixCls}Basic-form';
@scFormActionScope: ~'@{prefixCls}FormAction';

.@{scFormScope} {
  .ant-btn {
    & + .ant-btn {
      margin-left: 16px;
    }
  }
  .ant-form-item-explain, .ant-form-item-extra {
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
  }
  .ant-form-item-label {
    // align-self: center;
    white-space: wrap;
    &  > label {
      font-style: normal;
      font-weight: 400;
      color: @text-color;
      height: auto;
      min-height: 32px;
      .text-label {
        display: inline-block;
        line-height: 22px;
        white-space: normal;
        padding: 5px 0 5px 0;
      }
      .scBasic-help {
        i {
          font-size: 15px;
        }
        line-height: 20px;
      }
    }
    .ant-form-item-required {
      .text-label {
        padding-left: 10px;
      }
    }
  }
  .scInput {
    display: block;
    max-width: inherit;
  }
  .scSelect {
    display: block;
    max-width: inherit;
    width: inherit;
  }
  .ant-form-item-label > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {
    color: @error-color;
    margin-right: 2px;
    // margin-top: 4px;
    position: absolute;
    top: 10px;
    left: 0;
    // align-self: baseline;
  }
  .ant-form-item {
    margin-bottom: 16px;
    &.mrgb4 {
      .mrgb4;
    }
  }
  .ant-form-item-has-error {
    margin-bottom: 2px;
    &.mrgb4 {
      margin-bottom: 0;
    }
  }
  .@{scFormActionScope} {
    &-collapse-btn {
      & > i.sc-xiangxia {
        display: inline-block;
        &.up {
          transform: rotate(-180deg);
          transition: 0.2s all;
        }
        &.down {
          transform: rotate(0);
          transition: 0.2s all;
        }
      }
    }
  }
  // &.isRequire:not(.ant-form-vertical):not(.ant-form-inline) {
  //   .ant-form-item-no-colon:not(.ant-form-item-required) {
  //     padding-left: 10px;
  //   }
  // }
  &.ant-form-vertical {
    .ant-form-item-label {
      line-height: 22px;
      padding: 0 0 4px;
      // align-self: self-start;
      label {
        min-height: 22px;
        line-height: 22px;
        color: @heading-color;
        &.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {
          top: 6px;
        }
      }
      .ant-form-item-required {
        .text-label {
          padding: 0 0 0 10px;
        }
      }
      .scBasic-help {
        line-height: 20px;
      }
    }
  }
}

/*************************** from表单  **************************************/ // 去除horizontal状态下label后面的冒号
.ant-form-horizontal {
  .ant-form-item-label > label::after {
    content: '';
  }
}

.ant-form {
  .ant-form-item-label {
    white-space: wrap;
    word-break: break-all;
  }
  .ant-form-item-label>label {
    // color: @text-color;
    font-weight: 400;
    color: @text-color;
  }
  .ant-form-item-label > label.ant-form-item-required::before, .ant-form-item-label > label::before {
    display: none;
  }
  .ant-form-item-label > label.ant-form-item-no-colon .text-label {
    padding-left: 0;
  }
  &.ant-form-vertical .ant-form-item-label .ant-form-item-required .text-label {
    padding-left: 0;
  }
}

// // 表单label非必填占位
// .ant-form-item-label {
//   > label {
//     &:before {
//       display: inline-block;
//       margin-right: 4px;
//       color: transparent;
//       font-size: 14px;
//       line-height: 1;
//       content: '*';
//     }
//   }
// }
.ant-form-item-explain, .ant-form-item-extra {
  font-size: 12px;
  min-height: 20px;
  line-height: 20px;
  font-weight: 400;
  padding-bottom: 4px;
}
.ant-form-item-explain.ant-form-item-explain-error {
  color: #E34D59;
}
// .ant-form-item-has-error .ant-input, 
// .ant-form-item-has-error .ant-input-affix-wrapper, 
// .ant-form-item-has-error .ant-input:hover, 
// .ant-form-item-has-error .ant-input-affix-wrapper:hover {
//   border-color: #E34D59;
// }
.ant-form-item-has-error {
  .ant-input,
  .ant-input-affix-wrapper,
  .ant-input:hover,
  .ant-input-affix-wrapper:hover {
    border-color: #E34D59;
  }
  .ant-select-arrow {
    color: #E34D59;
    &:hover,
    &:focus {
      .sc-you {
        color: #E34D59;
      }
    }
    .sc-you {
      color: #E34D59;
    }
  }
  .ant-select:not(.ant-pagination-options-size-changer).ant-select:not(.ant-select-disabled):hover .ant-select-arrow .sc-you {
    color: #E34D59;
  }
  .ant-select:not(.ant-select-disabled):hover .ant-select-selector {
    box-shadow: 0 0 0 2px rgba(227,77,89,.2);
  }
}