/**
 * ProScore DataTables overrides
 * Keep vendor bundles untouched and centralize house styling here.
 */

:root {
  --ps-dt-button-font-size: 0.8125rem;
  --ps-dt-button-line-height: 1.2;
  --ps-dt-button-padding-y: 0.375rem;
  --ps-dt-button-padding-x: 0.7rem;
  --ps-dt-button-gap: 0;
  --ps-dt-button-radius: 0;
  --ps-dt-button-min-height: 2rem;
  --ps-dt-button-shadow: none;
}

.dt-container .dt-buttons,
.dataTables_wrapper .dt-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ps-dt-button-gap);
  width: auto !important;
  max-width: 100%;
  flex: 0 0 auto;
}

.dt-container .dt-buttons > .btn,
.dt-container .dt-buttons > .dt-button,
.dt-container .dt-buttons > .btn-group,
.dataTables_wrapper .dt-buttons > .btn,
.dataTables_wrapper .dt-buttons > .dt-button,
.dataTables_wrapper .dt-buttons > .btn-group {
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.dt-container .dt-buttons .btn,
.dt-container .dt-buttons .dt-button,
.dt-container .btn-group > .btn,
.dt-container .buttons-collection,
.dataTables_wrapper .dt-buttons .btn,
.dataTables_wrapper .dt-buttons .dt-button,
.dataTables_wrapper .buttons-collection,
.dt-button-collection .dt-button,
.dt-button-collection button,
.dt-button-collection a,
.dtsp-searchPane .dt-button,
.dtsp-searchPane .btn,
.dtsb-searchBuilder .dt-button,
.dtsb-searchBuilder .btn {
  min-height: var(--ps-dt-button-min-height) !important;
  padding: var(--ps-dt-button-padding-y) var(--ps-dt-button-padding-x) !important;
  font-size: var(--ps-dt-button-font-size) !important;
  line-height: var(--ps-dt-button-line-height) !important;
  border-radius: var(--ps-dt-button-radius) !important;
  box-shadow: var(--ps-dt-button-shadow) !important;
}

.dt-container .dt-buttons .btn,
.dt-container .dt-buttons .dt-button,
.dt-container .buttons-collection,
.dataTables_wrapper .dt-buttons .dt-button,
.dataTables_wrapper .dt-buttons .btn,
.dataTables_wrapper .buttons-collection {
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.dt-container .dt-buttons .btn > span,
.dt-container .dt-buttons .dt-button > span,
.dataTables_wrapper .dt-buttons .btn > span,
.dataTables_wrapper .dt-buttons .dt-button > span,
.dt-button-collection .dt-button > span,
.dtsp-searchPane .dt-button > span,
.dtsb-searchBuilder .dt-button > span {
  font-size: inherit !important;
  line-height: inherit !important;
}

.dt-container .dt-button-collection,
.dataTables_wrapper .dt-button-collection {
  padding: 0.35rem;
  border-radius: 0;
}

.dt-container .dt-button-collection .dt-button,
.dt-container .dt-button-collection button,
.dt-container .dt-button-collection a,
.dataTables_wrapper .dt-button-collection .dt-button,
.dataTables_wrapper .dt-button-collection button,
.dataTables_wrapper .dt-button-collection a {
  min-height: auto !important;
  padding: 0.45rem 0.7rem !important;
  border-radius: 0 !important;
}

.dtsp-searchPanes .dtsp-paneInputButton,
.dtsp-searchPanes .dtsp-clearAll,
.dtsp-searchPanes .dtsp-collapseAll,
.dtsp-searchPanes .dtsp-showAll,
.dtsb-searchBuilder button {
  min-height: var(--ps-dt-button-min-height);
  font-size: var(--ps-dt-button-font-size);
}

@media (max-width: 767.98px) {
  .dt-container .dt-buttons,
  .dataTables_wrapper .dt-buttons {
    gap: 0;
  }

  .dt-container .dt-buttons .btn,
  .dt-container .dt-buttons .dt-button,
  .dt-container .buttons-collection,
  .dataTables_wrapper .dt-buttons .dt-button,
  .dataTables_wrapper .dt-buttons .btn,
  .dataTables_wrapper .buttons-collection {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.75rem !important;
  }
}
