﻿.cmn-waiting-container {
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    background-color: #00000044;
    z-index: 10000;
}

.cmn-waiting-spinnerdiv {
    top: calc(50% - 100px);
    position: relative;
    width: 200px;
    margin: auto;
    /*backdrop-filter: blur(4px);
      background: #ffffffbb;
    */
    background: #ffffff;
    height: auto;
    padding: 25px;
    border-radius: 10px;
    /*border: 2px solid #00000011;*/
    color: #2d4b5b;
    font-weight: bold;
    font-size: 13px;
}


/*.table-wrapper {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border: 1px solid #ccc;
    font-family: sans-serif;
}

.grid-scroll-body {
    overflow-y: auto;
    position: relative;
    flex: 1;
}

.grid-inner {
    position: relative;
    width: 100%;
}

.grid-row {
    position: absolute;
    left: 0;
    right: 0;
    display: block;
    height: 30px;
}

    .grid-row table {
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
    }

.gridWidget {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

    .gridWidget th,
    .gridWidget td {
        padding: 4px 6px;
        border: 1px solid #ddd;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        background: white;
    }

    .gridWidget thead th {
        background: #f0f0f0;
        position: sticky;
        top: 0;
        z-index: 2;
    }

    .gridWidget thead .filter-row input {
        width: 100%;
        box-sizing: border-box;
    }

    .gridWidget thead .batch-edit-row input,
    .gridWidget thead .batch-edit-row select {
        width: 100%;
        box-sizing: border-box;
    }

    .gridWidget .sort-arrow {
        float: right;
        margin-left: 5px;
    }

        .gridWidget .sort-arrow.asc::after {
            content: '▲';
        }

        .gridWidget .sort-arrow.desc::after {
            content: '▼';
        }

.grid-row.selected table {
    background-color: #cce5ff;
    transition: background-color 0.2s ease-in-out;
}

.grid-row:hover table {
    background-color: #f5faff;
}

th .resizer {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: col-resize;
    background-color: transparent;
    z-index: 10;
}

th .resizer:hover {
    background-color: rgba(0, 0, 0, 0.1);
}


th {
    position: relative;
}*/



/*.table-wrapper {
    overflow: auto;*/
    /*margin: 10px;*/
    /*border-radius: 8px;
    flex: 1;
    background: #f2f2f2;
}*/

        .table-wrapper tbody input[type=text], .table-wrapper tbody input[type=date] {
            width: 100%;
            background-color: #98b8cb;
            border: 0px solid transparent;
            color: #243a51;
            box-sizing: border-box;
            padding: 3px;
            
        }

        .table-wrapper tbody select {
            width: 100%;
            background-color: #98b8cb;
            border: 0px solid transparent;
            color: #243a51;            
            box-sizing: border-box;
            padding: 3px;
            height: auto;
        }

    .table-wrapper thead tr.batch-edit-row input[type=text], .table-wrapper thead tr.batch-edit-row input[type=date] {
        width: 100%;
        background-color: #ffffffaa;
        color: #2d4b5b;
        border: 0px solid transparent;
        box-sizing: border-box;
        padding: 5px;
    }

    .table-wrapper thead tr.batch-edit-row select {
        width: 100%;
        background-color: #ffffffaa;
        color: #2d4b5b;
        border: 0px solid transparent;
        box-sizing: border-box;
        padding: 5px;
    }
    
    .table-wrapper tbody tr {
        height: 35px;
    }

        .table-wrapper tbody tr td {
            text-overflow: ellipsis;
            overflow: hidden;
        }

    /*.table-wrapper tbody tr:nth-child(even) {
        background-color: #f5f5f5;
    }    

    .table-wrapper tbody tr:nth-child(odd) {
            
    }*/

    .table-wrapper col {
        width: auto;
    }

.editmenu {
    display: flex;
    margin: 10px;
    height: 34px;
}

.grid-container {
    /*width: 1800px;*/
    /*width: auto;*/
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border-collapse: collapse;
    margin: 0px;
    display: table;
    table-layout: fixed;
    /*grid-template-columns: repeat(3, 1fr);*/ /* 3 columns of equal width */
    /*gap: 10px;*/ /* Space between rows and columns */
    /*margin: 20px;*/
    /*padding: 10px;*/
    border: 1px solid #ccc;
    background-color: #f9f9f9;
}

    .grid-container thead {
        position: sticky;
        top: 0px;
        background-color: #f1f1f1;
        box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.4);
        transform: translateY(-1px);
    }

    .grid-container thead tr {
        outline: 1px solid #f1f1f1;
    }

    .grid-container th, .grid-container td {
        border: 1px solid #ddd;
        padding: 4px 6px 4px 6px;
        text-align: left;
        font-size: 11px;
    }

    .grid-container th {
        cursor: pointer;
        position: relative;
        text-overflow: ellipsis;
        overflow: hidden;
        box-sizing: border-box;
    }

    .grid-container th .resizer {
        width: 5px;
        height: 100%;
        position: absolute;
        right: 0;
        top: 0;
        cursor: ew-resize;
        user-select: none;
        /*background-color: red;*/
    }

    .grid-container .resizing-column {
        background-color: #f0f0f0;
    }

    .cell-invalid {        
        background-color: #ffebee; /* svagt röd bakgrund */
    }

    .editing select.cell-invalid {
        border-color: #e53935;
    }

    .grid-container th .sort-arrow {
        position: absolute;
        right: 12px;
        display: inline-block;
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
    }

    .grid-container th .sort-arrow.asc {
        border-bottom: 5px solid #000;
        top: 50%;
        transform: translateY(-50%);
    }

    .grid-container th .sort-arrow.desc {
        border-top: 5px solid #000;
        top: 50%;
        transform: translateY(-50%);
    }

    .filter-row input {
        width: 100%;
        box-sizing: border-box;
    }

    /*.selected {
        background-color: #82a3b9;
        color: white;
    }   */

    .editing {
        background-color: #82a3b9 !important;
    }

    .batch-edit-row {
        /*background-color: #f0f0f0;*/
        /*border-top: 2px solid #333;*/
    }

    .selected {
        background-color: #82a3b9;
        color: white;
    }

    /*.table-wrapper tbody tr:nth-child(odd).selected {
        background-color: #82a3b9bb;
        color: #243a51;
    }

    .table-wrapper tbody tr:nth-child(even).selected {
        background-color: #82a3b9aa;
        color: #243a51;
    }*/

    /*tr.selected td.db-pending {*/
        /* Exempel: lite mörkare gul när vald */
        /*background-color: #fff1b5;
    }

    tr.selected.editing td.db-pending::after {
        content: "";        
    }

    .db-pending {
        position: relative;
        background-color: #fff8e1;*/ /* ljusgul bakgrund */
    /*}

    .db-pending::after {
        content: "●";
        color: #f39c12;
        position: absolute;
        top: 4px;
        right: 4px;
        font-size: 0.6em;
        z-index: 0;
    }*/
/*
    .db-pending input, .db-pending select {
        background-color: #d7d2a688 !important;
    }*/

    .db-pending[data-old]:hover::before {
        content: attr(data-old);
        position: absolute;
        bottom: 100%;
        right: 0;
        background: #333;
        color: #fff;
        padding: 4px 8px;
        border-radius: 4px;
        white-space: nowrap;
        z-index: 10;
    }

.ui-overlay-window {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 10001;
    border-radius: 0;
    /* Ta bort eventuella box-shadow om du vill */
}

.ui-overlay-window-content {
    width: 100%;
    height: 100%;
    overflow: auto;
    box-sizing: border-box;    
}
