﻿.c-table .cols {
    font-weight: bold;
}

.c-table span, .c-table a {
    word-break: break-word;
}

.c-table {
    /*    min-width: 100%;
    overflow-y:hidden;*/
}

    .c-table .cols {
        display: flex;
        flex-wrap: wrap;
    }

    .c-table .cols, .c-table .rows .item {
        padding: 0.7rem 1.5rem
    }

.item.custom-selectable {
    cursor: pointer;
}

.c-table .rows .item:not(:first-child) {
    border-top: .5px solid #f2f2f2;
}

.c-table .item > div.clicked {
    background-color: rgba(0, 0, 255, 0.5) !important;
    color: white;
}


.c-sm-table .cols, .c-sm-table .rows .item {
    padding: 0.3rem 0.6rem;
    width: 100%;
}

.c-sm-table button, .c-sm-table .c-btn, .c-table .JustIcon {
    padding: 0.35rem 0.55rem !important;
}

.c-sm-table .cols {
    background-color: #f2f2f2 !important;
}

.c-sm-table {
    border: 1px solid #f2f2f2;
    /*    overflow-x:hidden;*/
}

    .c-sm-table .cols span, .c-sm-table .rows .item span {
        font-size: 12px;
    }

    .c-sm-table .cols .rows .item > div > button {
        padding: 0.1rem 0.4rem !important
    }

    .c-sm-table.supersmall .cols, .c-sm-table.supersmall .rows .item {
        padding: 0rem 0.6rem;
    }

.c-table .item {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    /*    margin-top:0.2rem;*/
    align-items: center;
    position: relative;
}

    .c-table .item.warning {
        background-color: orange !important;
    }

    .c-table .item.blacklist {
        color: #FFF !important;
        background-color: rgba(0, 0, 0, 0.7) !important;
    }

    .c-table .item > div, .c-table .cols > div {
        /* Remove flex: 1 1 0 */
        padding-right: .25rem;
        box-sizing: border-box; /* Ensure padding is included in width */
        min-width: 50px; /* Minimum width to prevent collapsing */
        width: auto; /* Let JavaScript set initial widths */
        padding: 0 0.2rem;
    }

/*    .c-table > .cols > div {
        overflow:hidden !important;
        white-space:nowrap;
    }*/

    .c-table > .cols > div {
        overflow:clip !important;
    }

/*    .c-table .item > div, .c-table .cols > div {
        flex: 1 1 0;
        padding-right: .25rem;
    }*/
/*
.c-sm-table .item > div, .c-sm-table .cols > div {
    flex: 1 1 0;
    padding: 0 0.2rem;
}*/


.report-container .c-table .cols > div:not(.ribbon), .report-container .c-table .rows .item > div:not(.ribbon) {
    min-width: unset !important;
}

.report-container .c-sm-table .item > div, .report-container .c-sm-table .cols > div {
    white-space: unset !important;
}

.c-sm-table .item > div:not(.tooltip-container), c-sm-table .cols > div:not(.tooltip-container) {
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
}



.c-table.c-sm-table > div, .c-table.c-sm-table .cols > div {
    line-height: 1;
}

/*.c-table.c-sm-table > div, .c-table.c-sm-table .cols > div {*/
/*    scrollbar-gutter: stable;*/
/*overflow-x: hidden;
    overflow-y: hidden;
}*/


.c-table .cols, .c-table .rows .item {
    background-color: #FFF;
    -webkit-box-shadow: 0px 0px 4px -3px rgba(0,0,0,0.55);
    -moz-box-shadow: 0px 0px 4px -3px rgba(0,0,0,0.55);
    box-shadow: 0px 0px 4px -3px rgba(0,0,0,0.55);
}




/*
    .c-table .cols .wide, .c-table .rows .wide {
        flex: 3 !important;
    }

    .c-table .cols .narrow, .c-table .rows .narrow {
        flex: .5 !important;
    }

    .c-table .cols .medium, .c-table .rows .medium {
        flex: .75 !important;
    }*/

.item .actions {
    overflow: visible !important;
}



.c-table .actions button:not(:first-child, .custom-dropdown-select-button), .c-table .actions a:not(:first-child, .custom-dropdown-select-button) {
    margin-left: 0.5rem;
}

.c-sm-table .actions button:not(:first-child, .custom-dropdown-select-button), .c-sm-table .actions a:not(:first-child, .custom-dropdown-select-button) {
    margin-left: 0.2rem !important;
}

/*.c-table .cols > div:not(.ribbon), .c-table .rows .item > div:not(.ribbon) {
    min-width: 120px !important;
}

.c-table.addition .cols > div:not(.ribbon), .c-table.addition .rows .item > div:not(.ribbon) {
    min-width: unset !important;
}*/


/*.c-table .cols > div.wide, .c-table .rows .item > div.wide {
    min-width: 200px !important;
}

.c-table .cols > div.medium-wide, .c-table .rows .item > div.medium-wide {
    min-width: 160px !important;
}*/


/*.c-table .cols > div.narrow:not(.ribbon), .c-table .rows .item > div.narrow:not(.ribbon) {
    min-width: 60px !important;*/
    /*    max-width:60px !important;*/
/*}

.c-table .cols > div.medium:not(.ribbon), .c-table .rows .item > div.medium:not(.ribbon) {
    min-width: 85px !important;*/
    /*  max-width:85px !important;*/
/*}*/

/*.c-table.limited-width .cols > div, .c-table.limited-width .rows .item > div {
    max-width: 120px !important;
}

.c-table.limited-width .cols > div.wide:not(.ribbon), .c-table.limited-width .rows .item > div.wide:not(.ribbon) {
    max-width: 200px !important;
}

.c-table.limited-width .cols > div.narrow, .c-table.limited-width .rows .item > div.narrow {
    max-width: 60px !important;
}

.c-table.limited-width .cols > div.medium, .c-table.limited-width .rows .item > div.medium {
    max-width: 85px !important;
}


.c-table.limited-width .cols > div.medium, .c-table.limited-width .rows .item > div.medium {
    max-width: 90px !important;
}*/

    /*.c-table .cols > div.medium:not(.ribbon), .c-table .rows .item > div.medium:not(.ribbon) {
    min-width: 80px !important;
}

*/

/*.c-table .cols > div {
    display:flex;
}

.c-table .cols > div > span {
    flex:1;
}*/

.c-table-container {
    max-width: 100%;
    display: flex;
    overflow: auto;
    position: relative;
    padding-bottom: 15px;
}

    .c-table-container .item,
    .c-table-container .rows,
    .c-table-container .c-table,
    .c-table-container .c-sm-table {
        position: unset !important;
    }

/*    .c-table-container.limited-width .item .actions  {
        position:relative !important;
    }
*/
        .c-table-container .c-table.limited-width {
            width: auto; /* Allow table to grow with column widths */
        }

.c-table .cols > div,
.c-table .summary-cols > div,
.c-table .rows .item > div {
    padding: 0 .25rem 0 .15rem; /* Match your updated padding */
    margin: 0; /* Remove any margins */
    box-sizing: border-box;
    min-width: 50px; /* Default, overridden in JS for .limited-width */
    width: auto;
    position: relative; /* Needed for pseudo-element positioning */
}

    .c-table .rows .item > div:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 2px;
        height: 100%;
        background: #ddd; /* Mimic border color */
        z-index: 5; /* Below resize-handle */
    }

    .c-table .cols > div:last-child,
    .c-table .summary-cols > div:last-child,
    .c-table .rows .item > div:last-child {
        width: 14px;
        min-width: 14px;
        max-width: 14px;
        flex: none;
        padding: 0; /* No padding for action column */
    }

    .c-table .cols > div > .resize-handle,
    .c-table .summary-cols > div > .resize-handle {
        position: absolute;
        top: 0;
        right: 0; /* Align with pseudo-element */
        width: 2px; /* Match pseudo-element width */
        height: 100%;
        background: rgba(0,0,0,0.25);
        cursor: col-resize;
        z-index: 10;
    }

        .c-table .cols > div > .resize-handle:hover,
        .c-table .summary-cols > div > .resize-handle:hover {
            background: rgba(0,0,0,0.3);
        }


.c-table .cols > div,
.c-table .summary-cols > div {
    position: relative;
}

.c-table .cols,
.c-table .summary-cols,
.c-table .rows .item {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
}

.c-sm-table .item > div:not(.tooltip-container),
.c-sm-table .cols > div:not(.tooltip-container),
.c-sm-table .summary-cols > div:not(.tooltip-container) {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.reset-widths-btn {
    padding: 5px 10px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

    .reset-widths-btn:hover {
        background-color: #e0e0e0;
    }

.summary-cols > div {
    border-right: 2px solid rgba(0,0,0,.25);
}
