.table-wrapper,
.pro-table-wrapper {
    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: var(--text);
        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;
            max-width: 130px;
            overflow: clip;
            text-overflow: ellipsis;

            input {
                max-width: 100% !important;
            }
        }
    }

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

        .selectlike-multi {
            width: max-content;

            .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);
    }

    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: center;
    }

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

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

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

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

            td {
                border-bottom: none;
            }
        }

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

.right {
    text-align: right !important;
}

.centered {
    text-align: center !important;
}

.pagination {
    position: sticky;
    bottom: 0;
    text-align: center;
    background: var(--blocks);
    color: black;
    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-salarie-agr,
.sticky-centre {
    position: sticky;
    background: var(--blocks);
}

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

.sticky-salarie-name {
    left: 0;
}

.sticky-salarie-agr {
    left: 140px;
}

.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 {
    filter: brightness(.9);

    .selectlike-multi__dropdown {
        filter: none;
    }
}

.search-list {
    margin: 20px auto;

    small {
        color: red;
    }
}

.edit-print {
    margin-top: 20px;
}

#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: 100%;
}
