/* DataTables normalization on top of common.css */
.dataTables_wrapper { padding-top: .1rem; }

/* ---------- Settings-driven table density/style (default = comfortable/striped,
   already the baseline .6rem/.65rem padding below, so those two variants need
   no override here) ---------- */
body.table-density-compact table.dataTable td,
body.table-density-compact table.dataTable th { padding: .35rem .5rem !important; }
body.table-density-spacious table.dataTable td,
body.table-density-spacious table.dataTable th { padding: .85rem .9rem !important; }

body.table-style-bordered table.dataTable.table td,
body.table-style-bordered table.dataTable.table th { border: 1px solid var(--alms-card-border) !important; }
body.table-style-plain table.dataTable.alms-datatable { --bs-table-striped-bg: transparent; --bs-table-hover-bg: transparent; }
table.dataTable.no-footer { border-bottom: 1px solid var(--alms-card-border); }
table.dataTable thead th.sorting:before,
table.dataTable thead th.sorting:after { opacity: .35; }
.dataTables_wrapper .row:first-child { margin-bottom: .5rem; }
.dataTables_wrapper .row:last-child { margin-top: .5rem; align-items: center; }
td.dt-actions { white-space: nowrap; width: 1%; }
td.dt-center { text-align: center; }

/* ---------- Skeleton loading placeholder (first load only, see datatable.js) ----------
   DataTables renders its "no data yet" state as a single <td class="dataTables_empty">
   spanning every column — datatable.js decorates that one cell (rather than
   writing into the tbody itself) with several stacked flex rows that read as
   shimmering table rows, so there's nothing to clean up once real data
   arrives and DataTables redraws the tbody wholesale on its own. While it's
   showing, the built-in "Processing" overlay is suppressed via the wrapper
   class datatable.js adds/removes, so the two loading indicators don't stack. */
.dataTables_wrapper.dt-skeleton-active .dataTables_processing { display: none !important; }
td.dataTables_empty.dt-skeleton-cell { text-align: left; padding: .4rem .65rem; }
.dt-skeleton-empty { display: flex; flex-direction: column; gap: 12px; }
.dt-skeleton-empty-row { display: flex; align-items: center; gap: 1.2rem; }
.skeleton-bar {
    display: inline-block;
    flex: 1 1 0;
    height: 11px;
    min-width: 24px;
    border-radius: 5px;
    background: linear-gradient(90deg, rgba(20,30,50,.07) 25%, rgba(20,30,50,.15) 37%, rgba(20,30,50,.07) 63%);
    background-size: 400% 100%;
    animation: alms-skeleton-shimmer 1.4s ease infinite;
}
.dt-skeleton-empty-row .skeleton-bar:last-child { flex: 0 0 32px; }
@keyframes alms-skeleton-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}
[data-theme="dark"] .skeleton-bar {
    background: linear-gradient(90deg, rgba(255,255,255,.06) 25%, rgba(255,255,255,.16) 37%, rgba(255,255,255,.06) 63%);
    background-size: 400% 100%;
}
