/* BSGT filterable grid (gt_page_grid / inc_local/bsgt_local.php) */
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* Grid: data card — white body; thead = title strip (primary) + filter strip */
.bsgt-gt-wrap .bsgt-gt {
    border-color: var(--site-shell-border-soft);
}

.bsgt-gt-wrap .bsgt-gt > tbody > tr > td,
.bsgt-gt-wrap .bsgt-gt > tbody > tr > th {
    /* Match .gt-head-title / .gt-filter-wrap horizontal inset (overrides .table-sm). */
    padding: 0.45rem 0.6rem;
}

.bsgt-gt-wrap .bsgt-gt.table-hover > tbody > tr:hover > td,
.bsgt-gt-wrap .bsgt-gt.table-hover > tbody > tr:hover > th {
    background-color: rgba(255, 171, 46, 0.08);
}

.bsgt-gt-wrap .bsgt-gt thead tr.gt-head > th {
    vertical-align: top;
    padding: 0;
    min-width: 0;
    border-bottom: 2px solid var(--site-primary);
    box-shadow: none;
    background-color: var(--site-primary);
}

.bsgt-gt-wrap .bsgt-gt thead tr.gt-head > th.gt-head-nofilter {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
}

/* Actions column: bottom-right; same inset as .gt-filter-wrap (must beat #… thead th from page CSS) */
.bsgt-gt-wrap .bsgt-gt thead tr.gt-head > th.gt-head-actions {
    vertical-align: bottom;
    padding: 0.45rem 0.6rem 0.5rem;
}

.bsgt-gt-wrap .bsgt-intro-action-btn {
    display: inline-flex;
    align-items: center;
    line-height: 1.25;
}

.bsgt-gt-wrap .bsgt-intro-action-btn .bi {
    flex-shrink: 0;
}

.bsgt-gt-wrap .bsgt-csv-head-wrap {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    min-width: 0;
}

.bsgt-gt-wrap .bsgt-csv-download-btn {
    background-color: var(--site-page-elevated);
    border-color: rgba(253, 252, 250, 0.45);
    color: var(--site-primary);
}

.bsgt-gt-wrap .bsgt-csv-download-btn:hover {
    background-color: #fff;
    border-color: rgba(253, 252, 250, 0.65);
    color: var(--site-primary-hover);
}

.bsgt-gt-wrap .bsgt-gt thead .gt-head-title {
    padding: 0.45rem 0.6rem;
    padding-bottom: 0;
    background-color: var(--site-primary);
    color: #fdfcfa;
}

.bsgt-gt-wrap .bsgt-gt thead .gt-head-title .gt-col-label,
.bsgt-gt-wrap .bsgt-gt thead .gt-head-title span.gt-col-label-static {
    color: inherit;
    font-size: var(--xbl-fs-ui) * 1.2;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.25;
    padding: 0;
}

.bsgt-gt-wrap .bsgt-gt thead .gt-filter-wrap {
    margin: 0;
    padding: 0.45rem 0.6rem 0.5rem;
}

.bsgt-gt-wrap .bsgt-gt thead .gt-filter-wrap:first-child {
    border-top: none;
    padding-top: 0.5rem;
}

.bsgt-gt-wrap .gt-col-label {
    display: block;
    width: 100%;
    text-align: left;
    font-size: inherit;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    color: #212529;
    line-height: 1.35;
    margin: 0;
    padding: 0.15rem 0;
    white-space: nowrap;
}

.bsgt-gt-wrap button.gt-col-label.gt-sort-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #212529;
}

.bsgt-gt-wrap .bsgt-gt thead .gt-head-title button.gt-col-label.gt-sort-btn {
    color: inherit;
}

.bsgt-gt-wrap button.gt-col-label.gt-sort-btn:hover,
.bsgt-gt-wrap button.gt-col-label.gt-sort-btn:focus-visible {
    color: #0d6efd;
    outline: none;
}

.bsgt-gt-wrap .bsgt-gt thead .gt-head-title button.gt-col-label.gt-sort-btn:hover,
.bsgt-gt-wrap .bsgt-gt thead .gt-head-title button.gt-col-label.gt-sort-btn:focus-visible {
    color: var(--kelmer-yellow);
}

.bsgt-gt-wrap span.gt-col-label-static {
    color: #212529;
    font-weight: 500;
}

.bsgt-gt-wrap .bsgt-gt .gt-filter-wrap .form-control,
.bsgt-gt-wrap .bsgt-gt .gt-filter-wrap .form-select {
    font-size: inherit;
    padding: 0.15rem 0.4rem;
    line-height: 1.25;
    border-radius: 2px;
    min-height: 1.55rem;
}

.bsgt-gt-wrap .bsgt-gt .gt-filter-wrap input[type="search"] {
    -webkit-appearance: none;
    appearance: none;
}

.bsgt-gt-wrap .bsgt-gt .gt-filter-narrow .gt-filter-wrap .form-control,
.bsgt-gt-wrap .bsgt-gt .gt-filter-narrow .gt-filter-wrap .form-select {
    min-width: 3.25rem;
    max-width: 5.5rem;
}

.bsgt-gt-wrap .bsgt-gt .gt-filter-medium .gt-filter-wrap .form-control {
    min-width: 5rem;
    max-width: 8rem;
}

.bsgt-gt-wrap .bsgt-gt .gt-filter-wide .gt-filter-wrap .form-control {
    min-width: 6rem;
    width: 100%;
    max-width: 12rem;
}

.bsgt-gt-wrap .gt-date-filter-range {
    display: none;
}

.bsgt-gt-wrap .gt-date-filter.gt-date-filter-range-open .gt-date-filter-range {
    display: block;
    margin-top: 0.25rem;
}

.bsgt-gt-wrap .gt-date-filter .gt-date-filter-exact,
.bsgt-gt-wrap .gt-date-filter .gt-date-filter-range input[type="date"] {
    min-width: 0;
    width: 100%;
    max-width: 10rem;
}

.bsgt-gt-wrap .gt-date-filter-toggle {
    flex-shrink: 0;
    line-height: 1;
    min-height: 1.55rem;
}

.bsgt-gt-wrap button.gt-sort-btn.gt-sorted-asc::after {
    content: " \25B2";
    font-size: 0.75em;
    opacity: 0.7;
    font-weight: 400;
}

.bsgt-gt-wrap button.gt-sort-btn.gt-sorted-desc::after {
    content: " \25BC";
    font-size: 0.75em;
    opacity: 0.7;
    font-weight: 400;
}

.bsgt-gt-wrap .bsgt-gt tbody tr.gt-sep-row td {
    border-top: 2px solid rgba(0, 0, 0, 0.12);
}

/* PHP placeholder until gt_grid.js fetch + render replaces tbody. */
.bsgt-gt-wrap .bsgt-gt.table-hover > tbody > tr.gt-loading-row:hover > td {
    --bs-table-hover-bg: var(--bs-table-bg);
}

.bsgt-gt-wrap .bsgt-gt.table-hover > tbody > tr.gt-empty-state-row:hover > td {
    --bs-table-hover-bg: var(--bs-table-bg);
}

.bsgt-gt-wrap #your-prices-toolbar {
    font-size: var(--xbl-fs-body);
}

.bsgt-gt-wrap .gt-pager {
    flex: 1 1 12rem;
    min-width: 0;
    max-width: 100%;
}

.bsgt-gt-wrap .gt-pager.gt-pager-bottom-slot {
    flex: 0 1 auto;
}

.bsgt-gt-wrap .gt-pager .gt-page-input-wrap {
    font-size: var(--xbl-fs-ui);
}

/* No Bootstrap .form-control here — site-wide .form-control uses 44px / 1rem !important */
.gt-pager input.gt-page-current {
    box-sizing: border-box;
    display: inline-block;
    width: 2rem;
    min-width: 1.5rem;
    max-width: 3.25rem;
    height: 1.875rem;
    margin: 0;
    padding: 0 0.15rem;
    font-size: var(--xbl-fs-reduced);
    line-height: 1.25;
    text-align: center;
    vertical-align: middle;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-sm);
}

.gt-pager input.gt-page-current:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.bsgt-gt-wrap .gt-pager .gt-page-size {
    width: auto;
    min-width: 4.25rem;
}
