.table-wrapper,
.pro-table-wrapper {
    width: 100%;
    min-height: 250px;
    height: fit-content;
    max-height: 100%;
    overflow: auto;
    box-sizing: border-box;

    * {
        font-size: .7rem;
    }
}

.table-wrapper {
    border-radius: 10px;
    border: 2px solid var(--cts-main);
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;

    thead {
        position: sticky;
        top: 0;
        background: var(--cts-main);
        color: white;
        text-align: center;
        z-index: 2;

        tr {
            box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);

            th {
                padding: 5px;
            }
        }
    }

    &:not(.voitures-list) {
        td:not(.td-centres-selectlike),
        th:not(.td-centres-selectlike) {
            width: fit-content;
            overflow: clip;
            text-overflow: ellipsis;
        }
    }

    .td-centres-selectlike {
        width: 100% !important;

        .selectlike-multi {
            min-width: max-content;
            width: 100%;

            .selectlike-multi__dropdown {
                left: 0;
                right: unset;
                width: max-content !important;
            }
        }
    }

    th.sorted-asc::after {
        content: ' ↑';
    }

    th.sorted-desc::after {
        content: ' ↓';
    }

    tr:not(.recap) td {
        background: var(--blocks);
        color: var(--main-text);
    }

    td {
        border: 1px solid var(--cts-main-light);
        padding: 5px 10px;

        &:first-child {
            border-left: none;
        }

        &:last-child {
            border-right: none;
        }

        &.table-action {
            width: fit-content;
            max-width: 100%;
            box-sizing: border-box;
            text-align: center;

            * {
                display: inline-block;
                margin: 0 5px;
            }
        }
    }

    .int-row {
        text-align: right;
    }

    .total {
        background: var(--cts-main-light);
        font-weight: bold;
    }

    .total-row {
        background: var(--cts-main-light);
        color: var(--main-text);
        font-weight: bold;
        text-align: center;

        &.societe {
            background: var(--cts-alt);
            color: white;
        }

        &.global {
            background: var(--cts-main);
            color: white;
            position: sticky;
            bottom: 0;

            td {
                border-bottom: none;
            }
        }

        &.total {
            background: var(--cts-main-light);
        }
    }
}

.pagination {
    position: sticky;
    bottom: 0;
    text-align: center;
    background: var(--blocks);
    color: var(--main-text);
    padding: 5px 0;
    font-size: .8em;

    a {
        color: var(--cts-main);
        text-decoration: none;
        font-weight: bold;
        margin: 0 5px;

        &:hover {
            color: var(--cts-alt);
        }
    }
}

.sticky-salarie-name,
.sticky-centre {
    position: sticky;
    background: var(--blocks);
}

th.sticky-salarie-name {
    background: var(--cts-main);
}

.sticky-salarie-name {
    left: 0;
    max-width: fit-content !important;
}

.sticky-centre {
    left: 0;
}

th.sticky-centre {
    background: var(--cts-main);
}

td.sticky-centre.total {
    background: var(--cts-main-light);
}

.sticky-societe,
.sticky-total {
    position: sticky;
    left: 0;
}

.sticky-societe {
    background: var(--cts-alt);
}

.sticky-total {
    background: var(--cts-main);
}

tbody tr:not(.recap):hover {
    background: rgba(0, 0, 0, 0.04);
}

.dark tbody tr:not(.recap):hover {
    background: rgba(255, 255, 255, 0.06);
}

.list-container {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    height: fit-content;
    max-height: 80vh;
    border-radius: 10px;
    box-sizing: border-box;
}

.search-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    position: absolute;
    bottom: 100%;
    margin-bottom: 10px;

    small {
        color: red;
    }
}

#cts-voitures-results,
#cts-salaries-results,
#cts-societes-results,
#cts-centres-results,
#cts-voitures-uneditable-results,
#cts-salaries-uneditable-results,
#cts-societes-uneditable-results,
#cts-centres-uneditable-results {
    width: 100%;
    height: fit-content;
    max-height: 80vh;
    overflow: auto;
}

.pagination-nav {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    .disabled {
        color: grey;
        pointer-events: none;
    }
}

.edit-encours {
    padding: 15px;
}

.encours-table * {
    text-wrap: wrap;
    min-width: 90px;
    max-width: 200px !important;
    text-overflow: unset !important;
}
