/* bulk.css — row selection and the bulk delete bar and modal (stream A1, main §4.1).
   Created and linked by WP0c; the owning stream fills it. */

/* Row and header checkboxes (rendered hidden by the core grid; grid-select.js shows them). */
.grid .row-select, .grid .select-all {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0 .4rem 0 0;
  vertical-align: middle;
  cursor: pointer;
  accent-color: var(--accent);
}
/* A selected row: the checked box says it; the tint only repeats it (never colour alone). */
.grid tbody tr[aria-selected="true"] > td { background: color-mix(in srgb, var(--accent-soft) 70%, transparent); }
.grid tbody tr[aria-selected="true"] > td.row-head { background: var(--accent-soft); }

/* The selection bar: sticky at the bottom of the viewport while rows are selected. */
.bulkbar {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  margin: .75rem 0 0;
  padding: .6rem 1rem;
  background: var(--panel-alt);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.bulkbar-count { margin: 0; }
.bulkbar-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.bulkbar-reason, .bulkbar-status { flex-basis: 100%; margin: 0; font-size: 13px; }
.bulkbar-reason { color: var(--muted); }
.bulkbar-status { color: var(--bad); }
/* Takes no room while the bar is sticky (it is in the flow itself); see the ≤ 480 px block. */
.bulkbar-spacer { height: 0; }

/* The Delete… modal body (inside core.js confirmModal). */
.bulk-modal .bulk-allornothing { margin: 0 0 .5rem; font-weight: 600; }
.bulk-modal .bulk-status { margin: .5rem 0; }
.bulk-modal .bulk-run { margin: 0 0 .5rem; }
.bulk-report[aria-busy="true"] { color: var(--muted); }
.bulk-report .batch-report { margin: .5rem 0 0; }

/* ≤ 480 px: a full-width bottom sheet with wrapping buttons, and the spacer holds the room the sheet no longer takes
   in the flow (only this bar's height, --bulkbar-h: a sticky bar of another stream still reserves its own). The blur
   of the panel that would otherwise capture the fixed position is dropped in app.css (core-change CCR-A1-2), so no
   rule here touches a selector another stream owns. */
@media (max-width: 480px) {
  .bulkbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    border-width: 1px 0 0;
    border-radius: 0;
  }
  .bulkbar-actions { width: 100%; }
  .bulkbar-actions button { flex: 1 1 auto; }
  .bulkbar-spacer { height: var(--bulkbar-h, 0px); }
}
