@use "common";

/***没有nav下划线***/
.tabs-nav-no-wrap {
    .el-tabs__nav-wrap::after {
        height: 0px !important;
        width: 0px !important;
    }
}

/***nav as card***/
.tabs-header-as-card {
    .el-tabs__header:not(.disinheritance .el-tabs__header) {
        @extend .background-as-card;
        padding: 2px;
    }
}

/***作为按钮样式的tabs-bar***/
/*选中无下划线*/
.tabs-bar-as-btn {
    .el-tabs__active-bar:not(.disinheritance .el-tabs__active-bar) {
        height: 0px;
    }

    /*定义字体*/
    .el-tabs__item:not(.disinheritance .el-tabs__item) {
        @extend .text-title-2;
        color: var(--text-primary-80-color);
    }

    /*激活时按钮样式*/
    .el-tabs__item.is-active:not(.disinheritance .el-tabs__item) {
        @extend .text-title-1-bold;
        color: var(--color-primary-100);
        border-width: 1px;
        border-style: solid;
        border-color: var(--color-primary-35);
        border-radius: 10px;
        background-color: var(--color-primary-2);
    }
}

/***允许tab-pane内部元素溢出***/
.tab-pane-overflow-visible {
    .el-tab-pane {
        overflow: visible !important;
    }

    // 同时确保父容器也允许溢出
    .el-tabs__content {
        overflow: visible !important;
    }
}

/***tabs-bar左边悬浮***/
.left-float-nav-tabs,
.left-float-nav-tabs .el-tabs {
    overflow: visible !important;
    width: auto !important;
}

.left-float-nav-tabs {
    position: relative;

    .el-tabs__header.is-left {
        position: absolute !important;
        left: -160px !important;
        top: 0 !important;
        width: auto !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow: visible !important;

        .el-tabs__nav {
            display: flex;
            flex-direction: column;
            gap: 16px;
            align-items: center;
            overflow: visible !important;
            float: none !important;
        }

        .el-tabs__active-bar {
            display: none;
        }
    }

    .el-tabs__content {
        display: none;
    }

    .el-tabs__item.is-left {
        @extend .text-tip-1;
        height: 32px;
        padding: 4px 16px;
        border-radius: 16px;
        justify-content: center;
        color: var(--text-primary-65-color);
        background-color: var(--bg-white-100);
        box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
        border: none !important;
        width: auto;
    }

    .el-tabs__item.is-left.is-active {
        color: var(--bg-white-100) !important;
        background-color: var(--color-primary-100) !important;
        box-shadow: none;
    }
}