table.fw-data-table {
    font-size: 13px;
    line-height: 1.25;
}

/* Prevent the search/top bar from overflowing a padded parent */
.datatable-top,
.datatable-container,
.datatable-search,
.datatable-search .datatable-input {
    box-sizing: border-box;
    max-width: 100%;
}

.datatable-search .datatable-input {
    width: auto;
}

table.fw-data-table:focus {
    outline: none;
}

table.fw-data-table thead,
table.datatable-table thead {
    font-weight: 900;
    font-size: 11px;
}

/* simple-datatables wraps header text in a <button> - reset it to plain text */
.datatable-table th button,
.datatable-pagination-list button {
    color: inherit;
    border: 0;
    background-color: inherit;
    cursor: pointer;
    text-align: inherit;
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
}

.datatable-sorter,
.datatable-filter {
    display: inline-block;
    height: 100%;
    position: relative;
    width: 100%;
}

.datatable-sorter::before,
.datatable-sorter::after {
    content: "";
    height: 0;
    width: 0;
    position: absolute;
    right: 4px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    opacity: 0.2;
}

.datatable-sorter::before {
    border-top: 4px solid currentColor;
    bottom: 0;
}

.datatable-sorter::after {
    border-bottom: 4px solid currentColor;
    border-top: 4px solid transparent;
    top: 0;
}

.datatable-ascending .datatable-sorter::after,
.datatable-descending .datatable-sorter::before,
.datatable-ascending .datatable-filter::after,
.datatable-descending .datatable-filter::before {
    opacity: 0.6;
}

table.datatable-table thead th a {
    color: var(--cs-1-hover);
}

table.fw-data-table td,
table.datatable-table td {
    padding: 15px 0;
    vertical-align: top;
    border-bottom: solid 1px var(--cs-white-border);
}

/* Align text with top of images */
table.fw-data-table tbody td {
    vertical-align: top;
}

table.fw-data-table th,
table.datatable-table th {
    padding: 15px 0;
    vertical-align: top;
    border-bottom: solid 1px var(--cs-white-header-border);
}

table.fw-data-table th:last-child,
table.fw-data-table td:last-child,
table.datatable-table th:last-child,
table.datatable-table td:last-child {
    padding-right: 0;
}

table.fw-data-table:focus tbody td {
    border-bottom-color: var(--menu-cursor-border-color);
}

table.fw-data-table .date,
table.fw-data-table .fw-date,
table.datatable-table .date,
table.datatable-table .fw-date {
    white-space: nowrap;
}

table.fw-data-table.fw-large tbody {
    width: 985px;
    max-height: calc(100vh - 320px);
}

table.fw-data-table.fw-middle tbody {
    width: 600px;
    max-height: calc(100vh - 320px);
}

table.fw-data-table.fw-small tbody {
    width: 342px;
    height: 270px;
}

table.fw-data-table.fw-min tbody {
    width: 342px;
    height: 225px;
}

table.fw-data-table td.td-icon {
    text-align: center;
}

table.fw-data-table-title {
    color: var(--cs-1-text);
}

table.fw-data-table-title i.fa,
table.fw-data-table-title i.far,
table.fw-data-table-title i.fas {
    margin-right: 10px;
}

table.fw-data-table .icon-trash,
table.fw-data-table .fw-icon-trash {
    font-size: 15px;
}

.owned-by-user .icon-access-right,
.fw-owned-by-user .fw-icon-access-right,
table.fw-data-table .fa-clock,
table.fw-data-table .fa-trash,
table.fw-data-table .fa-download,
table.fw-data-table .fa-history {
    color: var(--cs-1-icon);
    cursor: pointer;
}

.owned-by-user .icon-access-right:hover,
.fw-owned-by-user .fw-icon-access-right:hover,
table.fw-data-table .fa-clock:hover,
table.fw-data-table .fa-trash:hover,
table.fw-data-table .fa-download:hover,
table.fw-data-table .fa-history:hover {
    color: var(--cs-1-hover);
}

/* A deleted access rights row */
.collaborator-tr[data-right="delete"],
.fw-collaborator-tr[data-right="delete"] {
    display: none;
}

table.fw-data-table .fw-avatar,
table.fw-data-table .fw-string-avatar {
    display: inline-block;
    width: 25px;
    height: 25px;
    vertical-align: top;
    margin: -4px 10px -5px 0;
}

table.fw-data-table > tbody > tr > td:first-child {
    padding-left: 2px;
}

table.fw-data-table:focus > tbody > tr.datatable-cursor,
table.fw-data-table:focus > tbody > tr.fw-datatable-cursor {
    background-color: var(--cs-white-background-selected);
}

/* the usermedia table */
.fw-usermedia-title {
    display: inline-block;
    height: auto;
}

.fw-usermedia-type {
    display: block;
    margin-top: 3px;
}

.fw-usermedia-image {
    display: inline-block;
    max-width: 60px;
    max-height: 60px;
    overflow: hidden;
    vertical-align: top;
    margin: 0 14px 2px 0;
}

.fw-usermedia-image > img {
    min-width: 100%;
    min-height: 100%;
}

table.fw-data-table tbody td.checkable {
    position: relative;
    cursor: pointer;
    text-align: center;
}

table.fw-data-table tbody tr.checked td.checkable::after,
table.fw-data-table tbody tr.fw-checked td.checkable::after {
    display: inline-block;
    font-family:
        "Font Awesome 7 Free", "Font Awesome 6 Free", "FontAwesome", monospace;
    font-weight: 900;
    font-size: inherit;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    content: "\f00c";
    width: 1em;
    height: 1em;
    position: absolute;
    right: 12px;
    top: 12px;
}

/* Selection tables (e.g. dialog pickers) */
table.fw-data-table.fw-selection-table tbody tr {
    cursor: pointer;
}

/* Word counter dialog table */
.fw-word-counter-tbody {
    line-height: 38px;
}

/* Bulk action */
.dt-bulk {
    display: block;
    position: relative;
    min-width: 30px;
}

.dt-bulk .fw-check + label {
    display: inline-block;
    vertical-align: middle;
}

.dt-bulk-dropdown {
    display: inline-block;
    vertical-align: middle;
    padding-left: 3px;
    cursor: pointer;
}
