@import "../const.less";

.ant-table {
    color: @black_title;
}

.ant-table-thead {
    background: #222433;
}

.ant-table-tbody > tr > td {
    border-bottom: 1px solid @blue4;
    color: @whiteBF;
}

.ant-table-thead > tr.ant-table-row-hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td,
.ant-table-tbody > tr.ant-table-row-hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td,
.ant-table-thead > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td,
.ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td {
    background: @deriveColor;
}

.ant-table-thead > tr > th .ant-table-header-column {
    color: @whiteBF;
}

.ant-table-footer {
    background-color: #1D1F2E;
    border-top: 0;
    &::before {
        height: 0;
        background: @blue3;
    }
}

.ant-divider {
    background-color: transparent;
}

// 固定表格列时加背景色
.ant-table-fixed-header > .ant-table-content > .ant-table-scroll > .ant-table-body,
.ant-table-fixed-header > .ant-table-content > .ant-table-fixed-right > .ant-table-body-outer > .ant-table-body-inner > .ant-table-fixed,
.ant-table-fixed-header > .ant-table-content > .ant-table-fixed-left > .ant-table-body-outer > .ant-table-body-inner > .ant-table-fixed {
    background-color: @blue2;
}

// 固定表格列时hover添加背景色
.ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td,
.ant-table-tbody > tr.ant-table-row-hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td,
.ant-table-tbody > tr.ant-table-row-selected td,
.ant-table-tbody > tr:hover.ant-table-row-selected > td {
    background: @blue3;
    color: @whiteBF;
}
// 自带分页 样式设置
.ant-table-wrapper {
    background: @blue2;
    .ant-spin-container {
        > .ant-table-pagination {
            background: #1D1F2E;
        }
    }
}

// 固定表格高度(footer实现分页）
.dt-table-fixed-contain-footer {
    .ant-table-wrapper, &.ant-table-wrapper {
        background: @blue2;
        .ant-spin-nested-loading {
            .ant-spin-container {
                .ant-table-fixed-header {
                    .ant-table-content {
                        .ant-table-scroll {
                            .ant-table-body {
                                background-color: @blue2;
                            }
                        }
                        .ant-table-placeholder {
                            color: #BFBFBF;
                            background-color: @blue2;
                        }
                    }
                }
                .ant-table-footer {
                    background-color: #1D1F2E;
                    border-top: 0;
                    &::before {
                        height: 0;
                        background: @blue3;
                    }
                }
            }
        }
    }
}

// 固定表格高度(自带分页）没有 border
.dt-table-fixed-base-no-border {
    &.ant-table-wrapper, .ant-table-wrapper {
        border: none;
    }
}
// 固定表格高度(自带分页）有 border
.dt-table-fixed-base, .dt-table-fixed-base-no-border {
    &.ant-table-wrapper, .ant-table-wrapper {
        background: @blue2;
        .ant-spin-nested-loading {
            .ant-spin-container {
                .ant-table-fixed-header {
                    .ant-table-content {
                        .ant-table-scroll {
                            .ant-table-body {
                                background-color: @blue2;
                            }
                        }
                        .ant-table-placeholder {
                            background-color: @blue2;
                        }
                    }
                }
            }
        }
    }
}

// 表格添加外边框
.dt-table-border {
    border: 1px solid @black_border;
}

// size为small的边框设置
.ant-table-small > .ant-table-content .ant-table-placeholder, .ant-table-small > .ant-table-content .ant-table-row:last-child td {
    border-bottom: 1px solid @blue4;
}
