﻿/*Разделитель между столбцов*/
.has-right-delimiter:before {
    position: absolute;
    top: 50%;
    right: 0;
    width: 1px;
    height: 1.6em;
    background-color: rgba(0, 0, 0, 0.06);
    transform: translateY(-50%);
    transition: background-color 0.3s;
    content: '';
    box-sizing: border-box;
}

.has-left-delimiter:before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 1px;
    height: 1.6em;
    background-color: rgba(0, 0, 0, 0.06);
    transform: translateY(-50%);
    transition: background-color 0.3s;
    content: '';
    box-sizing: border-box;
}

.content-before-none::before {
    content: none !important;
}

/*Основаня таблица без скролла =(*/
.report-main-table {
    padding: 8px;
    background-color: white;
    border-radius: 8px;
}

.report-main-table > .search-panel{
    padding-bottom: 12px;
}

    .report-main-table td:has(.parent-td-padding-block-none) {
        padding-block: 0;
    }

    .report-main-table thead th.ant-table-cell {
        border-bottom: 1px solid gray;
        border-top: 1px solid gray;
        padding: 8px;
    }

    .report-main-table thead th.ant-table-cell span {
        line-height: 1.15;
        display: inline-flex;
    }

    .report-main-table tbody td.ant-table-cell {
        line-height: 1.15;
        border-bottom: 1px solid gray;
        padding: 8px;
    }

    .report-main-table .ant-table-content{
        overflow-x: auto;
    }


    .report-main-table .ant-table-body {
        font-weight: normal;
        scrollbar-width: thin;
    }

    /*Основная таблица со скроллом, для работы нужно добавить атрибут ScrollY="max-content" от AntBlazor*/
    .report-main-table.scrollable {
        display: grid;
        height: 100%;
        min-height: 0;
        align-content: flex-start;
        padding: 8px;
        background-color: white;
        border-radius: 8px;
        gap: 12px;
    }

        .report-main-table.scrollable .ant-table-wrapper {
            display: grid;
            min-height: 0;
        }

        .report-main-table.scrollable .ant-spin-nested-loading {
            display: grid;
            min-height: 0;
        }

            .report-main-table.scrollable .ant-spin-nested-loading > div {
                display: grid;
                min-height: 0;
            }

        .report-main-table.scrollable .ant-spin-container {
            display: grid;
            min-height: 0;
        }

        .report-main-table.scrollable .ant-table {
            display: grid;
            min-height: 0;
        }

        .report-main-table.scrollable .ant-table-container {
            display: grid;
            min-height: 0;
        }

div:has(>.report-main-table.scrollable) {
    min-height: 0;
}

/*Fixed самый правый столбец*/
.report-main-table .fixed-right-last-column > .ant-table-container > .ant-table-header > table > thead > tr > th:nth-last-child(2) {
    z-index: 1;
    position: sticky;
    right: 0;
    border-left: 1px solid #f0f0f0;
}

.report-main-table .fixed-right-last-column > .ant-table-container > .ant-table-header > table > thead > tr > th:nth-last-child(3)::before {
    content: none !important;
}

/*Исправляет засвет в заголовке таблицы при горизонтальном скроле*/
.report-main-table.scrollable .report-main-table .fixed-right-last-column > .ant-table-container > .ant-table-header {
    background-color: #fafafa;
}

/*Чтобы на сползали столбцы в заголовке и теле таблицы. Последний столбец таблицы смещён из-за scrollbar*/
.report-main-table.scrollable .fixed-right-last-column > .ant-table-container > .ant-table-header > table > thead > tr > th:nth-last-child(1) {
    display: none;
}

.report-main-table.scrollable .fixed-right-last-column > .ant-table-container > .ant-table-header > table > colgroup > col:nth-last-child(1) {
    display: none;
}

/*Копменсирует scrollbar в теле таблицы*/
.report-main-table.scrollable .fixed-right-last-column > .ant-table-container > .ant-table-header {
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.report-main-table .fixed-right-last-column > .ant-table-container > .ant-table-body > table > tbody > tr:not(.expanded-row):not(:hover) > td:nth-last-child(1) {
    background-color: white;
}

.report-main-table .fixed-right-last-column > .ant-table-container > .ant-table-body > table > tbody > tr:not(.expanded-row) > td:nth-last-child(1) {
    z-index: 1;
    position: sticky;
    right: 0;
    border-left: 1px solid #f0f0f0;
}

/*Fixed left 2-ой столбец*/

.report-main-table .fixed-left-second-column > .ant-table-container > .ant-table-header > table > thead > tr > th:nth-child(2) {
    z-index: 5;
    position: sticky;
    left: 0;
    border-right: 1px solid #f0f0f0;
}

.report-main-table.scrollable .report-main-table .fixed-left-second-column > .ant-table-container > .ant-table-header > table > thead > tr > th:nth-child(2)::before {
    content: none !important;
}

.report-main-table .fixed-left-second-column > .ant-table-container > .ant-table-body > table > tbody > tr:not(.expanded-row):not(:hover) > td:nth-child(2) {
    background-color: white;
}

.report-main-table .fixed-left-second-column > .ant-table-container > .ant-table-body > table > tbody > tr:not(.expanded-row) > td:nth-child(2) {
    z-index: 5;
    position: sticky;
    left: 0;
    border-right: 1px solid #f0f0f0;
}

/*Вложенная таблица*/
.report-inner-table.ant-table {
    margin: 0 !important;
    border-bottom: 1px solid gray;
}

.report-inner-table th {
    text-wrap: nowrap;
}

.report-inner-table tbody tr {
    pointer-events: none;
}

.report-inner-table td:first-child {
    border-left: 1px solid #f0f0f0;
}

.report-inner-table th:first-child {
    border-left: 1px solid #f0f0f0;
}

/*Select*/
div:has(>.max-width-select-dropdown) {
    width: max-content !important;
}

.report-main-table td:has(.report-inner-table){
    border-top: none !important;
}

.report-inner-table th{
    border-top: none !important;
}