﻿
:root {
    --dgv-cell-border-color: silver;
}

.dgv-grid-body {
    display: inline-block;
    border-collapse: collapse;
}

.dgv-container {
    --row-h: 32px;
    /*width: calc(100% - 2px);*/
    border: 1px solid var(--dgv-cell-border-color, #ededed);
    font-family: system-ui;
    user-select: none;
    background-color: gainsboro;
    overflow: auto;
    height: 100%;
}

.dgv-header, .dgv-row {
    display: flex;
    box-sizing: border-box;
    position: relative;
    min-width: max-content;
    height: var(--row-h);
}

.dgv-row {
    border-bottom: 1px solid var(--dgv-cell-border-color, #ededed);
    --bs-gutter-x: 0 !important;
}

    .dgv-row:hover {
        /*background: #fafafa;*/
    }

    .dgv-row.selected {
        background: #cce5ff !important;
        outline: 1px solid #3399ff;
        outline-offset: -1px;
    }
        /*.dgv-row.selected .dgv-cell {
            background: #cce5ff;*/ /* هذا سيجعل الخلايا تأخذ اللون الأزرق الفاتح */
        /*}*/

.dgv-header {
    background: #f2f2f2;
    border-bottom: 1px solid var(--dgv-cell-border-color, #ededed);
    position: sticky;
    top: 0;
    z-index: 50;
    font-weight: 600;
}

.dgv-cell {
    padding: 4px 4px;
    /*border-right: 1px solid #d6d6d6;*/
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    background: white;
    cursor: pointer;
    flex: 0 0 auto;
    box-sizing: border-box;
    position: relative;
}

 

.dgv-resizer {
    position: absolute;
    left: 0;
    top: 0;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
}


input.cell-editor {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 1px;
    margin: 1px;
    font: inherit;
}
