@import './handle.scss';
//布局样式 开始
#app {
    @include fill_color('fontColor');
    @include font_color('fontColor');
    font-family: 'Microsoft YaHei', '微软雅黑', -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", Segoe UI Symbol, "Noto Color Emoji";
    font-weight: 400;
    //左侧菜单栏样式 开始
    .sidebar-container {
        @include background_color("leftBackColor");
        // menu hover
        .sub-menu-title-noDropdown,
        .el-sub-menu__title {
            &:hover {
                @include background_color("leftMenuBackColorHover");
            }
        }
        & .sidebar-menu-container .is-active>.el-sub-menu__title {
            @include font_color('leftFontActiveColor');
        }
        & .nest-menu .el-sub-menu>.el-sub-menu__title,
        & .el-sub-menu .el-menu-item {
            min-width: $base-sidebar-width !important;
            height: 48px;
            line-height: 48px;
            &:hover {
                @include background_color("leftMenuBackColorHover");
            }
        }
        & .sidebar-menu-container .nest-menu .el-sub-menu>.el-sub-menu__title,
        & .sidebar-menu-container .el-sub-menu .el-menu-item {
            @include background_color("leftBackColor");
            &:hover {
                @include background_color("leftMenuBackColorHover");
            }
        }
    }
    // menu hover
    .sidebar-menu-container {
        .el-menu {
            @include background_color("leftBackColor");
            div {
                @include font_color('fontColor');
            }
            .el-menu-item {
                @include font_color('fontColor');
            }
            .el-menu-item.is-active {
                @include font_color('leftFontActiveColor');
                @include background_color("leftMenuBackColorHover");
                .imgSvg {
                    filter: drop-shadow(#409eff -30px -18px 0px);
                }
            }
            .el-menu-item:hover {
                @include background_color("leftMenuBackColorHover");
                @include font_color('leftFontActiveColor');
            }
        }
    }
    .sidebar-logo-container {
        @include background_color("leftBackColor");
        .sidebar-icon-link {
            #hamburger-container {
                font-size: '14px';
                @include fill_color('iconColor');
            }
            .icon-title {
                @include font_color('titleColor');
                display: 'inline-block';
                font-size: 14px;
            }
        }
        .sidebar-logo-link {
            .sidebar-title {
                @include font_color('titleColor');
            }
        }
    }
    //左侧菜单栏样式 结束
    //顶部导航栏样式 开始
    .navbar {
        @include background_color("topBackColor");
        .sidebar-logo-link {
            .sidebar-title {
                @include font_color('titleColor');
            }
        }
        #hamburger-container {
            @include fill_color('iconColor');
        }
    }
    //顶部导航栏样式 结束
    //中间内容样式 开始
    .app-main {
        @include background_color("containerBackColor1");
        height: 100%;
        width: 100%;
        padding: 12px;
        position: relative;
        overflow: hidden;
        display: flex;
        .app-themes {
            @include background_color("containerBackColor2");
        }
        .app-container {
            height: 100%;
            width: 100%;
            &-count {
                margin: 0 0px 12px 0px;
                border: 1.5px rgba(141, 141, 141, 0.13) solid;
                box-shadow: inset 0px 0px 10px 0px rgba(141, 141, 141, 0.02);
                .el-col {
                    display: flex;
                    justify-content: center;
                    border: 1px solid rgba(141, 141, 141, 0.08);
                    .img {
                        width: 50px;
                        margin: auto 20px auto 0;
                        display: inline-block;
                    }
                    .content {
                        margin: auto 0 auto 0;
                        display: inline-block;
                        p:nth-child(1) {
                            font-weight: 700;
                            font-size: 14px;
                            margin: 0 0 10px 0;
                        }
                        p:nth-child(2),
                        p:nth-child(3) {
                            font-size: 16px;
                            margin: 10px 0 0 0;
                        }
                    }
                }
            }
        }
    }
    //中间内容样式 结束
}

//布局样式 开始
//组件功能样式 开始
#app {
    //面包屑样式 开始
    .app-themes,
    .app-container {
        .el-breadcrumb__inner,
        .el-breadcrumb__inner a,
        .el-breadcrumb__inner.is-link {
            @include font_color('fontColor');
        }
        .el-breadcrumb__inner a:hover {
            color: #409EFF !important;
        }
        .el-breadcrumb__separator {
            @include font_color('fontColor');
        }
    }
    //面包屑样式 结束
    //可关闭小标签页 开始
    .main-container {
        #tags-view-container.tags-view-container {
            @include background_color("containerBackColor2");
        }
        .tags-view-container .tags-view-wrapper .tags-view-item.active {
            @include background_color('closeBackColor');
            border-color: rgba(12, 131, 250, .15) !important;
            @include font_color('closeBackColorBefore');
        }
        .tags-view-container .tags-view-wrapper .tags-view-item.active::before {
            @include background_color('closeBackColorBefore');
        }
    }
    //可关闭小标签页 结束
    //icon图标样式 开始
    //icon图标样式 结束
    //table样式 开始
    .app-themes,
    .app-container {
        .el-table {
            font-size: 13px;
            @include background_color("tableBackColor");
            @include font_color('tableFontColor');
            @include fill_color("fontColor");
            .el-button>span {
                font-size: 12px;
            }
            tr {
                @include background_color("tableBackColor");
            }
            td,
            th.is-leaf {
                @include border_color("tableBorderBackColoe");
                @include background_color("tableBackColor");
            }
            .el-table__header-wrapper th,
            .el-table__fixed-header-wrapper th {
                @include font_color('tableHeaderFontColor');
                @include background_color("tableHeaderBackColor");
            }
            .el-table__expand-icon>.el-icon {
                @include font_color('tableIconColor');
            }
        }
        .el-table--enable-row-hover .el-table__body tr:hover>td {
            @include background_color("tableBackColorHover");
        }
        .el-table--border .el-table__inner-wrapper::after,
        .el-table--border::after,
        .el-table--border::before,
        .el-table__inner-wrapper::before,
        .el-table__border-left-patch {
            @include background_color("tableBorderBackColoe");
        }
    }
    //table样式 结束
}

body {
    //card样式 开始
    .el-card {
        @include background_color("containerBackColor2");
        @include border_color("containerBorderColor");
        @include font_color('fontColor');
        .el-card__header {
            padding: 15px 20px;
            @include background_color("containerHeaderBackColor");
            @include border_color("containerBorderColor");
            @include font_color('fontColor');
        }
        .el-card__body {
            .card-header {
                border-bottom: 1px solid #e4e7ed;
                @include background_color("containerHeaderBackColor");
                @include border_color("containerBorderColor");
            }
        }
    }
    //card样式 结束
    //tabs样式 开始
    .el-tabs {
        @include font_color('fontColor');
        .el-tabs__item {
            @include font_color('tabsFontColor');
            &:hover {
                color: #409eff !important;
            }
            &.is-active {
                color: #409eff !important;
            }
        }
        .el-tabs__nav-wrap::after {
            background-color: #e4e7ed;
            height:1px;
        }
    }
    .el-tabs--border-card {
        @include border("tabsBorder");
        @include background_color("tabsContentBackColor");
        >.el-tabs__header {
            border: 0px;
            @include background_color("tabsHeaderBackColor");
            .el-tabs__item {
                @include font_color('tabsFontColor');
            }
            .el-tabs__item.is-active {
                color: #409eff !important;
                @include background_color("tabsBackColorActive");
                @include border("tabsBorder");
            }
        }
        >.el-tabs__content {}
    }
    //tabs样式 结束
    //tree树样式 开始
    .el-tree {
        @include background_color("treeBackColor");
        @include font_color('treeFontColor');
        .el-tree-node.is-current>.el-tree-node__content {
            @include background_color("treeBackColorActive");
        }
        .el-tree-node__content {
            &:hover {
                @include background_color("treeBackColorHover");
            }
        }
        .el-tree-node__expand-icon {
            @include font_color('treeIconFontColor');
        }
        .el-tree-node__expand-icon.is-leaf {
            color: transparent !important;
        }
        .el-tree-node__label {
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }
        &.tree-border {
            margin-top: 5px;
            border-radius: 4px;
            width: 100%;
            @include border("treeBorder");
        }
    }
    .scroll_cd {
        margin-top: 5px;
        border-radius: 4px;
        width: 100%;
        overflow: auto;
        max-height: 500px !important;
        @include border("treeBorder");
        .el-tree {
            &.tree-border {
                border: 0px !important;
            }
        }
    }
    //tree树样式 结束
    //input样式 开始
    .el-input {
        .el-input__wrapper {
            @include font_color('inputFontColor');
            @include box_shadow("inputBoxShadow");
            @include background_color("inputBackColor");
            transition: none;
            &:hover {
                @include box_shadow("inputBoxShadow1")
            }
            &:active {
                @include box_shadow("inputBoxShadow1")
            }
            &.is-focus {
                @include box_shadow("inputBoxShadow1")
            }
            .el-input__inner {
                @include font_color('inputFontColor');
            }
        }
        .el-input__wrapper .el-input.is-disabled {
            @include background_color("inputDisabledBack");
            .el-input__wrapper,
            .el-input__inner {
                cursor: not-allowed;
            }
        }
    }
    //input样式 结束
    //日期~时间选择器样式 开始
    .el-date-editor {
        &.el-input__wrapper {
            @include font_color('dateTimeFontColor');
            @include box_shadow("dateTimeBoxShadow");
            @include background_color("dateTimeBackColor");
        }
        transition: none;
        &:hover {
            @include box_shadow("dateTimeBoxShadow")
        }
        &:active {
            @include box_shadow("dateTimeBoxShadow")
        }
        &:focus {
            @include box_shadow("dateTimeBoxShadow")
        }
        &.is-active {
            @include box_shadow("dateTimeBoxShadow1");
        }
        .el-range-input {
            @include font_color('dateTimeFontColor');
        }
        .el-range-separator {
            @include font_color('dateTimeFontColor');
        }
    }
    //日期~时间选择器样式 结束
    //分页选择器样式 开始
    .el-pagination {
        padding: 0;
        font-size: 14px;
        .el-pagination__total,
        .el-pagination__sizes,
        .el-input__inner,
        .el-pagination__jump {
            @include font_color('pagingFontColor');
        }
    }
    .el-pagination__editor {
        margin-right: 8px
    }
    //分页选择器样式 结束
    //form表单样式 开始
    .el-form {
        .el-form-item__label {
            // @include font_color('formFontColor');
            font-weight: 700;
        }
    }
    //from表单样式 结束
    //dialog弹窗样式 开始
    .el-dialog {
        @include background_color("dialogBackColor");
        .el-dialog__header {
            height: 50px;
            line-height: 50px;
            padding: 0 20px;
            @include background_color("dialogHeaderBackColor");
            margin-right: 0;
        }
        .el-dialog__body {
            @include font_color('dialogTitleFontColor');
        }
        .el-dialog__title {
            font-size: 16px;
            font-weight: 600;
            @include font_color('dialogTitleFontColor');
        }
        .el-dialog__headerbtn {
            width: 50px;
            height: 50px;
            top: 3px;
        }
        .el-dialog__headerbtn .el-dialog__close {
            @include font_color('dialogIconFontColor');
        }
        .el-dialog__footer {
            padding: 30px 20px 12px 20px;
            text-align: center;
            margin: 0 auto;
            flex: 0 0 100%;
            .el-button+.el-button {
                margin-left: 70px;
            }
        }
    }
    //dialog弹窗样式 结束
}

//组件功能样式 结束
#app {
    .main-container {
        transition: margin-left .28s;
        margin-left: $base-sidebar-width;
        position: relative;
    }
    .sidebarHide {
        margin-left: 0 !important;
    }
    .sidebar-container {
        -webkit-transition: width .28s;
        transition: width 0.28s;
        width: $base-sidebar-width !important;
        height: 100%;
        position: fixed;
        font-size: 0px;
        top: 50px;
        // top: 0;
        bottom: 0;
        left: 0;
        z-index: 1001;
        overflow: hidden;
        -webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, .35);
        box-shadow: 2px 3px 6px rgba(0, 21, 41, .35);
        // reset element-ui css
        .horizontal-collapse-transition {
            transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
        }
        .el-scrollbar__wrap {
            // height: calc(100vh - 50px) !important;
        }
        .scrollbar-wrapper {
            overflow-x: hidden !important;
        }
        .el-scrollbar__bar.is-vertical {
            right: 0px;
        }
        .el-scrollbar {
            height: calc(100vh - 107px);
            overflow-y: auto;
        }
        .el-scrollbar.left-menu-type {
            height: calc(100% - 48px);
        }
        .is-horizontal {
            display: none;
        }
        a {
            display: inline-block;
            width: 100%;
            overflow: hidden;
        }
        .svg-icon {
            margin-right: 16px;
        }
        .el-menu {
            border: none;
            height: 100%;
            width: 100% !important;
        }
        .el-menu-item,
        .menu-title {
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            white-space: nowrap !important;
        }
        .el-menu-item .el-menu-tooltip__trigger {
            display: inline-block !important;
        }
    }
    .hideSidebar {
        .sidebar-container {
            width: 54px !important;
        }
        .main-container {
            margin-left: 54px;
        }
        .sub-menu-title-noDropdown {
            padding: 0 !important;
            position: relative;
            .el-tooltip {
                padding: 0 !important;
                .svg-icon {
                    margin-left: 20px;
                }
            }
        }
        .el-menu--collapse {
            .el-sub-menu {
                &>.el-sub-menu__title {
                    &>span {
                        height: 0;
                        width: 0;
                        overflow: hidden;
                        visibility: hidden;
                        display: inline-block;
                    }
                    &>i {
                        height: 0;
                        width: 0;
                        overflow: hidden;
                        visibility: hidden;
                        display: inline-block;
                    }
                }
            }
        }
    }
    .el-menu--collapse .el-menu .el-sub-menu {
        min-width: $base-sidebar-width !important;
    }
    // mobile responsive
    .mobile {
        .main-container {
            margin-left: 0px;
        }
        .sidebar-container {
            transition: transform .28s;
            width: $base-sidebar-width !important;
        }
        &.hideSidebar {
            .sidebar-container {
                pointer-events: none;
                transition-duration: 0.3s;
                transform: translate3d(-$base-sidebar-width, 0, 0);
            }
        }
    }
    .withoutAnimation {
        .main-container,
        .sidebar-container {
            transition: none;
        }
    }
}

// when menu collapsed
.el-menu--vertical {
    &>.el-menu {
        .svg-icon {
            margin-right: 16px;
        }
    }
    .nest-menu .el-sub-menu>.el-sub-menu__title,
    .el-menu-item {
        &:hover {
            // you can use $sub-menuHover
            background-color: rgba(0, 0, 0, 0.06) !important;
        }
    }
    // the scroll bar appears when the sub-menu is too long
    >.el-menu--popup {
        // max-height: 100vh;
        // overflow-y: auto;
        // &::-webkit-scrollbar-track-piece {
        //     background: #d3dce6;
        // }
        // &::-webkit-scrollbar {
        //     width: 6px;
        // }
        // &::-webkit-scrollbar-thumb {
        //     background: #99a9bf;
        //     border-radius: 20px;
        // }
    }
}


