.FormItem {
  font-size: var($__petals--form-item-font-size, $petals--form-item-font-size);

  &-label,
  &-separator,
  &-control {
    line-height: var($__petals--form-item-line-height, $petals--form-item-line-height);
  }

  &-label,
  &-separator {
    color: #666;
  }

  &-label {
    padding-right: 16px;
  }

  &-control {
    color: #333;

    &.is-nested {
      display: flex;
      align-items: flex-start;

      .FormItem {
        flex-grow: 1;
        margin-bottom: 0;
        padding: 0;
      }
    }

    :global {
      .el-select,
      .el-date-editor.el-input {
        width: 100%;
      }
    }
  }

  &-explain {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.5;
  }

  &-separator {
    flex-shrink: 0;
  }

  &.is-editable &-label label {
    cursor: pointer;

    &.is-required {
      &:before {
        content: '*';
        margin-right: 4px;
      }
    }
  }

  &.is-editable &-label label.is-required:before,
  &.is-error &-explain {
    color: #f56c6c !important;
  }
}

.Form {
  &:not(&--inline) .FormItem {
    &,
    &-separator {
      padding: 0 12px;
    }
  }

  &--grid,
  &--flex {
    .FormItem {
      margin-bottom: var($__petals--form-item-margin-bottom, $petals--form-item-margin-bottom);

      &-label {
        text-align: right;
        letter-spacing: 0.58px;
      }
    }
  }

  &--flex {
    .FormItem {
      &-label {
        flex-grow: 0;
      }

      &-controlWrapper {
        flex: 1 1 !important;
        overflow: hidden;
      }
    }
  }

  &--vertical {
    .FormItem {
      margin-bottom: 12px;

      &-label {
        margin-bottom: 8px;
        padding-right: 0;
        line-height: 1.5;
      }
    }
  }

  &--inline {
    .FormItem {
      margin-right: 16px;

      &,
      &-label,
      &-controlWrapper {
        display: inline-block;
      }
    }
  }
}
