@tabs-prefix-cls: ~"@{css-prefix}tabs";

.@{tabs-prefix-cls} {
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    color: @text-color;
    .clearfix();
    &-vertical{
        display: flex;  
        height: 100%;
    }

    &-bar {
        outline: none;
    }

    &-ink-bar {
        height: 2px;
        box-sizing: border-box;
        background-color: @primary-color;
        position: absolute;
        left: 0;
        bottom: 1px;
        z-index: 1;
        transition: transform .3s @ease-in-out;
        transform-origin: 0 0;
    }

    &-bar:not(&-bar-vertical) {
        border-bottom: 1px solid @color-complementary-2;
        margin-bottom: 16px;
    }

    &-bar-vertical {
        max-height: 200px;
        margin-right: 16px;
        border-right: 1px solid @color-complementary-2;
        width: max-content;
    }

    // &-bar {
    //     border-bottom: 1px solid @border-color-base;
    //     margin-bottom: 16px;
    // }

    &-nav-container {
        margin-bottom: -1px;
        line-height: @line-height-base;
        font-size: @font-size-base + 2px;
        box-sizing: border-box;
        white-space: nowrap;
        overflow: hidden;
        position: relative;
        .clearfix();
    }

    // &-nav-more {
    //   float: right;
    // }

    &-nav-container:focus {
        outline: none;
        // .@{tabs-prefix-cls}-tab-focused {
        //     border-color: @link-hover-color !important;
        // }
    }

    &-nav-container-scrolling {
        padding-left: 32px;
        padding-right: 32px;
    }

    &-nav-wrap {
        overflow: hidden;
        margin-bottom: -1px;
    }

    &-nav-scroll {
        overflow: hidden;
        white-space: nowrap;

        &::after{
            position: absolute;
            content: "";
            box-shadow: inset -12px 0px 8px -8px fade(@gray-500, 40%);
            opacity: 0;
            transition: opacity .3s;
            z-index: 1;
            width: 0px;
            height: 100%;
            top:0;
            right: 45px;
        }
        &::before{
            position: absolute;
            content: "";
            box-shadow: inset 12px 0 8px -8px fade(@gray-500, 40%);
            opacity: 0;
            transition: opacity .3s;
            z-index: 1;
            width: 0px;
            height: 100%;
            top:0;
            left: 0px;
        }
        &-arrow{
          margin:0 25px;
        }
       
    }

     &-nav-scroll-scrollable{
        overflow-y:scroll;
        scroll-behavior: smooth;
        &::-webkit-scrollbar {
            width: 4px;
        }
        &::-webkit-scrollbar-track {
            // background: #f5f5f5;
            border-radius: 4px;
            opacity: 0;
        }
        &::-webkit-scrollbar-thumb {
            border: 2px solid @font-50;
            transition: background 0.3s;
            cursor: pointer;
        }
        &::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8; // ★待定
        }
        .haloe-tabs-bar{
            border-right:none ;
            border-radius: 4px;
        }
        .haloe-tabs-nav-container{
            border-radius: 4px ;
            border: 1px solid @color-complementary-2;
            box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.12); // ★待定
        }
    }


    &-nav-right{
        float: right;
        margin-left: 5px;
    }

    &-nav-prev, &-nav-next{
        width: 36px;
        text-align: center;
        position: absolute;
        line-height: 36px;
        cursor: pointer;
        i{
            font-size: 16px;
        }
    }

    &-nav-prev{
        left: 0px;
    }

    &-nav-next{
        right: -10px;
    }

    &-nav-scrollable{
        // padding: 0 32px;
        // padding-right: 32px;
    }

    &-nav-scroll-disabled{
        // display: none;
        color: @tabs-disabled-color;
        cursor: not-allowed;
    }

    &-nav {
        padding-left: 0;
        margin: 0;
        float: left;
        list-style: none;
        box-sizing: border-box;
        position: relative;
        transition: transform 0.5s @ease-in-out;

        &:before,
        &:after {
            display: table;
            content: " ";
        }

        &:after {
            clear: both;
        }

        .@{tabs-prefix-cls}-tab {
            display: inline-block;
            height: 100%;
            padding: 8px 16px;
            margin-right: 12px;
            box-sizing: border-box;
            cursor: pointer;
            text-decoration: none;
            position: relative;
            transition: color .3s @ease-in-out;

            &:hover {
                color:@tabs-hover-color;
            }

            &:active {
                color: @tabs-active-color;
            }
            .@{css-prefix-iconfont} {
                width: 16px;
                height: 16px;
                font-size: 16px;
                margin-right: 8px;
            }
        }

        .@{tabs-prefix-cls}-tab-disabled {
            cursor: not-allowed;
            color: @tabs-disabled-color;
            &:hover {
              color: @tabs-disabled-color;
            }
        }

        .@{tabs-prefix-cls}-tab-vertical{
            padding: 10px 20px;
            display: block;
            text-align: right;
            margin-right: 0px;
            border-right:2px solid transparent;
            z-index: 2;
            // position: relative;
             .haloe-tabs-close {
                position:absolute;
                top: 15px;
                font-size:12px;
                opacity: 0;
                right:-6px;
             }
            // min-width: 160px;
            &-nav-container:focus &-focused {
              border-left: 0px;
            }

            &.@{tabs-prefix-cls}-tab-text-left {
              text-align: left;
            }
        }

        .@{tabs-prefix-cls}-tab-active {
            color: @primary-color;
           
            &.@{tabs-prefix-cls}-tab-vertical {
                border-right: 2px solid @primary-color;
                .haloe-tabs-close {
                    opacity: 1;
                    color:@font-900;
                 }
            }
        }
    }
    &-mini &-nav-container {
        font-size: @font-size-base;
    }

    &-mini &-tab {
        margin-right: 0;
        padding: 8px 16px;
        font-size: @font-size-small;
    }

    & {
        .@{tabs-prefix-cls}-content-animated {
            display: flex;
            flex-direction: row;
            will-change: transform;
            transition: transform .3s @ease-in-out;
        }

        .@{tabs-prefix-cls}-content-vertical {
            flex: 1;
        }

        .@{tabs-prefix-cls}-tabpane {
            flex-shrink: 0;
            width: 100%;
            transition: opacity .3s;
            opacity: 1;
            outline: none;
        }

        .@{tabs-prefix-cls}-tabpane-inactive {
            opacity: 0;
            height: 0;
        }
    }

    line style
    &&-line > &-bar:not(&-bar-vertical) &-tab-active{
        border: 1px solid transparent;
            border-bottom:none;
            border-radius: 8px 8px 0 0;
            background-clip: padding-box, border-box;
            background-origin: padding-box, border-box;
            background-image: linear-gradient(to right, @white, @white), linear-gradient(155deg,rgba(116,233,255,1), rgba(64,158,255,1)); // ★待定
            &-ink-bar {
                visibility: hidden;
            }
        }

    &&-line > &-bar &-nav-more {
        margin-left: 8px;
        margin-right: 5px;
        width: 24px;
        line-height: 26px;
        text-align: center;
        cursor: pointer;
        &:hover{
            color: @tabs-hover-color;
        }
    }

    &&-line > &-bar &-nav-scroll-after-shadow {
        &::after{
            width: 12px;
            opacity: 1;
            right: 20px;
        }
    }

    &&-line > &-bar &-nav-scroll-before-shadow {
        &::before{
            width: 12px;
            opacity: 1;
        }
    }

    // card style
    &&-card > &-bar {
        border-bottom: none;
    }

    &&-card > &-bar &-nav{
      border-bottom: 1px solid @color-complementary-2;
    }

    &&-card > &-bar &-nav-container {
        height: 41px;
    }

    &&-card > &-bar &-ink-bar {
        visibility: hidden;
    }

    &&-card > &-bar &-tab {
        margin: 0;
        margin-right: 5px;
        height: 38px;
        padding: 10px 20px;
        border: 1px solid @color-complementary-2;
        border-bottom: 0;
        transition: all 0.3s @ease-in-out;
        background: @tabs-card-bg;
        border-radius: 8px 8px 0 0;
    }

    &&-card > &-bar &-tab-active {
        height: 38px;
        padding-bottom: 5px;
        // background: @color-bg-card;
        transform: translateZ(0);
        border-color: transparent;
        color: @primary-color;
        position: relative;
        background-clip: padding-box, border-box;
        background-origin: padding-box, border-box;
        background-image: linear-gradient(to right, @white, @white), linear-gradient(0deg,rgba(26,106,255,0), rgba(26,106,255,1)); // ★待定
        &:before{
          display: block;
          width: 100%;
          height: 1px;
          position: absolute;
          bottom: -1px;
          left: 0;
          background: @white;
          content: '';
          z-index: 9;
        }
    }

    &&-card > &-bar &-nav-wrap {
        margin-bottom: 0;
    }

    &&-card > &-bar &-tab &-close {
        width: 14px;
        height: 14px;
        font-size: 14px;
        margin-right: 0;
        margin-left: 8px;
        color: @legend-color;
        text-align: right;
        vertical-align: middle;
        overflow: hidden;
        position: relative;
        top: -1px;
        transform-origin: 100% 50%;
        transition: all 0.3s @ease-in-out;
        &:hover {
            color: @primary-color;
        }
    }

    &&-card.haloe-tabs-card-bg  {
        background-color: transparent;
        .haloe-tabs-bar .haloe-tabs-tab{
          border-color: transparent;
          background-color: transparent;
        }
        &-tab-active {
            height: 38px;
            padding-bottom: 5px;
            background: @white;
            transform: translateZ(0);
            border: 1px solid transparent;
            color: @primary-color;
            position: relative;
            background-clip: padding-box, border-box;
            background-origin: padding-box, border-box;
            background-image: linear-gradient(to right, @white, @white), linear-gradient(0deg,rgba(26,106,255,0), rgba(26,106,255,1)); // ★待定
        }
        
    }
    // &&-card > &-bar &-nav-scrollable-more {
    //     padding: 0px;
    // }

    // &&-card > &-bar &-nav-more {
    //     width: 40px;
    //     height: 40px;
    //     line-height: 36px;
    //     margin: 0px;
    //     margin-left: 5px;
    //     border: 1px solid @color-complementary-2;
    //     border-bottom: 0;
    //     border-radius: @btn-border-radius @btn-border-radius 0 0;
    //     transition: all 0.3s @ease-in-out;
    //     background: @tabs-card-bg;
    //     text-align: center;
    //     cursor: pointer;
    //     &::before {
    //         display: block;
    //         position: relative;
    //         width: 100px;
    //         height: 1px;
    //         top: 39px;
    //         left: -10px;
    //         background: @color-complementary-2;
    //         content: '';
    //         z-index: 9;
    //     }
    //     &:hover {
    //         color: @tabs-hover-color;
    //     }
    // }

    &&-card > &-bar &-nav-scroll-after-shadow {
        &::after{
            border-radius: 0px 8px 0px 0px!important;
            width: 20px;
            opacity: 1;
            right: 16px;
        }
    }

    &&-card > &-bar &-nav-scroll-before-shadow {
        &::before{
            width: 12px;
            opacity: 1;
        }
    }

    &&-card > &-bar &-tab-active &-close,
    &&-card > &-bar &-tab:hover &-close {
        width: 14px;
        transform: translateZ(0);
    }

    //按钮组样式
    &&-buttonGroup > &-bar {
         border-bottom: none;
    }
    &&-buttonGroup > &-bar &-nav{
      border-radius:  4px;
      background-color: @tabs-buttonGroup-bg;
    }
     &&-buttonGroup > &-bar &-nav-container {
        height: 41px;
    }

     &&-buttonGroup > &-buttonGroup &-ink-bar {
        visibility: hidden;
    }

    &&-buttonGroup > &-bar &-tab {
        margin-right: 4px;
        height: 36px;
        border-bottom: 0;
    }

    &&-buttonGroup > &-bar &-tab-active {
        height: 26px;
        padding-top: 4px;
        padding-bottom: 4px;
        left: 4px;
        margin-right: 12px;
        border-radius: 4px;
        transform: translateZ(0);
        border-color: transparent;
        color: @primary-color;
        position: relative;
        background-clip: padding-box, border-box;
        background-origin: padding-box, border-box;
        background-image: linear-gradient(to right, @white, @white);
    }

     //button 按钮组的简约样式
    &&-simple > &-bar {
        border-bottom: none;
    }
    &&-simple > &-bar &-nav{
        display: flex;
        align-items: center;
        border-radius: 13.87px;
        height: 26px;
        background-color: @tabs-buttonGroup-bg;
        font-size: 12px;
    }
     &&-simple > &-bar &-nav-container {
        height: 41px;
    }

     &&-simple > &-buttonGroup &-ink-bar {
        visibility: hidden;
    }

    &&-simple > &-bar &-tab {
        margin-right: 4px;
        height: 36px;
        border-bottom: 0;
    }

    &&-simple > &-bar &-tab-active {
        display: flex;
        align-items: center;
        margin-left: -4px;
        height: 26px;
        border-radius:  13.87px;
        transform: translateZ(0);
        border-color: transparent;
        color: @primary-color;
        position: relative;
        background-clip: padding-box, border-box;
        background-origin: padding-box, border-box;
        background-image: linear-gradient(to right,@blue-100,@blue-100);
    }

    // // 容器样式
    // &&-container {
    //     background-color: @tabs-container-bg;
    //     padding: 20px;
    // }

    // &&-container > &-bar {
    //     border-bottom: none;
    //     margin-bottom: 0;
    // }

    // &&-container > &-bar &-nav-more {
    //     display: flex;
    //     height: 24px;
    //     justify-content: center;
    //     float: right;
    //     margin-left: 10px;
    //     width: 24px;
    //     margin-top: 7px;
    //     cursor: pointer;
    //     &:hover{
    //       background-color: #fff;
    //     }
    // }

    // &&-container > &-bar &-nav-scrollable-more {
    //     padding: 0;
    // }

//     &&-container > &-bar &-nav-scrollable &-nav-prev,
//     &&-container > &-bar &-nav-scrollable &-nav-next {
//         display: block;
//         width: 24px;
//         line-height: 24px;
//         margin-top: 5px;
//         text-align: center;
//         &:hover:not(&-nav-click-disable) {
//           background-color: #fff;
//         }
//     }

//     &&-container > &-bar &-nav {
//         border-bottom: none;
//     }

//     &&-container > &-bar &-nav-container {
//         height: 41px;
//     }

//     &&-container > &-bar &-ink-bar {
//         visibility: hidden;
//     }

//     &&-container > &-bar &-tab {
//         margin: 0;
//         margin-right: 5px;
//         height: 40px;
//         padding: 10px 20px 10px 20px;
//         border: 0;
//         border-radius: @border-radius-base @border-radius-base 0 0;
//         background: @tabs-container-bg;
//         color: @color-text-level3;
//         position: relative;
//         &:after {
//             content: '';
//             display: block;
//             position: absolute;
//             width: 1px;
//             height: 20px;
//             background-color: @tabs-container-gap;
//             right: -1px;
//             top: 50%;
//             transform: translateY(-50%);
//         }
//         &:hover:not(.@{tabs-prefix-cls}-tab-active):not(.@{tabs-prefix-cls}-tab-active) {
//             background-color: @tabs-container-hover-bg;
//             // opacity: 0.6;
//             // 遮挡前一个tab border
//             &:after {
//               width: 1px;
//               left: -5px;
//               background-color: @tabs-container-bg;
//             }
//         }
//     }

//     &&-container > &-bar &-tab-active {
//         height: 40px;
//         padding-bottom: 5px;
//         background: @tabs-container-active-bg;
//         transform: translateZ(0);
//         color: @primary-color;
//         position: relative;
//         border-right: 0;
//         &:before {
//             display: block;
//             width: 100%;
//             height: 1px;
//             position: absolute;
//             bottom: -1px;
//             left: 0;
//             background: @tabs-container-active-bg;
//             content: '';
//             z-index: 9;
//         }
//         // 遮挡前一个tab border
//         &:after {
//             width: 1px;
//             left: -5px;
//             background-color: @tabs-container-bg;
//         }
//     }

//     &&-container > &-bar &-nav-wrap {
//         margin-bottom: 0;
//     }

//     &&-container > &-bar &-tab &-close {
//         width: 14px;
//         height: 14px;
//         font-size: 14px;
//         margin-right: 0;
//         margin-left: 8px;
//         color: @legend-color;
//         text-align: right;
//         vertical-align: middle;
//         overflow: hidden;
//         position: relative;
//         top: -1px;
//         transform-origin: 100% 50%;
//         transition: all 0.3s @ease-in-out;
//         &:hover {
//             color: @primary-color;
//         }
//     }

//     &&-container > &-bar &-tab-disabled {
//         color: @tabs-disabled-color;
//         cursor: not-allowed;
//     }

//     &&-container > &-bar &-nav-scroll {
//         &::after {
//             right: 32px;
//         }
//     }
//     &&-container > &-bar &-nav-scroll-after-shadow {
//         &::after{
//             width: 12px;
//             opacity: 1;
//         }
//     }

//     &&-container > &-bar &-nav-scroll-before-shadow {
//         &::before{
//             width: 12px;
//             opacity: 1;
//         }
//     }

//     &&-container &-content &-tabpane {
//         background-color: #fff;
//         padding: 16px 20px;
//     }

//     &-context-menu{
//         position: absolute;
//     }
 }


.@{tabs-prefix-cls}-no-animation {
    > .@{tabs-prefix-cls}-content {
        transform: none!important;

        > .@{tabs-prefix-cls}-tabpane-inactive {
            display: none;
        }
    }
}
