@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: 22px;
    @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;
      color: var(--color-extra-light-black);
      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: 12px;
      line-height: 1;
      padding-top: 4px;
      position: absolute;
      top: 100%;
      left: 0;
    }

    @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);
      }
      & .el-input-group__append,
      & .el-input-group__prepend, {
        & .el-input__inner {
          border-color: transparent;
        }
      }
    }
  }
}
