/**
* DevExtreme (widgets/common/dataGrid.less)
* Version: 20.1.2
* Build date: Mon Apr 06 2020
*
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
@import (once) "./gridBase.less";

.grid-base(datagrid);

.dx-datagrid {
    position: relative;
    cursor: default;
    white-space: normal;
    line-height: normal;
}

.dx-hidden.dx-group-cell {
    display: table-cell !important; // stylelint-disable-line declaration-no-important
    font-size: 0 !important; // stylelint-disable-line declaration-no-important
}

.dx-group-panel-item() {
    display: inline-block;
    min-width: 30px;
    margin-right: 10px;
    white-space: nowrap;

    .dx-sort {
        margin-left: 6px;
    }
}

.dx-datagrid-group-panel {
    display: inline-block;
    white-space: nowrap;
    width: 100%;
    touch-action: pinch-zoom;

    .dx-group-panel-message {
        .dx-overflow();
    }

    .dx-group-panel-item {
        .dx-group-panel-item();
    }

    .dx-block-separator {
        .dx-group-panel-item();

        color: transparent;
        position: relative;
        min-width: 0;
    }
}

.dx-datagrid-rowsview {
    .dx-row.dx-group-row {
        td {
            border-top: 1px solid;
            border-bottom: 1px solid;
        }
    }

    .dx-row.dx-group-row:first-child {
        td {
            border-top: none;
        }
    }

    .dx-group-row {
        &:focus {
            outline: 0;
        }

        &.dx-row > td {
            border-left-color: transparent;
            border-right-color: transparent;
        }
    }

    .dx-adaptive-detail-row {
        .dx-field-item-content:focus {
            outline: none;
        }
    }
}

.dx-datagrid-group-opened,
.dx-datagrid-group-closed {
    cursor: pointer;
    position: relative;

    &:before {
        position: absolute;
        display: block;
        right: 0;
        left: 0;
    }
}

.dx-rtl {
    .dx-datagrid-group-closed {
        .flip-horizontally();
    }

    .dx-datagrid-content .dx-datagrid-table {
        .dx-group-row.dx-row.dx-column-lines > td {
            border-left: none;
            border-right: none;
        }
    }

    .dx-datagrid-group-panel {
        .dx-group-panel-item,
        .dx-block-separator {
            margin-right: 0;
            margin-left: 10px;
        }

        .dx-sort {
            margin-left: 0;
            margin-right: 6px;
        }
    }
}
