/* flex */
.flx-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flx-justify-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flx-align-center {
  display: flex;
  align-items: center;
}

/* clearfix */
.clearfix::after {
  display: block;
  height: 0;
  overflow: hidden;
  clear: both;
  content: "";
}

/* 文字单行省略号 */
.sle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 文字多行省略号 */
.mle {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* 文字多了自动換行 */
.break-word {
  word-break: break-all;
  word-wrap: break-word;
}

/* fade-transform */
.fade-transform-leave-active,
.fade-transform-enter-active {
  transition: all 0.2s;
}
.fade-transform-enter-from {
  opacity: 0;
  transition: all 0.2s;
  transform: translateX(-30px);
}
.fade-transform-leave-to {
  opacity: 0;
  transition: all 0.2s;
  transform: translateX(30px);
}

/* breadcrumb-transform */
.breadcrumb-enter-active {
  transition: all 0.2s;
}
.breadcrumb-enter-from,
.breadcrumb-leave-active {
  opacity: 0;
  transform: translateX(10px);
}

/* scroll bar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  background: #faede2;
  border-radius: 1px;
}
::-webkit-scrollbar-thumb {
  background: #f2c9a6;
  border-radius: 3px;
}

/* nprogress */
#nprogress .bar {
  background: var(--el-color-primary) !important;
}
#nprogress .spinner-icon {
  border-top-color: var(--el-color-primary) !important;
  border-left-color: var(--el-color-primary) !important;
}
#nprogress .peg {
  box-shadow:
    0 0 10px var(--el-color-primary),
    0 0 5px var(--el-color-primary) !important;
}

/* 外边距、内边距全局样式 */
@for $i from 0 through 100 {
  .mt#{$i} {
    margin-top: #{$i}px !important;
  }
  .mr#{$i} {
    margin-right: #{$i}px !important;
  }
  .mb#{$i} {
    margin-bottom: #{$i}px !important;
  }
  .ml#{$i} {
    margin-left: #{$i}px !important;
  }
  .pt#{$i} {
    padding-top: #{$i}px !important;
  }
  .pr#{$i} {
    padding-right: #{$i}px !important;
  }
  .pb#{$i} {
    padding-bottom: #{$i}px !important;
  }
  .pl#{$i} {
    padding-left: #{$i}px !important;
  }
}
.p0 {
  padding: 0;
}

// padding
.pt5 {
  padding-top: 5px;
}
.pt10 {
  padding-top: 10px;
}
.pt20 {
  padding-top: 20px;
}
.pd20 {
  padding: 30px;
}
.pd30 {
  padding: 30px;
}

// margin
.m0 {
  margin: 0;
}

// margin
.mt1 {
  margin-top: 1px;
}
.mt10 {
  margin-top: 10px;
}
.mt20 {
  margin-top: 20px;
}
.mt30 {
  margin-top: 30px;
}
.mt60 {
  margin-top: 60px;
}
.mr5 {
  margin-right: 5px;
}
.mr10 {
  margin-right: 10px;
}
.mr20 {
  margin-right: 20px;
}
.mb5 {
  margin-bottom: 5px;
}
.mb10 {
  margin-bottom: 10px;
}
.mb15 {
  margin-bottom: 15px;
}
.mb20 {
  margin-bottom: 20px;
}
.mb30 {
  margin-bottom: 30px;
}
.mb40 {
  margin-bottom: 40px;
}
.mb50 {
  margin-bottom: 50px;
}
.ml5 {
  margin-left: 5px;
}
.ml10 {
  margin-left: 10px;
}
.ml30 {
  margin-left: 30px;
}
.ml40 {
  margin-left: 40px;
}

// 鼠标悬停样式
.cs-pointer {
  cursor: pointer;
}

// flex布局
.h-flex {
  display: flex;
  display: -webkit-box;
  display: -webkit-flex;
  -webkit-box-align: center;
  align-items: center;
}
.flex {
  display: flex;
}
.flex-ac {
  align-items: center;
}
.flex-space-between {
  justify-content: space-between;
}
.flex-jst-center {
  justify-content: center;
}
.flex-drc-cln {
  flex-direction: column;
}

// 字号
.f12 {
  font-size: 12px;
}
.f14 {
  font-size: 14px;
}
.f16 {
  font-size: 16px;
}
.f18 {
  font-size: 18px;
}
.f20 {
  font-size: 20px;
}

// 字体加粗
.fw500 {
  font-weight: 500;
}
.fw600 {
  font-weight: 600;
}

// 宽度百分比
.wid100 {
  width: 100%;
}
.wid50 {
  width: 50%;
}

// 元素定位
.po-r {
  position: relative;
}
.text-align-c {
  text-align: center;
}
.text-align-r {
  text-align: right;
}

// 禁用选择
.disabled-row {
  // 复选框禁用
  .el-checkbox {
    pointer-events: none;
    cursor: not-allowed;
    .el-checkbox__inner {
      background-color: var(--el-checkbox-disabled-input-fill);
      border-color: var(--el-checkbox-disabled-border-color);
    }
  }
}

// 滚动条
.scroll-y {
  overflow: hidden auto;
}
