/**************************************
    DataTables - Global Styles
    Extracted from customDevStyle.v2.1.css
    + shared plugin overrides
**************************************/

/* ── sfDataTable shell ───────────────────────────────────────────────────── */
.sfDataTable .header {
    background-color: white;
    padding: 20px 20px 0;
    border-top: solid 2px #838794;
    border-radius: 5px 5px 0 0;
}

.sfDataTable .header .title {
    font-size: 18px;
}

.sfDataTable .content {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 20px;
}

.sfDataTable table.dataTable {
    border: none;
}

.sfDataTable table.dataTable .even {
    background-color: #f7f7f7;
}

.sfDataTable table.dataTable th {
    color: #4F5467;
}

.sfDataTable .readMore {
    color: #13dafe;
    cursor: pointer;
    position: relative;
}

.sfDataTable .description {
    display: none;
    position: absolute;
    right: -10px;
    margin-top: -50%;
    background-color: #4f5467;
}

.sfDataTable > .card-footer {
    border-top: none;
}

.sfDataTable > .card {
    border-top: solid 2px #838794;
    border-radius: 5px 5px 0 0;
}

/* Puts the footer under the header. Used for search filters with dataTables */
tfoot {
    display: table-header-group;
}

.dataTableSearchHeader th:not(.noFilter),
.dataTables_scrollHead .dataTableSearchHeaderScroll tr:nth-child(2) th:not(.noFilter),
.datatable thead tr:nth-child(2) th:not(.noFilter) {
    position: relative;
    padding-right: 10px !important;
}

.dataTableSearchHeader th:not(.noFilter):after,
.dataTables_scrollHead .dataTableSearchHeaderScroll tr:nth-child(2) th:not(.noFilter):after,
.datatable thead tr:nth-child(2) th:not(.noFilter):after {
    font-family: 'FontAwesome';
    content: '\f002';
    position: absolute;
    top: 22%;
    right: 12px;
    background: #fff;
    padding: 0 5px;
}

.dataTables_scrollHead .table > .dataTableSearchHeaderScroll tr:nth-child(2) th:not(.noFilter):after,
.table.datatable > thead tr:nth-child(2) th:not(.noFilter):after {
    top: 1.4em;
    background: white;
}

.table > .dataTableSearchHeader th:not(.noFilter):after {
    top: 1.25em;
    background: white;
}
div.dataTables_wrapper div.dataTables_processing {
    box-shadow: 2px 2px 2px 0 #44444444;
    border: 1px solid #44444488;
    z-index: 999;
    isolation: isolate;
}

/* ── Buttons (toolbar) ───────────────────────────────────────────────────── */
.dt-buttons {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
    margin-top: 5px;
    gap: 0;
}

.dt-buttons > .dt-button,
.dt-buttons > .btn,
.dt-buttons .btn-group > .dt-button,
.dt-buttons .btn-group > .btn {
    background: #e4e7ea;
    color: #333;
    border: none;
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
    padding: 0.5em 1em;
    cursor: pointer;
    margin-inline: 0;
}

.dt-buttons > .btn-success {
    color: #fff!important;
    background-color: #5cb85c!important;
    border-color: #4cae4c!important;
}

.dt-buttons > .dt-button.active,
.dt-buttons > .btn.active,
.dt-buttons .btn-group > .dt-button.active,
.dt-buttons .btn-group > .btn.active {
    border: 1px solid #333;
}

.dt-buttons .dt-button.buttons-colvis,
.dt-buttons .btn.buttons-colvis {
    color: red;
}

.dt-buttons .dt-button.danger,
.dt-buttons .btn.danger {
    background: #fb9678;
    border: 1px solid #fb9678;
    color: white;
}

.dt-buttons > .dt-button:hover,
.dt-buttons > .btn:hover,
.dt-buttons .btn-group > .dt-button:hover,
.dt-buttons .btn-group > .btn:hover {
    opacity: .8;
    border: 1px solid #e4e7ea;
    background: #e4e7ea;
}

.dt-buttons > .dt-button:first-of-type,
.dt-buttons > .btn:first-of-type,
.dt-buttons > .btn-group:first-of-type > .dt-button,
.dt-buttons > .btn-group:first-of-type > .btn {
    border-radius: 0.25rem 0 0 0.25rem;
}

.dt-buttons > .dt-button:last-of-type,
.dt-buttons > .btn:last-of-type,
.dt-buttons > .btn-group:last-of-type > .dt-button,
.dt-buttons > .btn-group:last-of-type > .btn {
    border-radius: 0 0.25rem 0.25rem 0;
}

/* ── Button collection dropdown (colvis etc.) ────────────────────────────── */
/* Matches old eliteadmin look; supports DT2 Bootstrap markup:
   div.dt-button-collection > ul.dropdown-menu > li.dt-button > a.dropdown-item */
div.dt-button-collection {
    position: absolute !important;
    display: block !important;
    z-index: 2002;
    min-width: 180px;
    max-height: 24em;
    overflow-x: hidden;
    overflow-y: auto !important;
    background-color: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
    padding: 0.25em;
    margin-top: 3px;

}

div.dt-button-collection .dropdown-menu {
    position: relative !important;
    display: block !important;
    float: none;
    inset: auto !important;
    transform: none !important;
    width: 100%;
    min-width: 0;
    max-height: none;
    margin: 0;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

div.dt-button-collection .dt-button,
div.dt-button-collection .buttons-columnVisibility {
    display: block;
    float: none;
    width: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
    background: #f7fafc;
    color: #262626;
    padding: 0;
    text-align: left;
    box-shadow: none;
    overflow: hidden;
    list-style: none;
}

div.dt-button-collection .dt-button > a,
div.dt-button-collection .dt-button > .dropdown-item,
div.dt-button-collection .buttons-columnVisibility > a,
div.dt-button-collection .buttons-columnVisibility > .dropdown-item,
div.dt-button-collection a.dt-button,
div.dt-button-collection button.dt-button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.65em 1em;
    margin: 0;
    color: inherit;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

div.dt-button-collection .dt-button:hover,
div.dt-button-collection .buttons-columnVisibility:hover {
    background: #e8eef3;
    box-shadow: none;
    opacity: 1;
}

div.dt-button-collection .dt-button.active,
div.dt-button-collection .dt-button.dt-button-active,
div.dt-button-collection .dt-button.dt-button-active-a,
div.dt-button-collection .buttons-columnVisibility.active,
div.dt-button-collection .buttons-columnVisibility.dt-button-active,
div.dt-button-collection .buttons-columnVisibility.dt-button-active-a {
    background-color: #337ab7;
    color: #fff;
}

div.dt-button-collection .dt-button.active > a,
div.dt-button-collection .dt-button.dt-button-active > a,
div.dt-button-collection .dt-button.dt-button-active-a > a,
div.dt-button-collection .dt-button.active > .dropdown-item,
div.dt-button-collection .dt-button.dt-button-active > .dropdown-item,
div.dt-button-collection .dt-button.dt-button-active-a > .dropdown-item {
    color: #fff !important;
    background: transparent !important;
}

div.dt-button-collection .dt-button.active:hover,
div.dt-button-collection .dt-button.dt-button-active:hover,
div.dt-button-collection .dt-button.dt-button-active-a:hover {
    background-color: #286090;
    color: #fff;
}

div.dt-button-collection .dt-button:hover > a,
div.dt-button-collection .dt-button:hover > .dropdown-item {
    color: inherit;
    background: transparent;
}

/* Keep DT checkmark without inflating row height */
div.dt-button-collection .dt-button-active-a > a,
div.dt-button-collection .dt-button-active-a > .dropdown-item,
div.dt-button-collection .dt-button-active {
    padding-right: 2.5em;
    position: relative;
}

div.dt-button-collection .dt-button-active-a > a:after,
div.dt-button-collection .dt-button-active-a > .dropdown-item:after,
div.dt-button-collection .dt-button-active:after {
    position: absolute;
    top: 50%;
    right: 0.75em;
    margin-top: -0.55em;
    content: "\2713";
    color: inherit;
    line-height: 1;
}

.dt-button-info {
    opacity: 1;
    display: block;
    position: fixed;
    top: 50vh;
    left: 50vw;
    margin: 0 auto;
    width: 25vw;
    height: fit-content;
    background-color: white;
    z-index: 99999999;
    border: 2px solid black;
    box-sizing: border-box;
    box-shadow: 2px 2px 2px 0 #CDCDCD;
    transform: translate(-20%, -25%);
    text-align: center;
    padding: 0;

    h2 {
        margin-block: 0;
        padding-block: 1em;
        background-color: #CDCDCD;
    }

    div {
        padding: 1em;
    }
}

/* ── Sorting / table chrome ──────────────────────────────────────────────── */
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after {
    opacity: 1;
}

table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:before {
    opacity: 0;
}

.dataTable:not(.table-bordered) tbody tr {
    border-color: transparent;
}

table.dataTable thead tr th,
table.dataTable thead tr td {
    border: none;
}

.dataTable tbody img.w-100px {
    width: 100px !important;
}

.dataTable tbody img.h-100px {
    height: 100px !important;
}

.dataTable > tbody > tr:last-of-type > td {
    border-bottom: none;
}

/* ── Length / filter ─────────────────────────────────────────────────────── */
div.dataTables_wrapper div.dataTables_length select {
    width: 75px;
    display: inline-block;
    background: transparent;
    appearance: auto;
}

.dataTables_filter {
    margin-block: 1em;
}

.dataTables_length select {
    background: none;
    transition: none;
    outline: 1px solid #CDCDCD;
    padding: 0.1em 1em;
    line-height: 1em;
    height: 3em;
}

.dataTables_length select:focus {
    background: none;
    transition: none;
    outline: 1px solid #333;
    padding: 0.1em 1em;
    line-height: 1em;
    height: 3em;
}

/* ── Shared paging (from plugins) ────────────────────────────────────────── */
.dt-paging:has(.pagination) {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;

    & nav.pagination,
    & nav:has(.pagination) {
        margin-inline: auto 0;
    }
}

.table-responsive .dt-paging:has(.pagination) {
    flex: 1;
    align-content: flex-end;
}

/* ── Shared column alignment helpers (from plugins) ──────────────────────── */
.dt-right {
    text-align: right !important;
}

.dt-center {
    text-align: center;
}

.dt-bold {
    color: #666666;
    font-weight: 500;
}

/* ── Responsive collapse control (old eliteadmin +/- look) ───────────────── */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control,
table.dataTable.dtr-column > tbody > tr > td.dtr-control,
table.dataTable.dtr-column > tbody > tr > th.dtr-control {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before,
table.dataTable.dtr-column > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-column > tbody > tr > th.dtr-control:before {
    top: 50%;
    left: 4px;
    margin-top: -9px;
    margin-right: 0;
    height: 14px;
    width: 14px;
    display: block;
    position: absolute;
    color: white;
    border: 2px solid white;
    border-radius: 14px;
    border-top: 2px solid white;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    border-right: 2px solid white;
    box-shadow: 0 0 3px #444;
    box-sizing: content-box;
    text-align: center;
    text-indent: 0 !important;
    font-family: 'Courier New', Courier, monospace;
    line-height: 14px;
    content: '+';
    background-color: #337ab7;
}

table.dataTable.dtr-inline.collapsed > tbody > tr.dtr-expanded > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.dtr-expanded > th.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before,
table.dataTable.dtr-column > tbody > tr.dtr-expanded > td.dtr-control:before,
table.dataTable.dtr-column > tbody > tr.dtr-expanded > th.dtr-control:before,
table.dataTable.dtr-column > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-column > tbody > tr.parent > th.dtr-control:before {
    content: '-';
    background-color: #d33333;
    border-top: 2px solid white;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    border-right: 2px solid white;
}

table.dataTable > tbody > tr.child ul.dtr-details {
    display: inline-block;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

table.dataTable > tbody > tr.child ul.dtr-details > li {
    border-bottom: 1px solid #efefef;
    padding: 0.5em 0;
}

table.dataTable > tbody > tr.child ul.dtr-details > li:first-child {
    padding-top: 0;
}

table.dataTable > tbody > tr.child ul.dtr-details > li:last-child {
    border-bottom: none;
}

table.dataTable > tbody > tr.child span.dtr-title {
    display: inline-block;
    min-width: 75px;
    font-weight: bold;
}

/* ── Ensure colvis popup menu does not get clipped by other elements in page ───────────────── */
.dataTables_wrapper,
.table-responsive {
    overflow: visible !important;
}

/* Remove borders on hover in datatable columns */

table.dataTable thead > tr > th.dt-orderable-asc:hover, table.dataTable thead > tr > th.dt-orderable-desc:hover,
table.dataTable thead > tr > td.dt-orderable-asc:hover,
table.dataTable thead > tr > td.dt-orderable-desc:hover {
  outline: none !important;
  outline-offset: 0px !important;
}
/**************************************
    DataTables - END
**************************************/


/* removed from manage questionnaires table */
/* .dt-paging nav:has(.pagination) {
    display: inline-block;
    width: auto;
    position: relative;
    left: 100%;
    transform: translateX(-100%);
    & .page-link {
        padding: 0.25em 0.75em;
    }
}
thead.blue-bg {
    display: table-header-group;
}
tfoot.dataTableSearchHeader {
    display: table-header-group;
} */