/*
 * Room for the bulk-action bar — global admin polish.
 *
 * Unfold shows the "Chọn hành động" bar only once a row is ticked
 * (`group-has-[input.action-select:checked]:flex`) and pins it with
 * `fixed bottom-0 lg:bottom-[64px] lg:h-[64px]`
 * (unfold/helpers/change_list_actions.html). Being fixed, it takes no space in
 * the flow, so it lies on top of the last rows of the list — the bottom rows
 * are unreachable while any row is selected (user report 2026-08-25).
 *
 * Reserve the bar's height at the end of the list, and only while it is on
 * screen: the same `:has()` condition Unfold itself keys the bar on, so there
 * is no dead white strip when nothing is selected. Pure CSS (no Tailwind
 * utilities, so it survives Unfold's precompiled build); loaded on every admin
 * page via UNFOLD["STYLES"], because every changelist in every app has the
 * same bar.
 */
#changelist-form:has(input.action-select:checked) {
  /* Bar (64px) + its own padding (12px) + a little air. */
  padding-bottom: 88px;
}

@media (min-width: 1024px) {
  /* From `lg` up the bar rides 64px above the viewport bottom, where the
   * sticky pagination row already sits — so only the bar's own height has to
   * be reserved on top of it. */
  #changelist-form:has(input.action-select:checked) {
    padding-bottom: 80px;
  }
}
