@import '../../_style/index.less';
@tabsPrefixCls: am-tabs;
@iconSize: 0.88*50*@hd;

.tabs-item-content {
  position: relative;
  text-align: center;
  min-width: 2em;
}

.@{tabsPrefixCls}-default-bar-top .@{tabsPrefixCls}-default-bar-tab {
  border-bottom:  none;
}

.@{tabsPrefixCls}-default-bar-tab {
  height: @iconSize;
}

.@{tabsPrefixCls}-default-bar-tab-active {
  .tabs-item-content {
    &-underline {
      display: block;
      width: 50%;
      border-top: 3*@hd solid @brand-primary;
      left: 25%;
      position: absolute;
      bottom: 0;
      border-radius: 1.5*@hd;
      height: 3*@hd;
      background: @brand-primary;
      z-index: 2;
    }
  }
}

.yonui-tabs {
  background-color: transparent;

  &.yonui-tabs-transparent {
    background-color: transparent;

    &.yonui-tabs-gather {
      .am-tabs-default-bar {
        justify-content: start;

        .am-tabs-default-bar-tab {
          padding: 0 12*@hd;
          text-align: -webkit-center;
        }
      }

      .tabs-item-content {
        margin: 0 10*@hd;
      }
    }
  }

  .am-tabs-content-wrap-animated {
    will-change: auto;
  }
}

.yonui-tabs-split-line {
  .am-tabs-tab-bar-wrap,
  .yonui-tabs-icons {
    border-bottom: 1*@hd solid @border-color-base;
  }
}

.upesn-standard-tabs {
  .@{tabsPrefixCls}-default-bar-tab {
    width: auto !important;
    line-height: @iconSize;
  }

  .@{tabsPrefixCls}-default-bar-tab:first-child{
    padding-left: 0.32rem !important;
  }

  .upesn-standard-tabs-item {
    font-size: 0.28rem;
  }

  .@{tabsPrefixCls}-default-bar-tab-active .upesn-standard-tabs-item {
    font-weight: bold;
    color: #111111;
  }

  .@{tabsPrefixCls}-default-bar-tab-active .upesn-standard-tabs-item:before {
    content: '';
    position: absolute;
    bottom: 0.13rem;
    left: 50%;
    height: 0.06rem;
    width: 0.24rem;
    border-radius: 0.03rem;
    background: linear-gradient(45deg, #FC4C2F 0%, #EE2233 100%);
    transform: translateX(-0.16rem);
  }

  .@{tabsPrefixCls}-default-bar-tab-active .upesn-standard-tabs-item:after {
    content: '';
    position: absolute;
    bottom: 0.13rem !important;
    left: 50% !important;
    height: 0.06rem !important;
    width: 0.06rem !important;
    border-radius: 0.03rem !important;
    background: linear-gradient(45deg, #FC4C2F 0%, #EE2233 100%) !important;
    transform: translateX(0.1rem) !important;
  }
}

.yonui-tabs-with-icons {
  position: relative;

  .yonui-tabs-icons {
    background-color: #ffffff;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1;

    .yonui-tabs-icon {
      display: inline-flex;
      width: 0.92rem;
      height: @iconSize;
      justify-content: center;
      align-items: center;
      vertical-align: top;
    }
  }
}

.yonui-tabs-with-icons-1 {
  .@{tabsPrefixCls}-tab-bar-wrap {
    width: calc(~'100% - @{iconSize}');
  }
}

.yonui-tabs-with-icons-2 {
  .@{tabsPrefixCls}-tab-bar-wrap {
    width: calc(~'100% - @{iconSize}*2');
  }
}

.yonui-tabs-with-icons-3 {
  .@{tabsPrefixCls}-tab-bar-wrap {
    width: calc(~'100% - @{iconSize}*3');
  }
}

html:not([data-scale]) .@{tabsPrefixCls}-default-bar-top .@{tabsPrefixCls}-default-bar-tab::after {
  display: none;
}

@media screen and (-webkit-min-device-pixel-ratio: 2),
screen and (min--moz-device-pixel-ratio: 2),
screen and (-o-min-device-pixel-ratio: 2/1),
screen and (min-device-pixel-ratio: 2),
screen and (min-resolution: 192dpi),
screen and (min-resolution: 2dppx) {
  html:not([data-scale]) .am-tabs-default-bar-top .am-tabs-default-bar-tab {
    border-bottom: none;
  }

  html:not([data-scale]) .am-tabs-default-bar-top .am-tabs-default-bar-tab::after {
    content: '';
    position: absolute;
    background-color: #dcdcdc;
    display: block;
    z-index: 1;
    top: auto;
    right: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    transform-origin: 50% 100%;
    transform: scaleY(0.3);
  }
}

@media screen and (-webkit-min-device-pixel-ratio: 3),
screen and (min--moz-device-pixel-ratio: 3),
screen and (-o-min-device-pixel-ratio: 3/1),
screen and (min-device-pixel-ratio: 3),
screen and (min-resolution: 384dpi),
screen and (min-resolution: 3dppx) {
  html:not([data-scale]) .am-tabs-default-bar-top .am-tabs-default-bar-tab::after {
    transform: scaleY(0.3);
  }
}
