@table-prefix-cls: ~"@{css-prefix}table";
@table-select-item-prefix-cls: ~"@{table-prefix-cls}-filter-select-item";

.@{table-prefix-cls} {
    &-wrapper{
        position: relative;
        border: 1px solid @border-color-primary;
        border-bottom: 0;
        border-right: 0;
        height:100%;
        max-width: 100%;
    }

    width: inherit;
    height: 100%;
    max-width: 100%;
    overflow: hidden;
    color: @text-color;
    font-size: @font-size-small;
    background-color: #fff;
    box-sizing: border-box;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;

    &-hide{
        opacity: 0;
    }

    &:before{
        content: '';
        width: 100%;
        height: 1px;
        position: absolute;
        left: 0;
        bottom: 0;
        background-color: @border-color-base;
        z-index: 1;
    }

    &:after{
        content: '';
        width: 1px;
        height: 100%;
        position: absolute;
        top: 0;
        right: 0;
        background-color: @border-color-base;
        z-index: 3;
    }

    &-with-header{
        //border-radius: @border-radius-base @border-radius-base 0 0;
    }

    &-with-footer{
        //border: 1px solid @border-color-base;
        //border-radius: 0 0 @border-radius-base @border-radius-base;
    }

    &-with-header&-with-footer{
        //border-radius: @border-radius-base;
    }
    &-import{
        text-align:right;
        font-size: 16px;
        color: @primary-color;
        .ivu-btn{
            font-size: 14px!important;
        }
    }
    &-inline{
        display: inline;
        padding: 0px 10px 0px 0px;
    }
    &-m10{
        margin: 10px;
    }

    &-select{
        .ivu-select-selection-icon{
            line-height: 32px!important;
        }
        .ivu-select-item{
            padding: 0px!important;
        }
        ul {
            li.ivu-select-item {
                padding-left: 0px!important;
            }
        }
    }

    &-title, &-footer{
        height: 38px;
        line-height: 38px;
        border-bottom: 1px solid @border-color-split;
    }
    &-footer{
        border-bottom: none;
    }

    &-header{
        overflow: hidden;
        /*th {
            background-color: #ffffff !important;
            border-bottom: 1px solid @border-color-split !important;
        }*/
    }
    &-body{
        overflow: auto;
       /* margin-bottom: 5px;
        margin-right: 5px;*/
        //position: relative;
    }
    .bodyFlex {
        /*display: flex;
        flex-direction: row;*/
        flex:1;
    }
    &-scroll {
        height: 5px;
    }
    &-rightScroll {
        width: 5px;
    }
    &-expanded-cell {
        padding: 20px 50px !important;
        background: #ebeef2 !important;
    }
    &-with-fixed-top&-with-footer{
        .@{table-prefix-cls}-footer{
            border-top: 1px solid @border-color-base;
        }
        tbody tr:last-child td{
            border-bottom: none;
        }
    }

    th, td
    {
        min-width: 0;
        height: 38px;
        box-sizing: border-box;
        text-align: left;
        text-overflow: ellipsis;
        vertical-align: middle;
        //position: relative;
        border-bottom: 1px solid @border-color-split;
    }

    th {
        height: 38px;
        white-space: nowrap;
        overflow: hidden;
        background-color:@header-color;
       // border-bottom: 2px solid @border-color-split;
    }
    td{
        background-color: #fff;
        transition: background-color @transition-time @ease-in-out;
    }

    th&-column,
    td&-column
    {
        &-left{
            text-align: left;
        }
        &-center{
            text-align: center;
        }
        &-right{
            text-align: right;
        }
    }

    & table{
        //width: 100%;
        table-layout: fixed;
    }
    &-border{
        th,td{
            border-right: 1px solid @border-color-split;
        }
    }
    &-cell{
        padding-left: 18px;
        padding-right: 18px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
        word-break: break-all;
        box-sizing: border-box;
        &-with-expand {
            height: 47px;
            line-height: 47px;
            padding: 0;
            text-align: center;
        }
        &-expand{
            cursor: pointer;
            transition: transform @transition-time @ease-in-out;
            i{
                font-size: @font-size-base;
            }
            &-expanded{
                transform: rotate(90deg);
            }
        }
        &-ellipsis {
            word-break: keep-all;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }
    &-hidden{
        visibility: hidden;
    }
    th &-cell{
        display: inline-block;
        //position: relative;
        word-wrap: normal;
        vertical-align: middle;
        //最大宽度
        width:100%;
    }

    &-stripe &-body,
    &-stripe &-fixed-body
    {
        tr:nth-child(2n) {
            td{
                background-color: @table-td-stripe-bg;
            }
        }
    }

    tr&-row-hover{
        td{
            background-color: @table-td-hover-bg;
        }
    }

    &-large {
        font-size: @font-size-base;
        th{
            height: 42px;
        }
        td{
            height: 60px;
        }
        &-title, &-footer{
            height: 60px;
            line-height: 60px;
        }
    }

    &-small{
        th{
            height: 32px;
        }
        td{
            height: 40px;
        }
        &-title, &-footer{
            height: 40px;
            line-height: 40px;
        }
    }

    &-row-highlight,
    tr&-row-highlight&-row-hover,
    &-stripe &-body tr&-row-highlight:nth-child(2n),
    &-stripe &-fixed-body tr&-row-highlight:nth-child(2n)
    {
        td{
            background-color: @table-td-highlight-bg;
            color:#4d4d4d;
        }
    }

    &-fixed, &-fixed-right{
        position: absolute;
        top: 0;
        left: 0;
        box-shadow: 2px 0 6px -2px rgba(0, 0, 0, 0.2);

        &::before {
            content: '';
            width: 100%;
            height: 1px;
            background-color: @border-color-base;
            position: absolute;
            left: 0;
            bottom: 0;
            z-index: 4;
        }
    }
    &-fixed-right{
        top: 0;
        left: auto;
        right: 0;
        box-shadow: -2px 0 6px -2px rgba(0, 0, 0, 0.2);
    }
    &-fixed-header{
        overflow: hidden;
    }
    &-fixed-body{
        overflow: hidden;
        position: relative;
        z-index: 3;
    }

    &-fixed-shadow {
        width: 1px;
        height: 100%;
        position: absolute;
        top: 0;
        right: 0;
        box-shadow: @shadow-right;
        overflow: hidden;
        z-index: 1;
    }

    &-sort{
        .sortable();
    }
    &-filter{
        display: inline-block;
        cursor: pointer;
        position: relative;

        i{
            color: @btn-disable-color;
            transition: color @transition-time @ease-in-out;
            &:hover{
                color: inherit;
            }
            &.on{
                color: @primary-color;
            }
        }
        &-list{
            padding: 8px 0 0;
            &-item{
                padding: 0 12px 8px;

                .ivu-checkbox-wrapper + .ivu-checkbox-wrapper{
                    margin: 0;
                }
                label {
                    display: block;
                    margin-bottom: 4px;

                    & > span{
                        margin-right: 4px;
                    }
                }
            }
            ul{
                padding-bottom: 8px;
            }
            .select-item(@table-prefix-cls, @table-select-item-prefix-cls);
        }
        &-footer{
            padding: 4px;
            border-top: 1px solid @border-color-split;
        }
    }
    .ivu-poptip-popper{
        min-width: 0;
        text-align: left;
    }
    thead .ivu-poptip-popper{
        .ivu-poptip-body{
            padding: 0;
        }
    }

    &-tip {
        table {
            width: 100%;

            td {
              text-align: center;
            }
        }
    }

    /*gridtree样式*/
    .ut-table-tree-indent,
    .ut-table-tree-swc{
        width: 18px;
        height: 18px;
        line-height: 18px;
        vertical-align: middle;
        text-align: center;
        display: inline-block;
        i{
            color: #949494;
        }
    }
    .ut-table-tree-indent {
        background-position: -1000px 0;
    }
    .ut-table-tree-swc {
        background-position: -120px 0;
    }
    .ut-expanded .ut-table-tree-swc {
        transform: rotate(90deg);
        background-position: -120px 0;
    }
    .ut-table-tree-leaf .ut-table-tree-swc {
        background-position: -1000px 0;
    }
    .ut-hidden {
        display: none!important;
    }
    .rowOperate{
    }
    /*滚动条样式*/
    ::-webkit-scrollbar {
        height: 8px;
        width: 8px;
        background: rgba(205, 211, 222, 0.1);
    }
    ::-webkit-scrollbar:hover {
        background: rgba(205, 211, 222, 0.2);
    }
    ::-webkit-scrollbar-thumb {
        background: rgba(205, 211, 222, 1);
        -webkit-border-radius: 6px;
        -moz-border-radius: 6px;
        -ms-border-radius: 6px;
        -o-border-radius: 6px;
        border-radius: 6px;
    }
    ::-webkit-scrollbar-thumb:hover {
        -webkit-box-shadow: inset 1px 1px 1px rgba(205, 211, 222, 0.9);
        /* Webkit browsers */
        -moz-box-shadow: inset 1px 1px 1px rgba(205, 211, 222, 0.9);
        /* Firefox */
        -ms-box-shadow: inset 1px 1px 1px rgba(205, 211, 222, 0.9);
        /* IE9 */
        -o-box-shadow: inset 1px 1px 1px rgba(205, 211, 222, 0.9);
        /* Opera(Old) */
        box-shadow: inset 1px 1px 1px rgba(205, 211, 222, 0.9);
        /* IE9+, News */
        background-color: rgba(205, 211, 222, 0.9);
    }
}