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

@component-namespace el {
  @b form {
    @m label-left {
      & .el-form-item__label {
        text-align: left;
      }
    }
    @m label-top {
      & .el-form-item__label {
        float: none;
        display: inline-block;
        text-align: left;
        padding: 0 0 10px 0;
      }
    }
    @m inline {
      & .el-form-item {
        display: inline-block;
        margin-right: 10px;
        vertical-align: top;
      }
      & .el-form-item__label {
        float: none;
        display: inline-block;
      }
      & .el-form-item__content {
        display: inline-block;
        vertical-align: top;
      }
      &.el-form--label-top .el-form-item__content {
        display: block;
      }
    }
  }
  @b form-item {
    margin-bottom: 12px;
    @utils-clearfix;

    & .el-form-item {
      margin-bottom: 0;

      & .el-form-item__content {
        margin-left: 0 !important;
      }
    }

    @e label {
      text-align: right;
      vertical-align: middle;
      float: left;
      font-size: 14px;
      line-height: 1;
      padding: 11px 12px 11px 0;
      box-sizing: border-box;
    }
    @e content {
      line-height: 36px;
      /*position: relative;*/
      font-size: 14px;
      @utils-clearfix;
    }
    @e error {
      color: var(--color-danger);
      font-size: 14px;
      line-height: 1;
      padding: 6px 0 0 12px;
      position: relative;
      left: 0;
      top: 100%;
        .icon-ng-inline-error{
          display: table-cell;
        }
        .icon-ng-inline-error:before {
          padding-right:4px;
          font-size:14px;
        }
    }
    @e errorinfo {
        display: table-cell;
        line-height: 16px;
    }
    @when required {
      .el-form-item__label:before {
        content: '*';
        color: var(--color-danger);
        margin-right: 4px;
      }
    }

    @when error {
      & .el-input__inner,
      & .el-textarea__inner {
        border-color: var(--color-danger);
        background-color: var(--input-background-color-danger);
        &:hover {
           background-color: #ffa399;
         }
      }
      & .el-input-group__append,
      & .el-input-group__prepend, {
        & .el-input__inner {
          border-color: transparent;
        }
      }
    }
  }
}
