/* Table Formatting */

.div-table {
    margin-left: 1.3em;
    margin-right: 1.3em;
    /* overflow-x: auto; */
    /* width: 95%; */
    max-height: 32em;
    overflow-y: auto;
    border: 2px solid #000000;
}

.table-sortable {
    border-collapse: collapse;
}

/* Header Formatting/Logic */

.table-sortable thead {
    background-color: #337ab7;
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: inset 0 1px 0 #000000, inset 0 -1px 0 #000000;
}

body.dark-mode .table-sortable thead {
    background-color: #133a6e;
}

.table-sortable th {
    cursor: pointer;
    width: fit-content;
    border-collapse: collapse;
    /* overflow-y: auto; */
    font-size: 0.8em;
    padding: 0.5em;
    text-align: left;
}

table tbody tr:not(:last-child) {
    border-bottom: 2px solid #000000;
}

/* Row Coloring */

table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

body.dark-mode table tbody tr:nth-child(odd) {
    background-color: #1c1c21;
}

table tbody tr:nth-child(even) {
    background-color: #f0f0f0;
}

body.dark-mode table tbody tr:nth-child(even) {
    background-color: #292929;
}

td {
    padding: 0.5em;
}

td:not(:first-child):not(:nth-child(2)):not(.cell-description) {
    border-left: 1px solid #e0e0e0;
}

body.dark-mode td:not(:first-child):not(:nth-child(2)):not(.cell-description) {
    border-left: 1px solid #383838;
}

td:nth-child(1) {
    border-right: 1px solid #e0e0e0;
}

body.dark-mode td:nth-child(1) {
    border-right: 1px solid #383838;
}

.cell-creator {
    border-right: 1px solid #e0e0e0;
}

body.dark-mode .cell-creator {
    border-right: 1px solid #383838;
}

/* Unique Column/Cell Parameters */

.cell-description {
    width: fit-content;
    /* min-width: 10em; */
    /* white-space: normal; */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    text-overflow: ellipsis;
    /* border: none; */
    /* line-height: 1.5; */
    max-height: 4.2em;
    cursor: pointer;
}

.cell-description-expanded {
    overflow: visible;
    /* white-space: normal; */
    display: block;
    /* -webkit-line-clamp: initial; */
    /* line-height: initial; */
    max-height: none;
}

.cell-bool {
    text-align: center;
}

/* Sorting Logic */

.table-sortable .th-sort-asc::after {
    content: "\25b4";
}

.table-sortable .th-sort-desc::after {
    content: "\25be";
}

.table-sortable .th-sort-asc::after,
.table-sortable .th-sort-desc::after {
    margin-left: 5%;
}

.table-sortable .th-sort-asc,
.table-sortable .th-sort-desc {
    background: rgba(0, 0, 0, 0.1);
}
