// 修改 van-cell-group 的底部边框样式
// 修改 hairline 边框样式
[class*=van-hairline]::after {
  border-color: $border-color-regular;
}

// 修改 van-cell-group hairline 边框位置，并只保留上边框
.van-cell-group.van-hairline--top-bottom::after {
  border-width: $border-width-regular 0 0;
}

.van-field__error-message {
  text-align: right;
}

.van-field--error .van-field__control,
.van-field--error .van-field__control::placeholder {
  color: red !important;
}

.van-cell-group {
  background-color: transparent;

  .van-cell::after {
    @extend .border-bottom;
  }
}

.van-tabs__line {
  background: $orange;
}

// Field 组件，更改 pading 和字体颜色、大小
.van-field {
  padding: 1.5 * $base-spacing 2 * $base-spacing;
  font-size: $font-size-secondary-title;

  .van-field__label {
    color: $font-color-secondary;
  }

  .van-field__control {
    @extend .flex-row-e;
    //text-align: right;
    color: $font-color-regular;
  }
}

.van-cell {
  padding: 13px 2 * $base-spacing;
  line-height: 22px;
  font-size: $font-size-secondary-title;
  color: $font-color-secondary;

  // .van-cell__title{
  //   flex: 1 0 auto;
  // }

  .van-cell__value {
    margin-left: 2 * $base-spacing;
    color: $font-color-regular;
  }
}

// 折叠面板，更改 padding，使用 cell 的padding
.van-collapse-item__content {
  padding: 0;
  background-color: transparent;
}

// 弹框背景蒙层
.van-overlay {
  background-color: $bg-color-overlay;
}

// popup 组件，更改圆角
.van-popup--bottom.van-popup--round {
  border-radius: 1.5 * $base-spacing 1.5 * $base-spacing 0 0;
}

// Picker 组件，更改 pading 和字体颜色、大小
.van-picker {

  // 标题栏高度
  $van-picker-toolbar-height: 50px;
  // 选项高度
  $van-picker-item-height: 5 * $base-spacing;

  // 标题栏
  .van-picker__toolbar {
    @extend .border-bottom;
    height: $van-picker-toolbar-height;
    font-size: $font-size-secondary-title;
    font-weight: $font-weight-regular;

    // 取消按钮
    .van-picker__cancel {
      padding: 0 2 * $base-spacing;
      font-size: $font-size-secondary-title;
      color: $font-color-regular;
    }

    // 标题
    .van-picker__title {
      color: $font-color-regular;
      font-size: $font-size-secondary-title;
      font-weight: $font-weight-medium;
    }

    // 确认按钮
    .van-picker__confirm {
      padding: 0 2 * $base-spacing;
      font-size: $font-size-secondary-title;
      color: $primary-color;
    }
  }

  .van-picker__columns {
    // 高度
    // height: $grid-column-count * $van-picker-item-height !important;

    // 选项
    .van-picker-column__item {
      // height: $van-picker-item-height !important;
      font-size: $font-size-primary-title;
      font-weight: $font-weight-regular;
      color: $font-color-secondary;
    }

    // 选中项
    .van-picker-column__item--selected {
      font-size: $font-size-prominent-title;
      font-weight: $font-weight-semi-bold;
      color: $font-color-regular;
    }

    // 选项高度
    // .van-picker__frame {
    //   height: $van-picker-item-height !important;
    // }
  }
}

// 数字步进器
.van-stepper--round {

  $btn-size: 3 * $base-spacing;
  $btn-color: #FF5505;

  // 加减按钮大小
  .van-stepper__minus,
  .van-stepper__plus {
    width: $btn-size;
    height: $btn-size;
  }

  // 减按钮颜色
  .van-stepper__minus {
    border-color: $btn-color;
    color: $btn-color;
  }

  // 加按钮颜色
  .van-stepper__plus {
    background-color: $btn-color;
  }

  // 输入框
  .van-stepper__input {
    margin-left: 1 * $base-spacing;
    margin-right: 1 * $base-spacing;
    width: 5 * $base-spacing;
    font-size: $font-size-main;
    font-weight: $font-weight-regular;
    color: $font-color-regular;
  }
}

.van-pull-refresh {
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  .van-pull-refresh__track {
    flex: 1;
  }
}

.van-tabs {

  // tab 高度
  .van-tabs__wrap {
    height: 44px;
  }

  // tab 字体
  .van-tab {
    font-size: $font-size-secondary-title;
    font-weight: $font-weight-regular;
    color: $font-color-secondary;
  }

  // tab 选中字体
  .van-tab--active {
    color: $primary-color;
    font-weight: $font-weight-medium;
  }

  // tab 下划线
  .van-tabs__line {
    width: 3 * $base-spacing;
    height: 3px;
    background: linear-gradient(to right, $bg-color-gradient-start, $bg-color-gradient-end);
  }
}

// 弹框
.van-dialog {
  border-radius: $base-spacing;

  .van-dialog__header {
    padding-top: 3 * $base-spacing;
    font-size: $font-size-primary-title;
    font-weight: $font-weight-semi-bold;
    color: rgba(51, 51, 51, 0.9);
  }

  .van-dialog__content {
    padding: 0 3 * $base-spacing;
    font-size: $font-size-main;
    font-weight: $font-color-regular;
    color: $font-color-secondary;

    .van-dialog__message {
      padding: 1.5 * $base-spacing 0 2.5 * $base-spacing;
    }

  }

  .van-dialog__footer {
    font-size: $font-size-main;

    .van-dialog__confirm {
      color: $font-color-primary;
    }
  }
}

// 密码输入框
.van-password-input {
  margin: 0;

  &__security {
    height: 40px;

    &::after {
      border-radius: $base-spacing;
    }
  }

  .van-hairline--surround {
    &::after {
      border-width: $border-width-regular;
      border-color: #999;
    }
  }

  .van-hairline--left:after {
    border-left-width: 0.5px;
    border-color: #999;
  }
}
