/* ============================================================================
   Hub listing kit  -  the component vocabulary for server-rendered (GET) report
   pages, re-themed to the reference admin look.

   Used by reports/seller/transactions.php (reference page) and every page that
   adopts these classes:  .page-header*  .filter-bar*  .filter-chip*  .data-table
   .data-table--compact  .dt-actions / .btn-kebab  .dt-state*  .dt-skel
   .dt-col-secondary   (+ the cell / row / status helpers, defined in hub-tables.css).

   Single source of truth split:
     data-tables.css  (this file)  tokens, page header, filter bar, table wrapper box,
                                   kebab row menu, empty / error / skeleton states
     hub-tables.css                the table skin itself (.table-neo look on .data-table > table
                                   and the other legacy wrappers), .cell-* / .row-* / .status-badge*
                                   helpers, pills, DataTables chrome

   The --dt-* / --st-* tokens below are views onto the --tn-* palette that hub-tables.css
   defines, so there is exactly one set of values.
   ============================================================================ */

:root {
    --dt-border:       var(--tn-line, #e7e9eb);         /* card / table outline        */
    --dt-radius:       10px;
    --dt-muted:        var(--tn-sub, #98a2b3);

    /* status semantics (pill inks) */
    --st-danger:   var(--tn-red-ink, #d64545);
}

/* ---- filter bar  (== reference .card.filter-card) ------------------------------ */
/* buttons match the 40px inputs (form.row .btn in hub-theme.css would otherwise win with a shorter box) */
/* active-filter indicator */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border: 1px solid var(--role-accent-border, #cdd2ee);
    border-radius: 999px;
    background: var(--role-accent-soft, #eef0fb);
    color: var(--role-accent-text, #475191);
    font-size: 12px;
    font-weight: 600;
}
.filter-chip__x { cursor: pointer; opacity: .7; text-decoration: none; }
.filter-chip__x:hover { opacity: 1; }

/* ---- row action menu (kebab)  -  btn-light look, reference popover ------------- */
.dt-actions {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
}
.dt-actions .btn-kebab {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--dt-border);
    border-radius: 7px;
    background: #eef2f7;
    color: #313a46;
    line-height: 1;
}
.dt-actions .btn-kebab:hover,
.dt-actions .btn-kebab:focus-visible { background: #e3e8ef; color: #1d2939; }
.dt-actions .btn-kebab i { font-size: 15px; line-height: 1; }
.dt-actions .dropdown-menu {
    min-width: 190px;
    padding: 6px;
    border: 1px solid var(--dt-border);
    border-radius: var(--dt-radius);
    box-shadow: 0 8px 28px rgba(16, 24, 40, .12);
}
.dt-actions .dropdown-item {
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 13px;
}
.dt-actions .dropdown-item .ti { width: 16px; }
.dt-actions .dropdown-divider { margin: 5px 2px; }
.dt-actions .dropdown-item--danger { color: var(--st-danger); }
.dt-actions .dropdown-item--danger:hover,
.dt-actions .dropdown-item--danger:focus { background: var(--tn-red-bg, #fdeaea); color: var(--st-danger); }

/* ---- states: empty / no-results / error / loading --------------------------
   (partials/dt_empty.php renders .dt-state as the single row of an empty table) */
.dt-state {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--dt-muted);
}
.dt-state__icon {
    display: block;
    margin-bottom: .5rem;
    font-size: 28px;
    line-height: 1;
    opacity: .5;
}
.dt-state__title { font-size: 13px; font-weight: 600; color: #667085; }
.dt-state__msg   { margin-top: 2px; font-size: 12.5px; }
.dt-state__cta   { margin-top: .85rem; }

/* skeleton loading rows - no layout shift, no spinner jump */


/* B17 / R-063 (delegated SIM consoles only: only they carry .sim-act-wrap): on phones let the row buttons wrap two to a line so that Number and Action fit next to each other. Responsive measures the natural width of a column in a clone of the cell, so the rule is on the container itself, not on td.act-cell. */
@media (max-width: 767.98px) {
    .sim-act-wrap { max-width: 76px; }
    table[data-sim-delegated] .sim-label { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .content-page table[data-sim-delegated] td.act-cell { min-width: 0; }
}
