@use "./_variables.scss" as *;
@use "../core/_index.scss" as *;
@use "@progress/kendo-theme-core/scss/components/grid/_layout.scss" as *;


@mixin kendo-grid--layout() {

    @include kendo-grid--layout-base();

    // Grid
    .k-grid {

        .k-table .k-group-footer td,
        .k-table .k-group-footer .k-table-td {
            border-block-start-width: 0;
        }

        .k-command-cell .k-button {
            @include box-shadow( none );
        }
    }

    // Grid header
    .k-grid-header {

        .k-table-th {
            font-weight: var( --kendo-font-weight-semibold, 600 );

            .k-grid-filter {
                font-weight: var( --kendo-font-weight-normal, 400 );
            }
        }

        .k-grid-filter,
        .k-header-column-menu,
        .k-grid-header-menu  {
            border-radius: k-border-radius( md );
        }

        .k-resizable-columns .k-table-th:not(.k-group-cell) {
            border-inline-end-width: 1px;
            border-inline-end-style: solid;
        }

        .k-resizable-columns .k-resize-handle .k-resize-handle-inner {
            width: 1px;
            height: 100%;
            cursor: col-resize;
        }
    }

    .k-grid-footer {
        td,
        .k-table-td {
            border-block-end-width: 0;
        }
    }

    .k-cell-inner {
        .k-grid-filter,
        .k-header-column-menu,
        .k-grid-header-menu,
        .k-hierarchy-cell .k-icon {
            line-height: normal;
        }
    }

    .k-resize-handle:hover .k-resize-handle-inner {
        width: 1px;
        height: 100%;
    }

    .k-column-resizer:hover::after {
        display: block;
        content: "";
        height: 100%;
        border-inline-end: 2px solid currentColor;
    }

    .k-reorder-cue {
        margin-inline-start: -1px;
        width: 2px;
    }

    .k-column-menu .k-menu:not(.k-context-menu) {

        .k-item {
            & > .k-link::before {
                content: none;
            }
        }

        &.k-menu-vertical {
            & > .k-item + .k-item {
                margin-block-start: 0;
            }
        }
    }

}
