// tables
.table {
    border-collapse: separate;
    border-spacing: 0px;
    border-radius: 0.2rem;
    border: 1px solid $table-border-color;
    thead, tbody, tfoot, tr, th, td {
        border-style: none;
    }
    th, td {
        vertical-align: middle;
    }
    td {
        border-top: 1px solid $table-border-color;
    }
    thead tr:first-child th {
        background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.0) 0%, rgba(0, 0, 0, 0.13)) !important;
        box-shadow: inset 0 1px 0 0 #fff;
        border: none;
    }
}
[data-bs-theme="dark"] {
    .table, .table td {
        border-color: $table-border-color-dark;
    }
    .table thead tr:first-child th {
        background-image: linear-gradient(to bottom, $table-border-color-dark, rgba(255,255,255,0.13)) !important;
        box-shadow: none;
    }
}
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.03);
}
.table-hover {
    > tbody > tr,
    > tbody > tr > th,
    > tbody > tr > td {
        @include transition(all 0.2s);
    }
}
[data-bs-theme="dark"] .table-hover tbody tr:hover {
    color: lighten($default-font-color-dark, 25%);
}
.dt-container.container-fluid {
    padding-left: 0px;
    padding-right: 0px;
}
.infotbl td {
    padding: 0.4rem;
}
.infotbl img {
    padding-right: 3px;
}
.noborder, .noborder tr, .noborder td {
    border: none;
}
.table tbody tr {
    td.links {
        padding-top: 3px;
        padding-bottom: 3px;
    }
    td.result {
        vertical-align: middle;
        text-align: center;
    }
}
table.settings-table tr td span {
    white-space: pre-wrap;
    word-break: break-word;
}
table.dataTable {
    td.name {
        text-align: left;
    }
    td.test {
        text-align: left;
    }
    label {
        font-weight: normal;
    }
}
table.admintable {
    td {
        max-width: 10em;
        word-wrap: break-word;
    }
    td.editable {
        text-align: right;
    }
    .key-value-pair .key {
        font-weight: bold;
    }
    input[type="text"], textarea {
        width: 100%;
        box-sizing: border-box;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
    }
    input[type="text"].key {
        width: 8em;
    }
    input[type="text"].value {
        width: 10em;
    }
    textarea {
        height: 100%;
        min-width: 10em;
    }
}

table.overview {
    td {
        text-align: left;
    }
    td.name {
        padding-top: .5em;
        padding-bottom: .5em;
        text-overflow: ellipsis;
        overflow-x: hidden;
    }

    .failedmodule {
        background-color: #F7E1E1;
        padding: 3px;
        margin-right: 1ex;
        border-radius: 3px;
        border: 2px solid #D98A8A;
        @include media-breakpoint-down(sm) {
            display: none;
        }
        span {
            word-wrap: break-word;
        }
    }
}
[data-bs-theme="dark"] .failedmodule {
    background: #8c2b2b;
    color: #fff;
}

table.fixedheader {
    th {
        position: sticky;
        top: 0px;
        background: white; // prevent transparent during scrolling
        z-index: 5; // prevent buttons from being displayed on header when scrolling
    }
}
[data-bs-theme="dark"] {
    th, table.fixedheader th {
        background: $default-bg-color-dark;
    }
}
