﻿/*Разделитель между столбцов*/
.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;
}

/*Основная таблица*/
.reporting-main-table {
    display: grid;
    align-content: flex-start;
    padding: 8px;
    background-color: white;
    border-radius: 8px;
    gap: 12px;
}

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

    .reporting-main-table thead th {
        border-bottom: 1px solid gray !important;
        border-top: 1px solid gray !important;
    }

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

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

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

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

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

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

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

/*div:has(>.reporting-main-table) {
    overflow-y: clip !important;
}*/

/*Fixed самый правый столбец*/
.reporting-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;
}

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

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

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

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

/*Копменсирует scrollbar в теле таблицы*/
.reporting-main-table .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;
}

.reporting-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;
}

.reporting-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-ой столбец*/

.reporting-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;
}

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

.reporting-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;
}

.reporting-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;
}
