/* SMPList hub engine (beta) — footer columns popover + pager; table chrome stays platform resultsTable. */

/* Fill list pane; only the table wrap scrolls — footer stays pinned at bottom. */
.submodule-body.smp-list-scroll-host > .smp-hub-list-engine-host,
.submodule-body.smp-list-scroll-host > .smp-profile-list-engine-host,
.lists.smp-list-lists.smp-list-scroll-host > .smp-hub-list-engine-host,
.lists.smp-list-lists.smp-list-scroll-host > .smp-profile-list-engine-host {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.smp-hub-list-engine-host,
.smp-profile-list-engine-host {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    --smp-list-foot-h: 2rem;
    --smp-list-foot-pad-y: 0.42rem;
}

.smp-hub-list-engine-host .smp-list {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.smp-hub-list-engine-host .smp-list-tablewrap {
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.smp-hub-list-engine-host .smp-list-footer {
    flex: 0 0 auto;
    flex-shrink: 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0;
    min-height: calc(var(--smp-list-foot-h) + (var(--smp-list-foot-pad-y) * 2));
    padding: var(--smp-list-foot-pad-y) 0.65rem;
    border-top: 1px solid #ccc;
    background: #f8f9fa;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.06);
    font-size: 0.85rem;
    line-height: 1;
    /* Above sticky thead (z-index 21–22 in index.css) so Columns popover opens upward without hiding under headers */
    z-index: 30;
}

.smp-hub-list-engine-host .smp-list-footer-controls,
.smp-hub-list-engine-host .smp-list-count,
.smp-hub-list-engine-host .smp-list-pager {
    display: flex;
    align-items: center;
    height: var(--smp-list-foot-h);
    min-height: var(--smp-list-foot-h);
    margin: 0;
}

.smp-hub-list-engine-host .smp-list-footer-controls {
    justify-content: flex-start;
    overflow: visible;
}

.smp-hub-list-engine-host .smp-list-popwrap {
    overflow: visible;
}

.smp-hub-list-engine-host .smp-list-count {
    justify-content: center;
    text-align: center;
    color: #6c757d;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.smp-hub-list-engine-host .smp-list-pager {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.35rem;
}

.smp-hub-list-engine-host .smp-list-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: #fff;
    border-radius: 6px;
    padding: 0 0.55rem;
    height: var(--smp-list-foot-h);
    min-height: var(--smp-list-foot-h);
    max-height: var(--smp-list-foot-h);
    min-width: var(--smp-list-foot-h);
    line-height: 1;
    cursor: pointer;
    font-size: 0.85rem;
    box-sizing: border-box;
    margin: 0;
    vertical-align: middle;
}

.smp-hub-list-engine-host .smp-list-btn:hover:not(:disabled) {
    background: rgba(13, 110, 253, 0.08);
}

.smp-hub-list-engine-host .smp-list-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.smp-hub-list-engine-host .smp-list-iconbtn {
    width: var(--smp-list-foot-h);
    min-width: var(--smp-list-foot-h);
    max-width: var(--smp-list-foot-h);
    padding: 0;
}

.smp-hub-list-engine-host .smp-list-iconbtn svg {
    display: block;
    margin: 0 auto;
}

.smp-hub-list-engine-host .smp-list-popwrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--smp-list-foot-h);
    margin: 0;
}

.smp-hub-list-engine-host .smp-list-pop {
    /* position set in JS (fixed) so panel clears sticky thead + profile card headers */
    position: fixed;
    z-index: 100250;
    min-width: 240px;
    max-height: 360px;
    overflow: auto;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 0.55rem;
}

.smp-hub-list-engine-host .smp-list-pop-title {
    font-weight: 600;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.4rem;
}

.smp-hub-list-engine-host .smp-list-collist {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.smp-hub-list-engine-host .smp-list-colselectall {
    margin-bottom: 0.2rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.smp-hub-list-engine-host .smp-list-colselectall .smp-list-coldrag {
    visibility: hidden;
}

.smp-hub-list-engine-host .smp-list-colrow {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.35rem;
    border-radius: 6px;
}

.smp-hub-list-engine-host .smp-list-colrow:hover {
    background: rgba(0, 0, 0, 0.04);
}

.smp-hub-list-engine-host .smp-list-colrow.is-dragging {
    opacity: 0.55;
}

.smp-hub-list-engine-host .smp-list-colrow.is-over {
    outline: 2px dashed #0d6efd;
    outline-offset: -2px;
}

.smp-hub-list-engine-host .smp-list-coldrag {
    cursor: grab;
    color: #6c757d;
}

.smp-hub-list-engine-host .smp-list-colcheck {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    flex: 1;
    margin: 0;
}

.smp-hub-list-engine-host .smp-list-pagesize {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: var(--smp-list-foot-h);
    margin: 0;
    white-space: nowrap;
}

.smp-hub-list-engine-host .smp-list-pagesize-label {
    display: inline-flex;
    align-items: center;
    height: var(--smp-list-foot-h);
    margin: 0;
    line-height: 1;
    color: #6c757d;
    font-size: 0.85rem;
}

.smp-hub-list-engine-host .smp-list-pageinfo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--smp-list-foot-h);
    margin: 0;
    padding: 0 0.2rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #6c757d;
}

.smp-hub-list-engine-host .smp-list-select {
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 6px;
    padding: 0 0.35rem;
    font-size: 0.85rem;
    height: var(--smp-list-foot-h);
    min-height: var(--smp-list-foot-h);
    max-height: var(--smp-list-foot-h);
    line-height: 1;
    box-sizing: border-box;
    margin: 0;
    vertical-align: middle;
}

/* Bootstrap resets inside hub list footer */
.smp-hub-list-engine-host .smp-list-footer label {
    margin-bottom: 0;
}

.smp-hub-list-engine-host .smp-list-footer button,
.smp-hub-list-engine-host .smp-list-footer select {
    font: inherit;
}

/* Dev SMPList sort UI on beta hub table headers */
.smp-hub-list-engine-host table.resultsTable thead tr.sticky.header th.smp-list-th {
    padding: 0;
    vertical-align: middle;
    user-select: none;
}

.smp-hub-list-engine-host .smp-list-th-inner {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.55rem;
    min-height: 2rem;
    box-sizing: border-box;
}

.smp-hub-list-engine-host .smp-list-th.is-sortable .smp-list-th-inner {
    cursor: pointer;
}

.smp-hub-list-engine-host .smp-list-th.is-sortable:hover {
    color: var(--bs-body-color, #212529);
}

.smp-hub-list-engine-host .smp-list-th-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smp-hub-list-engine-host .smp-list-sort {
    color: var(--bs-primary, #0d6efd);
    font-size: 0.85rem;
    line-height: 1;
    flex-shrink: 0;
}

.smp-hub-list-engine-host .smp-list-sort--idle {
    color: #6c757d;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.smp-hub-list-engine-host .smp-list-th.is-sortable:hover .smp-list-sort--idle {
    opacity: 0.5;
}

.smp-hub-list-engine-host .smp-list-sort-i {
    font-size: 0.6rem;
    margin-left: 1px;
}

.smp-hub-list-engine-host .smp-list-th.is-sorted {
    color: var(--bs-body-color, #212529);
}

/* Fixed layout so explicit lead/data col widths hold when few columns are visible */
.smp-list-scroll-host table.resultsTable.upload-table,
.smp-list-scroll-host table.resultsTable.smp-list-table,
.smp-hub-list-engine-host table.resultsTable {
    table-layout: fixed !important;
    width: 100%;
}

.smp-hub-list-engine-host table.resultsTable thead th.smp-list-th,
.smp-hub-list-engine-host table.resultsTable thead th.sticky.smp-list-th {
    position: sticky;
    padding: 0;
}

.smp-hub-list-engine-host .smp-list-resize {
    position: absolute;
    top: 0;
    right: 0;
    width: 7px;
    height: 100%;
    cursor: col-resize;
    z-index: 3;
}

.smp-hub-list-engine-host .smp-list-resize:hover {
    background: var(--bs-primary, #0d6efd);
    opacity: 0.25;
}

.smp-hub-list-engine-host table.resultsTable tbody td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/*
 * Unified lead (id) column — one class, one width, all list scroll hosts (hub + profile).
 */
.smp-list-scroll-host,
.smp-hub-list-engine-host {
    --smp-list-lead-col-w: 66px;
}

.smp-list-scroll-host col.smp-list-lead-col,
.smp-hub-list-engine-host col.smp-list-lead-col {
    width: var(--smp-list-lead-col-w) !important;
    min-width: var(--smp-list-lead-col-w) !important;
    max-width: var(--smp-list-lead-col-w) !important;
}

/* Absorb horizontal slack on wide tables so the lead column never stretches */
.smp-list-scroll-host col.smp-list-fill-col,
.smp-hub-list-engine-host col.smp-list-fill-col {
    width: auto !important;
    min-width: 4rem;
}

.smp-list-scroll-host th.smp-list-lead-col,
.smp-list-scroll-host td.smp-list-lead-col,
.smp-hub-list-engine-host th.smp-list-lead-col,
.smp-hub-list-engine-host td.smp-list-lead-col {
    width: var(--smp-list-lead-col-w) !important;
    min-width: var(--smp-list-lead-col-w) !important;
    max-width: var(--smp-list-lead-col-w) !important;
    box-sizing: border-box;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    text-align: left;
    vertical-align: middle;
    position: sticky;
    left: 0;
}

.smp-list-scroll-host th.smp-list-lead-col .smp-main-list-id-cell,
.smp-list-scroll-host td.smp-list-lead-col .smp-main-list-id-cell,
.smp-hub-list-engine-host th.smp-list-lead-col .smp-main-list-id-cell,
.smp-hub-list-engine-host td.smp-list-lead-col .smp-main-list-id-cell {
    width: max-content;
    max-width: 100%;
}

.smp-list-scroll-host thead th.smp-list-lead-col,
.smp-hub-list-engine-host thead th.smp-list-lead-col {
    z-index: 23;
    background-color: var(--bs-body-bg, #fff);
}

.smp-list-scroll-host tbody td.smp-list-lead-col,
.smp-hub-list-engine-host tbody td.smp-list-lead-col {
    z-index: 2;
    background-color: var(--bs-body-bg, #fff);
}

.smp-list-scroll-host tbody tr:nth-child(odd) td.smp-list-lead-col,
.smp-hub-list-engine-host tbody tr:nth-child(odd) td.smp-list-lead-col {
    background-color: var(--bs-table-striped-bg, rgba(0, 0, 0, 0.05));
}

.smp-list-scroll-host tbody tr:hover td.smp-list-lead-col,
.smp-hub-list-engine-host tbody tr:hover td.smp-list-lead-col {
    background-color: var(--bs-table-hover-bg, rgba(0, 0, 0, 0.075));
}

.smp-list-scroll-host table.resultsTable thead tr.sticky.header th.smp-profile-status-sticky-col,
.smp-list-scroll-host table.resultsTable tbody td.smp-profile-status-sticky-col,
.smp-hub-list-engine-host table.resultsTable thead tr.sticky.header th.smp-profile-status-sticky-col,
.smp-hub-list-engine-host table.resultsTable tbody td.smp-profile-status-sticky-col {
    left: var(--smp-list-lead-col-w);
}

/*
 * Lead-column conflict overrides — index.css sets `th.sticky, td.sticky { width:20px }`;
 * Bootstrap `.table th/td` padding and profile training rules can also fight fixed width.
 * These selectors intentionally beat those globals for every hub/profile list variant.
 */
.smp-list-scroll-host table.resultsTable.upload-table > colgroup > col.smp-list-lead-col,
.smp-hub-list-engine-host table.resultsTable > colgroup > col.smp-list-lead-col {
    width: var(--smp-list-lead-col-w) !important;
    min-width: var(--smp-list-lead-col-w) !important;
    max-width: var(--smp-list-lead-col-w) !important;
}

.smp-list-scroll-host table.resultsTable.upload-table th.smp-list-lead-col,
.smp-list-scroll-host table.resultsTable.upload-table td.smp-list-lead-col,
.smp-list-scroll-host table.resultsTable.upload-table th.sticky.smp-list-lead-col,
.smp-list-scroll-host table.resultsTable.upload-table td.sticky.smp-list-lead-col,
.smp-list-scroll-host table.resultsTable.upload-table th.smp-main-list-id-sticky-th.smp-list-lead-col,
.smp-list-scroll-host table.resultsTable.upload-table td.smp-main-list-id-sticky-td.smp-list-lead-col,
.smp-list-scroll-host table.resultsTable.upload-table th.smp-training-select-cell.smp-list-lead-col,
.smp-list-scroll-host table.resultsTable.upload-table td.smp-training-select-cell.smp-list-lead-col,
.smp-list-scroll-host table.resultsTable.upload-table th[data-column-key="id"].smp-list-lead-col,
.smp-hub-list-engine-host table.resultsTable th.smp-list-lead-col,
.smp-hub-list-engine-host table.resultsTable td.smp-list-lead-col,
.smp-hub-list-engine-host table.resultsTable th.sticky.smp-list-lead-col,
.smp-hub-list-engine-host table.resultsTable td.sticky.smp-list-lead-col,
.smp-hub-list-engine-host table.resultsTable th.smp-main-list-id-sticky-th.smp-list-lead-col,
.smp-hub-list-engine-host table.resultsTable td.smp-main-list-id-sticky-td.smp-list-lead-col,
.smp-hub-list-engine-host table.resultsTable th.smp-training-select-cell.smp-list-lead-col,
.smp-hub-list-engine-host table.resultsTable td.smp-training-select-cell.smp-list-lead-col,
#employees-profile .lists .smp-list-table-scroll table.resultsTable.upload-table th.smp-list-lead-col,
#employees-profile .lists .smp-list-table-scroll table.resultsTable.upload-table td.smp-list-lead-col,
#employees-profile .lists .smp-list-table-scroll table.resultsTable.upload-table th.sticky.smp-list-lead-col,
#employees-profile .lists .smp-list-table-scroll table.resultsTable.upload-table td.sticky.smp-list-lead-col,
#employees-profile .lists .smp-list-table-scroll table.resultsTable.upload-table th.smp-main-list-id-sticky-th.smp-list-lead-col,
#employees-profile .lists .smp-list-table-scroll table.resultsTable.upload-table td.smp-main-list-id-sticky-td.smp-list-lead-col,
#employees-profile .lists .smp-list-table-scroll table.resultsTable.upload-table th.smp-training-select-cell.smp-list-lead-col,
#employees-profile .lists .smp-list-table-scroll table.resultsTable.upload-table td.smp-training-select-cell.smp-list-lead-col {
    width: var(--smp-list-lead-col-w) !important;
    min-width: var(--smp-list-lead-col-w) !important;
    max-width: var(--smp-list-lead-col-w) !important;
    box-sizing: border-box;
}

.smp-list-scroll-host table.resultsTable.upload-table th.smp-list-lead-col,
.smp-hub-list-engine-host table.resultsTable th.smp-list-lead-col,
#employees-profile .lists .smp-list-table-scroll table.resultsTable.upload-table th.smp-list-lead-col {
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
}

.smp-list-scroll-host table.resultsTable.upload-table td.smp-list-lead-col,
.smp-hub-list-engine-host table.resultsTable td.smp-list-lead-col,
#employees-profile .lists .smp-list-table-scroll table.resultsTable.upload-table td.smp-list-lead-col {
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
}

.smp-list-scroll-host table.resultsTable.upload-table td[data-column-key="id"],
.smp-list-scroll-host table.resultsTable.upload-table th[data-column-key="id"].smp-list-lead-col,
.smp-hub-list-engine-host table.resultsTable td[data-column-key="id"],
.smp-hub-list-engine-host table.resultsTable th[data-column-key="id"].smp-list-lead-col {
    width: var(--smp-list-lead-col-w) !important;
    min-width: var(--smp-list-lead-col-w) !important;
    max-width: var(--smp-list-lead-col-w) !important;
    box-sizing: border-box;
}
