@import '../style/var.less';

/* stylelint-disable-next-line no-descending-specificity */
.vant-form-formItem {
  .theme(line-height, '@form-line-height');

  .vant-form-formItem-controll-item-flex-end {
    display: flex;
    justify-content: flex-end;
  }

  height: auto;
  display: flex;
  overflow: hidden;
  margin: 0 @form-space-horizontal;
  padding: @form-space-vertical 0;

  .theme(background-color, '@form-background-color');

  &-bottom-border {
    .theme(border-bottom, '@form-border-bottom');
  }

  &-wrapper {
    .theme(background-color, '@form-background-color');

    box-sizing: border-box;
  }

  &-horizontal {
    flex-direction: row;
    align-items: flex-start;
  }

  &-vertical {
    flex-direction: column;

    .vant-form-formItem-controll-item {
      .theme(margin-top, '@form-vertical-controll-margin-top');
    }

    .vant-form-label {
      width: auto;
    }
  }

  &-controll {
    .theme(color, '@form-controll-color');

    .theme(margin-left, '@form-controll-margin-left');

    .theme(font-size, '@form-controll-font-size');

    flex: 1;

    /* stylelint-disable-next-line no-descending-specificity */
    &-item {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
    }
  }
}

/* stylelint-disable-next-line no-descending-specificity */
.vant-form-label {
  .theme(width, '@form-label-width');

  .theme(font-size, '@form-label-font-size');

  flex: none;
  box-sizing: border-box;

  .theme(color, '@form-label-color');

  text-align: left;
  word-wrap: break-word;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

.vant-form-required-box {
  min-width: 14px;
}

.vant-form-message {
  .theme(font-size, '@form-message-font-size');

  .theme(color, '@form-message-color');

  height: 0;
  transition: all 0.4s;
  visibility: hidden;
}

.vant-form-message-show {
  min-height: 30px;

  .theme(margin-top, '@form-message-margin-top');

  visibility: visible;
}
