@RES_PATH: '/src/assets/';
@webp: '?x-oss-process=image/format,webp';
.sparkBg(@value) {
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: left top;

  background-image: url("@{RES_PATH}@{value}");

  [duiba-webp='true'] & {
    background-image: url("@{RES_PATH}@{value}@{webp}");
  }
}

.webpBg(@value) {
  .sparkBg("@{value}");
}


.mask(@value) {
  mask-image: url("@{RES_PATH}@{value}");
  -webkit-mask-image: url("@{RES_PATH}@{value}");
  mask-repeat: no-repeat;
}

// 定位-水平垂直居中
.transform_center() {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  position: absolute;
}

// flex-水平垂直居中
.flex_center() {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 文本过长隐藏文字并显示省略号 单行*/
.lineClamp1() {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lineClampN(@num) {
  text-overflow: -o-ellipsis-lastline;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: @num;
  overflow: hidden;
}


// 按钮呼吸动效
.breathAnimation() {
  animation: scale 0.888s linear infinite alternate;
  animation-timing-function: ease-in-out;

  @keyframes scale {
    0% {
      transform: scale(1);
    }

    100% {
      transform: scale(1.12);
    }
  }
}

// 弹窗居中缩放动效
// 注意 加该样式的元素居中方式不能用translate(-50%, -50%)
// 可以用margin-left、margin-top为负的宽度、高度的一半
.popupCenterShow() {
  animation: centerShowAni 300ms ease-out;

  @keyframes centerShowAni {
    0% {
      transform: scale(0);
    }

    66.7% {
      transform: scale(1.1);
    }

    100% {
      transform: scale(1);
    }
  }
}

// 渐入动画
.fade-in {
  opacity: 0;
  animation: fadeIn ease-in 1;
  animation-fill-mode: forwards;
  animation-duration: 2s;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  70% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

// 隐藏滚动条
.hideScrollbar() {
  scrollbar-width: none;
  /* firefox */
  -ms-overflow-style: none;

  /* IE 10+ */
  &::-webkit-scrollbar {
    display: none;
    /* Chrome Safari */
  }
}

.ruleStyle {
  overflow-x: hidden;
  overflow-y: scroll;
  word-break: break-all;
}

// 上滑弹窗动画
.topPop_move {
  animation: move_top_ani 500ms ease-in-out;

  @keyframes move_top_ani {
    0% {
      transform: translateY(100%);
    }

    100% {
      transform: translateY(0);
    }
  }
}


.inputStyle{
  border: none;
  outline: none;
  background-color: transparent;
  // padding-left: 30px;
  // padding-right: 20px;
  font-size: 28px;
  -webkit-user-select: auto !important;
  -khtml-user-select: auto !important;
  -moz-user-select: auto !important;
  -ms-user-select: auto !important;
  -o-user-select: auto !important;
  user-select: auto !important;
}
.textover {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// 多行显示省略号
.textover2 {
  -webkit-box-orient: vertical; // 避免压缩后删除此行
  -webkit-line-clamp: 2; // 显示省略号行数
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
}
