// tables
.table {
    border-collapse: separate;
    border-spacing: 0px;
}
.table thead:first-child 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-bottom: 1px solid $table-border-color;
    border-right: 0 solid $table-border-color;
    border-top: 1px solid $table-border-color;
}
.table tbody td:first-child, .table thead th:first-child {
    border-left: 1px solid $table-border-color;
}
.table tbody td:last-child, .table thead:first-child tr:first-child th:last-child {
    border-right: 1px solid $table-border-color;
}
.table thead:first-child tr:first-child {
    th:last-child {
        border-radius: 0 0.2rem 0 0;
    }
    th:first-child
    {
        border-radius: 0.2rem 0 0 0;
    }
    th:only-child
    {
        border-radius: 0.2rem 0.2rem 0 0;
    }
}
.table tbody tr:last-child {
    td:first-child {
        border-radius: 0 0 0 0.2rem;
    }
    td:only-child {
        border-radius: 0 0 0.2rem 0.2rem;
    }
    td:last-child {
        border-radius: 0 0 0.2rem 0;
    }
    td {
        border-bottom: 1px solid $table-border-color;
    }
}
.darkmode {
    .table thead:first-child tr:first-child th,
    .table tbody td:first-child, .table thead th:first-child,
    .table tbody td:last-child, .table thead:first-child tr:first-child th:last-child,
    .table tbody tr:last-child td {
        border-color: $table-border-color-darktheme;
    }
    .table thead:first-child tr:first-child th {
        background-image: linear-gradient(to bottom, $table-border-color-darktheme, 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);
    }
}
.darkmode {
    .table-hover tbody tr:hover {
        color: lighten($default-font-color-darktheme, 25%);
    }
}
.dataTables_wrapper.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.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;
        }
    }
}
.darkmode {
    .failedmodule {
        background: #8c2b2b;
        color: #fff;
    }
}

table.fixedheader {
    th {
        position: sticky;
        top: 0px;
        background: white; // prevent transparent during scrolling
    }
}
.darkmode {
    th, table.fixedheader th {
        background: $default-bg-color-darktheme;
    }
}
