/* ============================================
   全局表格 hover 效果移除 - 最高優先級規則
   此文件必須在所有其他 CSS 文件之後載入
   以確保完全覆蓋 Bootstrap 的表格 hover 效果
   ============================================ */

/* 首先，禁用所有表格元素的 box-shadow inset 效果 */
table > :not(caption) > * > *,
table.table > :not(caption) > * > *,
table.table-hover > :not(caption) > * > *,
table.table-dark > :not(caption) > * > *,
table.table-striped > :not(caption) > * > * {
  box-shadow: none !important;
}

/* 全局表格文字顏色統一為黑色 */
table,
table th,
table td,
table thead th,
table tbody td,
table tbody th,
table tfoot td,
table tfoot th,
table caption,
table a,
table small,
table span,
table p,
table .text-muted,
table .text-info,
table .text-white,
table .text-secondary {
  color: #000000 !important;
}

/* 針對 hover 狀態下的所有表格單元格 - 使用最通用的選擇器 */
table tbody tr:hover td,
table tbody tr:hover th,
table.table tbody tr:hover td,
table.table tbody tr:hover th,
table.table-hover tbody tr:hover td,
table.table-hover tbody tr:hover th,
table.table-hover > tbody > tr:hover > td,
table.table-hover > tbody > tr:hover > th,
table.table-dark tbody tr:hover td,
table.table-dark tbody tr:hover th,
table.table-dark.table-hover tbody tr:hover td,
table.table-dark.table-hover tbody tr:hover th,
table.table-dark.table-hover > tbody > tr:hover > td,
table.table-dark.table-hover > tbody > tr:hover > th,
table.table.table-dark.table-hover tbody tr:hover td,
table.table.table-dark.table-hover tbody tr:hover th,
table.table.table-dark.table-striped.table-hover tbody tr:hover td,
table.table.table-dark.table-striped.table-hover tbody tr:hover th,
.video-file-table tbody tr:hover td,
.video-file-table tbody tr:hover th,
.video-file-table.table-hover tbody tr:hover td,
.video-file-table.table-hover tbody tr:hover th,
#searchResultsModal table tbody tr:hover td,
#searchResultsModal table tbody tr:hover th {
  box-shadow: none !important;
  --bs-table-accent-bg: transparent !important;
  --bs-table-hover-bg: transparent !important;
  background-color: inherit !important;
  background: inherit !important;
}

/* 針對所有可能的表格行 hover 狀態 */
table tbody tr:hover,
table.table tbody tr:hover,
table.table-hover tbody tr:hover,
table.table-hover > tbody > tr:hover,
table.table-dark tbody tr:hover,
table.table-dark.table-hover tbody tr:hover,
table.table-dark.table-hover > tbody > tr:hover,
table.table.table-dark.table-hover tbody tr:hover,
table.table.table-dark.table-striped.table-hover tbody tr:hover {
  --bs-table-accent-bg: transparent !important;
  --bs-table-hover-bg: transparent !important;
  background: inherit !important;
  box-shadow: none !important;
}
