
/* Windows Forms / FarPoint Classic
   HTML: <div class="data-grid"><table>...</table></div>
   The DIV owns scrolling.
*/

.data-grid {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    overflow-x: auto;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    scrollbar-width: auto;
    scrollbar-color: auto;
    background: #fafafa;
    border: 1px solid #808080 !important;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    font-family: 'Malgun Gothic', 'Gulim', Arial, sans-serif;
    font-size: 14.3px;
    color: #111;
}

/* Scrollbar */
.data-grid::-webkit-scrollbar {
    width: 17px;
    height: 17px;
}

.data-grid::-webkit-scrollbar-track {
    background: #eeeeee;
    border-left: 1px solid #aaa;
    box-shadow: inset 1px 1px 0 #d0d0d0;
}

.data-grid::-webkit-scrollbar-thumb {
    background: #d4d4d4;
    background-image: none;
    border-top: 1px solid #ffffff;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #888888;
    border-bottom: 1px solid #888888;
    border-radius: 0;
    box-shadow: inset 1px 1px 0 #f5f5f5, inset -1px -1px 0 #b3b3b3;
}

.data-grid::-webkit-scrollbar-thumb:active {
    background: #bfbfbf;
    background-image: none;
    box-shadow: inset 1px 1px 0 #aaaaaa, inset -1px -1px 0 #eeeeee;
}

.data-grid::-webkit-scrollbar-corner {
    background: #eeeeee;
}

/* Table */
.data-grid > table {
    min-width: 0;
    max-width: none;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    font-family: inherit;
    font-size: 14.3px;
	width: max-content;
}

/* Header */
.data-grid > table > thead > tr > th {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 26px;
    padding: 0 4px;
    box-sizing: border-box;
    background: #ececec;
    background-image: none;
    color: #222;
    font-size: 15.4px;
    font-weight: normal;
    text-align: center;
    vertical-align: middle;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #999;
    border-bottom: 1px solid #999;
    box-shadow: inset 1px 1px 0 #f8f8f8, inset -1px -1px 0 #c0c0c0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
    -webkit-user-select: none;
}

/* Data Cell */
.data-grid > table > tbody > tr > td {
    height: 23.1px;
    padding: 0 4px;
    box-sizing: border-box;
    background: #fff;
    color: #111;
    font-size: 14.3px;
    font-weight: normal;
    line-height: 21px;
    text-align: left;
    vertical-align: middle;
    border-right: 1px solid #d0d0d0;
    border-bottom: 1px solid #d0d0d0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
    -webkit-user-select: none;
}

.data-grid > table > tbody > tr.deleted td {
    color: #888;
    text-decoration: line-through;
}

.data-grid > table > tbody > tr.deleted td:last-child {
    text-decoration: none;
}

.data-grid > table > tbody > tr > td.grid-left {
    text-align: left;
}

.data-grid > table > tbody > tr > td.grid-center {
    text-align: center;
}

.data-grid > table > tbody > tr > td.grid-right {
    text-align: right;
}

/* Selected Row */
.data-grid > table > tbody > tr.selected > td {
    background: #b3d3ec;
    color: #111;
    border-top: 1px dotted #555;
    border-bottom: 1px dotted #555;
}

.data-grid > table > tbody > tr.selected > td:first-child {
    border-left: 1px dotted #555;
}

.data-grid > table > tbody > tr.selected > td:last-child {
    border-right: 1px dotted #555;
}

/* Menu Cell */
.data-grid > table > tbody > tr > td.menu-cell {
    padding: 0;
    text-align: center;
    background: #e5e5e5 !important;
    color: #222 !important;
    box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #aaa;
    cursor: pointer;
}

.data-grid > table > tbody > tr.selected > td.menu-cell {
    background: #e5e5e5 !important;
    color: #222 !important;
}

/* Hover */
.data-grid > table > tbody > tr:hover > td {
    background: #e8f2fb;
}

.data-grid > table > tbody > tr.selected:hover > td {
    background: #b3d3ec;
}

.data-grid > table > tbody > tr:hover > td.menu-cell {
    background: #e5e5e5 !important;
}

/* Scroll */
.data-grid tbody tr {
    scroll-margin-top: 26px;
}
