/**
 * Clickable Rows Styles for DataTables
 * Makes table rows appear clickable with hover effects
 */

/* Base clickable row styles */
.table-clickable-rows tbody tr:not(.child):not(.dtrg-group) {
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}

/* Hover effect for clickable rows */
.table-clickable-rows tbody tr:not(.child):not(.dtrg-group):hover {
  background-color: rgba(var(--bs-primary-rgb), 0.08) !important;
}

/* Dark mode support */
[data-bs-theme="dark"] .table-clickable-rows tbody tr:not(.child):not(.dtrg-group):hover,
.dark-style .table-clickable-rows tbody tr:not(.child):not(.dtrg-group):hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Maintain striped row colors on hover for striped tables */
.table-striped.table-clickable-rows tbody tr:nth-of-type(odd):not(.child):not(.dtrg-group):hover {
  background-color: rgba(var(--bs-primary-rgb), 0.12) !important;
}

/* Ensure action buttons don't have pointer cursor inheritance */
.table-clickable-rows tbody tr td button,
.table-clickable-rows tbody tr td a,
.table-clickable-rows tbody tr td .btn,
.table-clickable-rows tbody tr td input,
.table-clickable-rows tbody tr td .switch,
.table-clickable-rows tbody tr td .form-check {
  cursor: pointer;
}

/* Visual hint for clickable rows - subtle left border on hover */
.table-clickable-rows tbody tr:not(.child):not(.dtrg-group):hover td:first-child {
  box-shadow: inset 3px 0 0 0 var(--bs-primary);
}

/* DataTables specific - ensure proper styling with responsive plugin */
.table-clickable-rows.dataTable tbody tr:not(.child):hover {
  cursor: pointer;
}

/* Remove pointer from child rows (responsive expanded content) */
.table-clickable-rows tbody tr.child,
.table-clickable-rows tbody tr.dtrg-group {
  cursor: default !important;
}

/* Alternating row hover colors */
.table-clickable-rows tbody tr:nth-child(even):not(.child):not(.dtrg-group):hover {
  background-color: rgba(var(--bs-primary-rgb), 0.06) !important;
}

.table-clickable-rows tbody tr:nth-child(odd):not(.child):not(.dtrg-group):hover {
  background-color: rgba(var(--bs-primary-rgb), 0.10) !important;
}
