/* Enable horizontal scrolling on small screens */
.table-responsive {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Adjust card header layout on small devices */
@media (max-width: 576px) {
  .d-flex.justify-content-between.align-items-center.flex-wrap.gap-3.mb-3 {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  .dt-buttons {
    margin-top: 1rem;
  }

  .card-datatable {
    padding: 0.5rem !important;
  }
}

/* Table cell alignment */
.datatables-basic thead th {
  text-align: left;
}

.datatables-basic tbody td {
  vertical-align: middle;
}

/* Center SL NO and Actions columns */
.datatables-basic tbody td:nth-child(1),
.datatables-basic tbody td:last-child {
  text-align: center;
}

/* Make offcanvas full width on mobile */
@media (max-width: 576px) {
  .offcanvas.offcanvas-end {
    width: 100vw !important;
    max-width: 100vw !important;
  }
}

/* Responsive font size for table */
@media (max-width: 576px) {

  .datatables-basic th,
  .datatables-basic td {
    font-size: 0.95rem;
    padding: 0.5rem 0.25rem;
  }
}