table.datatable,
table.logtable {
    border-collapse: separate;
}

table.datatable thead tr:not(.skip-row-show-hide) th,
table.logtable thead tr:not(.skip-row-show-hide) th {
    position: sticky;
    background: #FFFFFF;
    top: 0;
    cursor: pointer;
    padding-right: 28px;
    border-bottom: 1px solid #111;
    vertical-align: bottom;
    -webkit-box-sizing: content-box;
    box-sizing: content-box;
    z-index: 2;
    border-radius: 0;
}

table.datatable {
    counter-reset: rowNumber;
}

table.datatable tbody tr:not(.details) > td:not(.details):first-child {
    counter-increment: rowNumber;
}

table.datatable tbody tr:not(.details) td:not(.details):first-child::before {
    content: counter(rowNumber);
    min-width: 1em;
    margin-right: 0.5em;
}

table.datatable thead th.no-sort,
table.logtable thead th.no-sort {
    padding-left: 5px;
}

table.datatable thead th label,
table.logtable thead th label {
    display: inline;
}

table.datatable thead th,
table.datatable tfoot td,
table.logtable thead th,
table.logtable tfoot td {
    font-weight: bold;
}

.datatable > tbody > tr > th, .datatable > tfoot > tr > th,
.datatable > tbody > tr > td, .datatable > tfoot > tr > td,
.logtable:not(.stack) > tbody > tr > th, .logtable:not(.stack) > tfoot > tr > th,
.logtable:not(.stack) > tbody > tr > td, .logtable:not(.stack) > tfoot > tr > td {
    padding-top: 1rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    padding-bottom: 1rem;
    line-height: 1.42857143;
    vertical-align: top;
    border-top: 1px solid #dddddd;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    border-radius: 0;
}

.row-click tbody tr:hover {
    cursor: pointer;
}

.datatable > thead > tr > th,
.logtable > thead > tr > th {
    vertical-align: bottom;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #515151;
}

table.datatable thead .sorting:not(.no-sort):after,
table.datatable thead .sorttable_sorted:not(.no-sort):after,
table.logtable thead .sorting:not(.no-sort):after,
table.logtable thead .sorttable_sorted:not(.no-sort):after {
    position: absolute;
    bottom: 13px;
    right: 13px;
    display: block;
    font-family: 'Glyphicons Halflings';
}

table.datatable thead .sorting:after,
table.logtable thead .sorting:after {
    opacity: 0.3;
    content: "\e150";
}

table.datatable thead .sorttable_sorted:after,
table.logtable thead .sorttable_sorted:after {
    opacity: 1;
    content: "\e155";
}

table.datatable thead .sorttable_sorted_reverse:after,
table.logtable thead .sorttable_sorted_reverse:after {
    opacity: 1;
    content: "\e156";
}

table.datatable > tbody > tr:nth-of-type(odd) td,
table.logtable > tbody > tr:nth-of-type(odd) td {
    background-color: #f9f9f9;
}

table.datatable tbody tr,
table.logtable tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, .12);
}

table.datatable > tbody > tr > td,
table.logtable > tbody > tr > td {
    border-top: none;
}

table.datatable tbody tr:hover,
table.logtable tbody tr:hover {
    background-color: #DFDFDF;
}

table.datatable tbody,
table.logtable tbody {
    border-bottom: 1px solid black;
}

table.logtable .hasPopover {
    cursor: pointer;
}


table.stack, table.stack thead, table.stack tbody, table.stack th, table.stack td, table.stack tr {
    display: block;
}

.table.stack > tbody > tr > td {
    padding-left: 50%;
    padding-top: 5px;
    padding-bottom: 5px;
}

table.stack .table > thead > tbody > th > td > tr {
    display: block;
    padding-left: 0;
}

table.stack .userNameBubbleColor {
    margin: 0;
}

/* Hide table headers (but not display: none;, for accessibility) */
table.stack thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
}

table.stack tr {
    border: 1px solid #ccc;
}

table.stack tbody tr {
    margin: 0 0 1rem 0;
}

table.stack td {
    /* Behave  like a "row" */
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 50%;
}

table.stack td:before {
    /* Now like a table header */
    position: absolute;
    /* Top/left values mimic padding */
    top: 6px;
    left: 6px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
}


table.stack td:before {
    font-weight: bold;
}

table.stack td:nth-of-type(1):before {
    content: "Time";
}

table.stack td:nth-of-type(2):before {
    content: "Username";
}

table.stack td:nth-of-type(3):before {
    content: "Key";
}

table.stack td:nth-of-type(4):before {
    content: "Field";
}

table.stack td:nth-of-type(5):before {
    content: "Change";
}

/* mass change */
#MassChangeForm {
    float: left;
    width: calc(100% - 400px);
}

/* search filtering */
.no-bottom {
    margin-bottom: 0;
    padding-bottom: 0;
}

.search_wrapper {
    padding-bottom: 10px;
    justify-content: flex-end;
    display: flex;
    flex-wrap: nowrap;
}

.stack .search_wrapper {
    width: 99%;
    white-space: inherit;
}

.search_wrapper .table_search a.dropdown-trigger {
    box-shadow: none;
    border: 1px solid #efefef;
    height: 3rem;
    line-height: 3rem;
    min-width: 180px;
    text-align: left;
}

.search_wrapper input[type=search].table-search:focus {
    border-bottom-color: #0D47A1;
}

/* sidebar filtering
.sidenav {
    width: 33px;
    position: sticky;
    top: 0;
    margin-bottom: -350px;
    margin-top: 50px;
    background: transparent;
    z-index: 4;
    float: left;
    text-align: left;
    transition: transform 0.5s ease-in-out;
}

.sidenav .table-tool {
    display: inline-block;
    font-size: 3.5rem;
    cursor: pointer;
    padding-left: 2px;
    margin: 6px 0;
    line-height: 1;
}

.sidenav .open-filters.table-tool {
    font-size: 3.7rem;
}

.sidenav .activity-log {
    font-size: 3.2rem;
}

.sidenav .fa-question-circle {
    font-size: 3.9rem;
}

.sidenav .column-control {
    font-size: 3.2rem;
}

.sidenav i.table-tool:hover,
.sidenav .table-tool i:hover {
    color: #0e90d2;
}
*/
/* column display */
th.hide-column, td.hide-column {
    display: none;
}

.columnDisplayWrapper {
    position: relative;
}

.columnDisplay {
    display: none;
    position: absolute;
    top: -70px;
    left: 45px;
    z-index: 9999;
    background: #FFF;
    width: 345px;
}

.columnDisplay:before,
.columnDisplay:after {
    content: '';
    display: block;
    position: absolute;
    left: -19px;
    width: 0;
    height: 0;
    border-style: solid;
}

.columnDisplay:after {
    top: 34px;
    border-color: transparent #fff transparent transparent;
    border-width: 10px;
}

.columnDisplay:before {
    top: 33px;
    border-color: transparent #ddd transparent transparent;
    border-width: 11px;
    left: -21px;
}

.columnDisplayHeader {
    border-bottom: none;
    padding: 0.5rem;
    background: #337ab7;
    color: #FFF;
    font-size: 16px;
}

.columnDisplayHeader button {
    background: none;
    border: none;
    color: #FFF;
    font-size: 21px;
    padding: 0 3px;
    opacity: 0.9;
    line-height: 16px;

}

.columnDisplay ul {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid #DDD;
    border-bottom: 1px solid #DDD;
}

.columnDisplay ul li {
    list-style-type: none;
    width: 50%;
    display: inline-block;
    padding: 0.5rem;
    box-shadow: none;
    flex-grow: 1;
    text-align: left;
    border: 1px solid #DDD;
    margin: 0;
    border-top: none;
    font-size: 12px;
}

.columnDisplay ul li:nth-child(odd) {
    border-right: none;
}

.columnDisplay ul li label span {
    display: inline-block;
    vertical-align: middle;
}

.skip-column-show-hide, .no-sort, .skip-row-show-hide, .skip-row-export, .skip-column-export, .column-show-hide-default-hidden {
    /*show it shows in IDE when typing*/
}

.no-search {
    /* add to table to remove search box */
}

/* search column dropdown */
.search_wrapper .btn-group li {
    width: 100%;
    margin: 0;
    box-shadow: none;
    display: list-item;
}

/*user for $.fn.UnderConstruction(true); to show under construction images on page for non admins*/
.construction-div {
    background-image: url('../images/under-construction.jpg');
    height: calc(100vh - 65px);
    background-size: 880px 392px;
    background-repeat: no-repeat;
    position: relative;
}

.construction-reminder {
    position: fixed;
    top: 60px;
    left: 40px;
    font-weight: bold;
    color: #ff0f00;
    z-index: 9999999;
    background: #FFFFFF;
    font-size: 16px;
}

/* less padding on the dropdowns in the overview edit modals */
.overview-edit .form-group div,
.overview-edit .form-group label {
    padding-left: 5px;
    padding-right: 5px;
}

.modal-metadata select.meta-select {
    height: 25px;
    padding: 0 6px;
}

.modal-metadata div,
.modal-metadata label {
    padding-left: 5px;
    padding-right: 5px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    margin-bottom: 0;
}

input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: searchfield-cancel-button;
    padding: 4px;
    cursor: pointer;
}