@use "../../libs/css/theme" as *;
@use "../../libs/css/mixin" as *;


@include b(tag){
  border-style: solid;
  @include flex;
  align-items: center;
  @include e(wrapper) {
    @include flex;
    position: relative;
    box-sizing: border-box;
  }

  /*禁用*/
  @include themeColor(disabled, $hy-background--disabled, $hy-text-color--disabled,
$hy-background--disabled);

  /*圆角*/
  @include borderRadio(circle);
  @include borderRadio(square);
  @include borderRadio(opposite);

  @include e(icon) {
    margin-right: $hy-border-margin-padding-sm;
  }

  @include e(text) {
    white-space: nowrap;

    @include m(mini) {
      font-size: 20rpx;
      line-height: 20rpx;
    }

    @include m(small) {
      font-size: $hy-font-size-sm;
      line-height: $hy-font-size-sm;
    }

    @include m(medium) {
      font-size: $hy-font-size-base;
      line-height: $hy-font-size-base;
    }

    @include m(large) {
      font-size: $hy-font-size-lg;
    }
  }

  @include m(mini) {
    padding: 4rpx 10rpx;
  }

  @include m(small) {
    padding: 6rpx $hy-border-margin-padding-sm;
  }

  @include m(medium) {
    padding: 8rpx $hy-border-margin-padding-base;
  }

  @include m(large) {
    padding: 10rpx $hy-border-margin-padding-lg;
  }


  /* 主题色 */
  @include themeColor(primary, $hy-primary, $hy-primary, #FFFFFF);
  @include themeColor(error, $hy-error, $hy-error, #FFFFFF);
  @include themeColor(warning, $hy-warning, $hy-warning, #FFFFFF);
  @include themeColor(success, $hy-success, $hy-success, #FFFFFF);
  @include themeColor(info, $hy-info, $hy-info, #FFFFFF);

  /* 主题色镂空 */
  @include themeColor(primary--plain, transparent, $hy-primary, $hy-primary);
  @include themeColor(error--plain, transparent, $hy-error, $hy-error);
  @include themeColor(warning--plain, transparent, $hy-warning, $hy-warning);
  @include themeColor(success--plain, transparent, $hy-success, $hy-success);
  @include themeColor(info--plain, transparent, $hy-info, $hy-info);

  /* 主题色镂空带背景色 */
  @include themeColor(primary--plain__fill, $hy-primary-light, $hy-primary, $hy-primary);
  @include themeColor(error--plain__fill, $hy-error-light, $hy-error, $hy-error);
  @include themeColor(warning--plain__fill, $hy-warning-light, $hy-warning, $hy-warning);
  @include themeColor(success--plain__fill, $hy-success-light, $hy-success, $hy-success);
  @include themeColor(info--plain__fill, $hy-info-light, $hy-info, $hy-info);

  /* 关闭按钮 */
  @include e(close) {
    border-radius: $hy-radius-semicircle;
    background-color: #C6C7CB;
    margin-left: $hy-border-margin-padding-sm;
    @include flex(row);
    align-items: center;
    justify-content: center;
    /* #ifndef APP-NVUE */
    transform: scale(0.8) translate(40%, 0%);
    /* #endif */
    /* #ifdef APP-NVUE */
    transform: scale(0.6) translate(50%, -50%);
    /* #endif */

    @include m(small) {
      width: 18px;
      height: 18px;
    }

    @include m(medium) {
      width: 22px;
      height: 22px;
    }

    @include m(large) {
      width: 25px;
      height: 25px;
    }
  }
}