/* Universal list search - styling for the auto-injected search boxes.
 *
 * The injected box carries BOTH .customer-search (so it inherits the exact
 * look of the customers.php search you already like) and .cp-search (our own
 * hook). customer-search.css does the heavy lifting; this file only adds what
 * that file scoped specifically to #customer-list-table, so the same visuals
 * apply on every other page too.
 */

/* Hide filtered-out rows on ANY table, not just the customers table.
   (customer-search.css scopes this to #customer-list-table only.) */
table tbody tr.is-filtered-out {
  display: none !important;
}

/* The "no matches" row we inject, styled like the customers one. */
table tbody tr.cp-search-empty td {
  text-align: center;
  padding: 28px 16px;
  color: #5b6f7b;
  background: #f8fbfc;
  font-weight: 600;
}

/* Sit the search box neatly inside a panel, above its table. */
.cp-search {
  margin: 0 0 14px;
}

/* When a panel is padding-less (.table-wrap pages), pull the search box in
   so it lines up with the table instead of hugging the panel border. */
.table-wrap > .cp-search,
.panel.table-wrap > .cp-search {
  margin: 12px 14px 12px;
}

/* A page can have more than one searchable table (staff centre, accounting).
   Keep spacing tight so stacked blocks stay readable. */
.cp-search + .table-wrap,
.cp-search + table {
  margin-top: 0;
}

@media (max-width: 650px) {
  .cp-search {
    padding: 10px 12px;
  }
}

/* Printing: never print the search box. */
@media print {
  .cp-search {
    display: none !important;
  }
}
