/* Shared DataTables export buttons — matches the Logs page (.logs-dt-export-btn).
   Buttons render as .dt-button (buttons.dataTables) or .btn.btn-secondary
   (buttons.bootstrap5) depending on the page, so both are covered. Selectors are
   deliberately specific + !important so they win over older page styles
   (report.css, bagatelle-water-report.css, buttons.dataTables.css). */
.dt-buttons{display:flex;gap:.55rem;flex-wrap:wrap;float:none;}

/* Table toolbar layouts (DataTables dom strings):
   - With length:    "<'ascencia-dt-search'f><'ascencia-dt-toolbar'lB>rt<'ascencia-dt-footer'ip>"
                     search on its own row (right), then length (left) + export buttons (right).
   - Without length: "<'ascencia-dt-toolbar'<'ascencia-dt-toolbar-end'Bf>>rtip"
                     search + export buttons together on the right; the right-hand group is
                     row-reverse so the buttons stay at the far right and search wraps first. */
.ascencia-dt-search{
  display:flex;justify-content:flex-end;margin-bottom:.6rem;
}
.ascencia-dt-toolbar{
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;column-gap:.25rem;row-gap:.6rem;margin-bottom:.9rem;
}
.ascencia-dt-toolbar-end{
  display:flex;flex-direction:row-reverse;align-items:center;justify-content:flex-start;
  flex-wrap:wrap;gap:.6rem;
  flex:1 1 0;min-width:min-content;
}
.ascencia-dt-search .dataTables_filter,
.ascencia-dt-toolbar .dataTables_length,
.ascencia-dt-toolbar .dataTables_filter,
.ascencia-dt-toolbar .dt-buttons{
  float:none !important;margin:0 !important;padding:0 !important;text-align:left;
}
.ascencia-dt-toolbar .dt-buttons{flex-wrap:nowrap;gap:.4rem;}
.ascencia-dt-search .dataTables_filter label,
.ascencia-dt-toolbar .dataTables_filter label,
.ascencia-dt-toolbar .dataTables_length label{margin:0;display:inline-flex;align-items:center;gap:.4rem;white-space:nowrap;}
.ascencia-dt-search .dataTables_filter input,
.ascencia-dt-toolbar .dataTables_filter input{margin-left:0 !important;}
.ascencia-dt-footer{
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:.6rem;margin-top:.9rem;
}
.ascencia-dt-footer .dataTables_info,
.ascencia-dt-footer .dataTables_paginate{float:none !important;margin:0 !important;padding-top:0 !important;}
@media (max-width:576px){
  .ascencia-dt-search{justify-content:flex-start;}
  .ascencia-dt-toolbar-end{flex-direction:row;flex-basis:100%;}
  .ascencia-dt-toolbar .dt-buttons{flex-wrap:wrap;}
}
.dt-buttons .ascencia-export-btn,
.dt-buttons .dt-button.ascencia-export-btn,
.dt-buttons .btn.ascencia-export-btn{
  margin:0 !important;
  background:var(--card-bg, #fff) !important;
  background-image:none !important;
  border:1px solid var(--border-strong, #cbd5e1) !important;
  color:var(--text-body, #334155) !important;
  border-radius:var(--radius-md, 10px) !important;
  box-shadow:none !important;
  font-size:.78rem !important;font-weight:700 !important;line-height:1.5 !important;
  padding:.45rem .85rem !important;
  transform:none !important;
  transition:background var(--t-fast, .15s);
}
.dt-buttons .ascencia-export-btn:hover,
.dt-buttons .ascencia-export-btn:focus,
.dt-buttons .dt-button.ascencia-export-btn:hover,
.dt-buttons .btn.ascencia-export-btn:hover{
  background:var(--chip-bg, #f1f5f9) !important;
  background-image:none !important;
  border:1px solid var(--border-strong, #cbd5e1) !important;
  color:var(--text-body, #334155) !important;
}
