//
// Tabs
.tabs{
  $tabs:#{&};
  //tabs-list
  &-list{
    box-shadow: 0 1px 0 0 $gray-lightest-18;
    //more tabs
    &__more{
      float: right;
      text-align: center;
      .#{$dropdown-prefix-cls}__toggle{
        height: $nav-tabs-height;
        line-height: $nav-tabs-height;
        #{$tabs}--sm & {
          height: $nav-tabs-sm-height;
          line-height: $nav-tabs-sm-height;
        }
      }

      .#{$dropdown-prefix-cls}__menu{
        margin-top:5px;
        min-width: 100px;
      }

      &.#{$dropdown-prefix-cls}--open{
        .#{$dropdown-prefix-cls}__toggle{
          &::after{
            content:"\F295";
          }
        }
      }
    }
  }

  // Hide tabbable panes to start, show them when `.active`
  .tab-content {
    > .tab-pane {
      display: none;
    }
    > .active {
      display: block;
    }
  }

  //sizing sm
  &--sm {
    .nav-tabs .nav-link {
      height:$nav-tabs-sm-height;
      line-height: $nav-tabs-sm-height;
    }
  }

}


//
// tabs--Pills

.tabs--pills{
  $tabs-pills:#{&};
  .tabs-list{
    background: $nav-pills-bg;
    box-shadow: none;
    &__more{
      position: relative;
      //nav-pills separate line
      &::before {
        position: absolute;
        top: 50%;
        left: 0;
        display: block;
        width: 1px;
        height: 16px;
        background: $nav-pills-separate-line-color;
        transform: translateY(-50%);
        content: "";
      }
      .#{$dropdown-prefix-cls}__toggle {
        padding:0 $nav-link-padding-x;
        &:after{
          border: 1px solid $gray-lightest;
          display: inline;
          padding: 4px;
          background: #fff;
          border-radius: $border-radius;
        }
        #{$tabs-pills}.tabs--sm{
          height: $nav-pills-sm-height;
          line-height: $nav-pills-sm-height;
        }
      }

      &.#{$dropdown-prefix-cls}--open{
        &::after{
          display: none;
        }
      }
    }
  }

  //sizing sm
  &.tabs--sm{
    .nav-pills .nav-link{
      height:$nav-pills-sm-height;
      line-height: $nav-pills-sm-height;
    }
  }
}


//
// tabs--center
//

.tabs--center {
  .tabs-list .nav{
    justify-content: center;
  }
}


//
// tabs--vertical
//

.tabs--vertical {
  display: flex;

  .tabs-list {
    position: relative;
    width: 160px;
    height: 100%;
    overflow: hidden;
    box-shadow: inset -1px 0 0 0 $gray-lightest-18;


    // 遮罩
    &::after {
      position: absolute;
      right: 2px;
      bottom: 0;
      z-index: 2;
      display: block;
      width: 100%;
      height: $tabs-vertical-nav-tabs-height;
      pointer-events: none;
      content: "";
      background: linear-gradient(to bottom,rgba(248,249,250,0),rgba(255,255,255,1));
    }
  }

  .nav-tabs {
    flex-flow: column;
    width: 100%;
    height: 100%;
    overflow: auto;
    @extend %transparent-scroll;

    .nav-link {
      height: $tabs-vertical-nav-tabs-height;
      padding: 0 20px;
      line-height: $tabs-vertical-nav-tabs-height;
      border-right-width: $nav-tabs-link-border-width;
      border-bottom: 0;
      @include text-truncate;
    }
  }

  .tab-content {
    flex: 1;
  }

  &.tabs--sm {
    .nav-tabs {
      .nav-link {
        height: $tabs-vertical-sm-nav-tabs-height;
        font-size: $font-size-xs;
        line-height: $btn-sm-height;
      }
    }
  }
}

//
// text align way
//

// text right
.tabs--text-right {
  .nav-tabs {
    .nav-link {
      text-align: right;
    }
  }
}

