/*------------------------------

LAYOUT for tables

---------------------------------- */
.mainContainer {
    max-width: 2000px;
    margin: auto;
    padding-top: 2.5rem;
}

.tableContainer {
    display: block;
    overflow-x: auto;
    padding: 0;
    margin: 0 auto;
    width: auto;

    & table {
        margin: 0 auto;
        overflow: hidden;
        box-shadow: var(--table-container-shadow), var(--table-container-shadow);
    }
}

.tableContainer > table{
    width: 100%;
    border-left: 1px solid rgb(0, 0, 0, 0.1);
    border-right: 1px solid rgb(0, 0, 0, 0.1);
}

.tableContainer td:not(.tableCrudIcons),
.tableContainer th:not(.crudIconsHeaderLeft):not(.crudIconsHeaderRight) {
    padding-left: 1rem;
    white-space: nowrap;
}

.tableContainer th:last-child{
    text-align: center;
}

.tableContainer .import th{
    &:first-child{
        border-top-left-radius: 5px;
    }
    &:last-child{
        border-top-right-radius: 5px;
    }
}

.tableContainer table.driverDetailTable {
    min-width: 1150px;
}

.registrationTable{
    min-width: 1200px;
}

.tableContainer th,
.notificationTable th,
.vehicleDetailTable th {
    background: var(--blue-800);
    color: var(--light-primary);
    text-align: center;
    &:nth-child(2){
        border-top-left-radius: 5px;
    }
    &:last-child{
        border-top-right-radius: 5px;
    }
}

@media (width < 1820px ){
    .tableContainer th,
    .notificationTable th,
    .vehicleDetailTable th {
        &:first-child{
            border-top-left-radius: 5px;
        }
        &:nth-child(2){
            border-top-left-radius: 0;
        }
        &:nth-last-child(2){
            border-top-right-radius: 5px;
        }
    }
}

.vehicleDetailTable th:first-child {
    width: 6rem;
}

.vehicleDetailTable tbody td label{
    margin-left: .5rem;
}

.tableContainer th,
.tableContainer td {
    text-align: center;

    &:first-child {
        text-align: start;
    }
}

.tableItemsStart td,
.tableItemsStart th {
    text-align: start;
}

.detailTable th {
    text-wrap: nowrap;
}

.btn:not(.btn-link) {
    font-size: .75rem;
}

select:not([multiple]) {
    -webkit-appearance: none;
    -moz-appearance: none;
    background-position: right 0.25em center;
    background-repeat: no-repeat;
    background-image: url("../bundles/icons/caret-down-fill-black-Fetq4Vx.svg");
    padding: .5em;
    padding-right: 1.5em;
}

.box {
    box-shadow: var(--box-shadow);
    background: var(--box-background);
    padding: 1.5rem;
}

li.attachments {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
}

/* ------------------------------

Table rows & hover

-------------------------------- */

.listTable tbody tr:hover td{
    transition: background-color 0.2s ease-in-out;
}

.listTable tbody tr:nth-child(odd) td {
    background-color: rgba(234, 234, 234, 0.37);
}

.listTable tbody tr:nth-child(even) td {
    background-color: #ffffff;
}

.listTable tbody tr:nth-child(odd):hover td {
    background-color: rgba(183, 223, 255, 0.44);
}

.listTable tbody tr:nth-child(even):hover td {
    background-color: rgba(182, 222, 255, 0.44);
}

.listTable th:not(:last-child){
    box-shadow: var(--table-border-color-header);
}

.listTable tr td:not(:last-child){
    box-shadow: var(--table-border-color-body);
}

/* ------------------------------

Scrollbar for tables

 ------------------------------- */
.table-responsive {
    max-width: 100dvw;
    overflow-x: auto;

    scrollbar-color: var(--blue-800);
    -ms-overflow-style: auto;
}

.table-responsive::-webkit-scrollbar,
.tableContainer::-webkit-scrollbar,
.scrollbarBox::-webkit-scrollbar {
    width: 10px;
    height: 15px;
}

.table-responsive::-webkit-scrollbar-track,
.tableContainer::-webkit-scrollbar-track,
.scrollbarBox::-webkit-scrollbar-track {
    background-color: #b4b4b4;
    border-radius: 5px;
    height: 50px;
    width: 50px;
    cursor: pointer;
}

.table-responsive::-webkit-scrollbar-thumb,
.tableContainer::-webkit-scrollbar-thumb,
.scrollbarBox::-webkit-scrollbar-thumb {
    background-color: var(--blue-secondary);
    background-image: -webkit-linear-gradient(90deg,
    rgb(7, 80, 143) 0%,
    rgb(8, 44, 117) 25%,
    transparent 100%,
    rgb(3, 4, 79) 75%,
    transparent);
    border-radius: 5px;
    cursor: grab;
}

.table-responsive::-webkit-scrollbar-button:single-button,
.tableContainer::-webkit-scrollbar-button:single-button {
    background-color: var(--blue-secondary);
    border-radius: 5px;
    width: 30px;
    height: 30px;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}

.table-responsive::-webkit-scrollbar-button:vertical:decrement,
.tableContainer::-webkit-scrollbar-button:vertical:decrement {
    background-image: url("../bundles/icons/caret-up-fill-xfu2q8i.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.table-responsive::-webkit-scrollbar-button:vertical:increment,
.tableContainer::-webkit-scrollbar-button:vertical:increment {
    background-image: url("../bundles/icons/caret-down-fill-V2UMdVJ.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.table-responsive::-webkit-scrollbar-button:single-button:horizontal:decrement,
.tableContainer::-webkit-scrollbar-button:single-button:horizontal:decrement {
    background-image: url("../bundles/icons/caret-left-fill-Zk5THLZ.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.table-responsive::-webkit-scrollbar-button:single-button:horizontal:increment,
.tableContainer::-webkit-scrollbar-button:single-button:horizontal:increment {
    background-image: url("../bundles/icons/caret-right-fill-7c6kRHZ.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.table-responsive::-webkit-scrollbar-button:single-button:hover,
.tableContainer::-webkit-scrollbar-button:single-button:hover {
    background-color: var(--blue-700);
}

.crudIconsHeaderLeft{
    display: none;
}

.crudIconsHeaderRight{
    display: table-cell;
}

.tableCrudIcons{
    display: flex;
    justify-content: center;
    gap: .5rem;
}

.tableCrudIcons a {
    height: 28px;
    width: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.crudIconsLeft {
    display: none;
}

@media(width < 1800px){
    .crudIconsHeaderLeft{
        display: table-cell;
    }

    .crudIconsRight,
    .crudIconsHeaderRight{
        display: none;
    }

    .crudIconsLeft{
        display: flex;
        justify-content: center;
    }
}

.noteIcons a{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px !important;
    height: 28px !important;
}
