/* Custom DataTable Styles for Column Resizing */

/* Enable column resizing cursor */
.dataTables_wrapper table.dataTable thead th {
  position: relative;
  cursor: col-resize;
}

/* Column resize handle */
.dataTables_wrapper table.dataTable thead th:after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  cursor: col-resize;
  background: transparent;
}

.dataTables_wrapper table.dataTable thead th:hover:after {
  background: rgba(0, 123, 255, 0.3);
}

/* Improved table styling */
.dataTables_wrapper table.dataTable {
  border-collapse: separate;
  border-spacing: 0;
}

.dataTables_wrapper table.dataTable thead th,
.dataTables_wrapper table.dataTable thead td {
  border-bottom: 2px solid #dee2e6;
  background-color: #f8f9fa;
  font-weight: 600;
  padding: 8px 12px;
}

.dataTables_wrapper table.dataTable tbody td {
  padding: 6px 12px;
  border-bottom: 1px solid #dee2e6;
}

/* Non-editable cell styling */
.not-editable {
  background-color: #f8f9fa !important;
  color: #6c757d !important;
  font-style: italic;
}

/* Responsive table improvements */
.dataTables_wrapper .dataTables_scroll {
  overflow-x: auto;
}

/* Column reorder styling */
.dataTables_wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > td.child,
.dataTables_wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > th.child,
.dataTables_wrapper table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty {
  cursor: default !important;
}

/* Tooltip styling for truncated text */
[title] {
  cursor: help;
}

/* Column reorder drop zone */
.dataTables_wrapper table.dataTable thead th.reorder-drop-zone {
  background-color: #e3f2fd !important;
  border: 2px dashed #2196f3 !important;
}

/* Improved button styling */
.dataTables_wrapper .dt-buttons {
  margin-bottom: 10px;
}

.dataTables_wrapper .dt-buttons .dt-button {
  background: #007bff;
  color: white;
  border: 1px solid #007bff;
  padding: 6px 12px;
  margin-right: 5px;
  border-radius: 4px;
  font-size: 14px;
}

.dataTables_wrapper .dt-buttons .dt-button:hover {
  background: #0056b3;
  border-color: #0056b3;
}

/* Responsive column visibility */
@media screen and (max-width: 768px) {
  .dataTables_wrapper table.dataTable thead th,
  .dataTables_wrapper table.dataTable tbody td {
    padding: 4px 8px;
    font-size: 12px;
  }
}

/* Loading indicator */
.dataTables_wrapper .dataTables_processing {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  margin-left: -100px;
  margin-top: -26px;
  text-align: center;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Search box styling */
.dataTables_wrapper .dataTables_filter input {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 6px 12px;
  margin-left: 8px;
}

/* Page length selector */
.dataTables_wrapper .dataTables_length select {
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 4px 8px;
  margin: 0 8px;
}

/* Pagination styling */
.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 6px 12px;
  margin: 0 2px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: white;
  color: #007bff;
  text-decoration: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

/* Info text styling */
.dataTables_wrapper .dataTables_info {
  padding-top: 8px;
  color: #6c757d;
}
