.table-wrapper {
    max-height: 100%;
    overflow: auto;
    border-radius: 10px;
    border: 2px solid var(--cts-main);
    box-sizing: border-box;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9em;
    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;
            }
        }
    }

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

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

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

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

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

        &.table-action {
            text-align: center;
        }
    }

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

    .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);
            position: sticky;
            bottom: 0;
        }
    }
}

.pagination {
    position: sticky;
    bottom: 0;
    text-align: center;
    background: var(--cts-alt);
    padding: 5px 0;

    a {
        color: black;
        text-decoration: none;
        font-weight: bold;
        margin: 0 5px;

        &:hover {
            color: var(--blocks);
        }
    }
}
