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

.van-submit-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  user-select: none;
  z-index: var(--submit-bar-z-index, @submit-bar-z-index);
  background-color: var(
    --submit-bar-background-color,
    @submit-bar-background-color
  );

  &__tip {
    padding: var(--submit-bar-tip-padding, @submit-bar-tip-padding);
    color: var(--submit-bar-tip-color, @submit-bar-tip-color);
    font-size: var(--submit-bar-tip-font-size, @submit-bar-tip-font-size);
    line-height: var(--submit-bar-tip-line-height, @submit-bar-tip-line-height);
    background-color: var(
      --submit-bar-tip-background-color,
      @submit-bar-tip-background-color
    );

    &:empty {
      display: none;
    }
  }

  &__tip-icon {
    margin-right: 4px;
    vertical-align: middle;
  }

  &__tip-text {
    display: inline;
    vertical-align: middle;
  }

  &__bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: var(--submit-bar-padding, @submit-bar-padding);
    height: var(--submit-bar-height, @submit-bar-height);
    font-size: var(--submit-bar-text-font-size, @submit-bar-text-font-size);
    background-color: var(
      --submit-bar-background-color,
      @submit-bar-background-color
    );
  }

  &__safe {
    height: constant(safe-area-inset-bottom);
    height: env(safe-area-inset-bottom);
  }

  &__text {
    flex: 1;
    text-align: right;
    color: var(--submit-bar-text-color, @submit-bar-text-color);
    padding-right: var(--padding-sm, @padding-sm);
    font-weight: var(--font-weight-bold, @font-weight-bold);
  }

  &__price {
    color: var(--submit-bar-price-color, @submit-bar-price-color);
    font-weight: var(--font-weight-bold, @font-weight-bold);
    font-size: var(--submit-bar-price-font-size, @submit-bar-price-font-size);

    &-integer {
      font-size: @submit-bar-price-integer-font-size;
      font-family: @submit-bar-price-font-family;
    }
  }

  &__currency {
    font-size: var(
      --submit-bar-currency-font-size,
      @submit-bar-currency-font-size
    );
  }

  &__suffix-label {
    margin-left: 5px;
  }

  &__button {
    width: var(--submit-bar-button-width, @submit-bar-button-width);
    font-weight: var(--font-weight-bold, @font-weight-bold);

    --button-default-height: var(
      --submit-bar-button-height,
      @submit-bar-button-height
    ) !important;
    --button-line-height: var(
      --submit-bar-button-height,
      @submit-bar-button-height
    ) !important;
  }
}
