/* UI overrides for ATMS (DataTables toolbar + buttons)
   Keep this file small and loaded after assets/css/style.css */

/* DataTables top toolbar layout (Buttons + length + filter) */
.dataTables_wrapper .dt-buttons,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  float: none !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 10px 12px 0;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
  margin: 0;
  font-weight: 500;
  color: #333;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  height: 36px;
  padding: 6px 10px;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  outline: none;
}

/* Bottom footer layout (info + pagination) */
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  float: none !important;
  margin-top: 10px;
}

.dataTables_wrapper .dataTables_info {
  color: #6c757d;
  font-size: 13px;
}

.dataTables_wrapper .dataTables_paginate {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border: 1px solid #e3e3e3 !important;
  background: #fff !important;
  color: #333 !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
  margin: 0 !important; /* avoid "PreviousNext" sticking together */
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #f6f6f6 !important;
  border-color: #d8d8d8 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: linear-gradient(to right, #ff9b44 0%, #fc6075 100%) !important;
  color: #fff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.55;
  cursor: not-allowed !important;
}

@media (min-width: 769px) {
  .dataTables_wrapper .dataTables_info {
    display: inline-block;
    width: 50%;
  }
  .dataTables_wrapper .dataTables_paginate {
    display: inline-flex;
    width: 50%;
  }
}

/* Make the Excel button look like a Bootstrap button */
.dataTables_wrapper .dt-buttons .dt-button {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(to right, #ff9b44 0%, #fc6075 100%);
  color: #fff !important;
  padding: 7px 12px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.dataTables_wrapper .dt-buttons .dt-button:hover,
.dataTables_wrapper .dt-buttons .dt-button:focus {
  filter: brightness(0.97);
  outline: none;
}

/* Responsive: stack controls cleanly on small screens */
@media (max-width: 768px) {
  .dataTables_wrapper .dt-buttons,
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    display: flex;
    width: 100%;
    justify-content: flex-start;
    margin-right: 0;
  }
  .dataTables_wrapper .dataTables_filter input {
    width: 100%;
  }
  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    width: 100%;
  }
  .dataTables_wrapper .dataTables_paginate {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}


