/* Custom Tabulator 6.4 Color Overrides
 * Using project colors:
 *   - Orange: #d65531
 *   - Blue: #3b86b2
 */

/* Header */
.tabulator .tabulator-header,
.tabulator .tabulator-header .tabulator-col {
  background: #3b86b2;
  color: #ffffff;
}

.tabulator .tabulator-header .tabulator-col.tabulator-moving {
  background: #3b86b2;
  color: #ffffff;
}

/* Sortable hover - changed to blue tint */
@media (hover: hover) and (pointer: fine) {
  .tabulator
    .tabulator-header
    .tabulator-col.tabulator-sortable.tabulator-col-sorter-element:hover {
    background-color: rgba(59, 134, 178, 0.2);
  }
}

/* Sort arrows */
.tabulator
  .tabulator-header
  .tabulator-col.tabulator-sortable[aria-sort="ascending"]
  .tabulator-col-content
  .tabulator-col-sorter,
.tabulator
  .tabulator-header
  .tabulator-col.tabulator-sortable[aria-sort="descending"]
  .tabulator-col-content
  .tabulator-col-sorter {
  color: #d65531;
}

.tabulator
  .tabulator-header
  .tabulator-col.tabulator-sortable[aria-sort="ascending"]
  .tabulator-col-content
  .tabulator-col-sorter
  .tabulator-arrow {
  border-bottom-color: #d65531;
}

.tabulator
  .tabulator-header
  .tabulator-col.tabulator-sortable[aria-sort="descending"]
  .tabulator-col-content
  .tabulator-col-sorter
  .tabulator-arrow {
  border-top-color: #d65531;
}

/* Frozen columns - borders */
.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left,
.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right,
.tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-left,
.tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-right {
  border-color: #3b86b2;
}

/* Calculations header - blue tint */
.tabulator .tabulator-header .tabulator-calcs-holder,
.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row {
  background: rgba(59, 134, 178, 0.1) !important;
}

/* Row selection - blue */
.tabulator-row.tabulator-selected {
  background-color: rgba(59, 134, 178, 0.3);
}

@media (hover: hover) and (pointer: fine) {
  .tabulator-row.tabulator-selected:hover {
    background-color: rgba(59, 134, 178, 0.4);
  }
}

/* Range selection - blue */
.tabulator .tabulator-tableholder .tabulator-range-overlay .tabulator-range {
  border-color: #3b86b2;
}

.tabulator
  .tabulator-tableholder
  .tabulator-range-overlay
  .tabulator-range.tabulator-range-active:after {
  background-color: #3b86b2;
}

.tabulator
  .tabulator-tableholder
  .tabulator-range-overlay
  .tabulator-range-cell-active {
  border-color: #3b86b2;
}

.tabulator-row
  .tabulator-cell.tabulator-range-selected:not(
    .tabulator-range-only-cell-selected
  ):not(.tabulator-range-row-header) {
  background-color: rgba(59, 134, 178, 0.3);
}

/* Row range highlight header */
.tabulator-row.tabulator-range-selected
  .tabulator-cell.tabulator-range-row-header,
.tabulator-row.tabulator-range-highlight.tabulator-range-selected
  .tabulator-cell.tabulator-range-row-header,
.tabulator .tabulator-header .tabulator-col.tabulator-range-selected {
  background-color: #d65531;
  color: #fff;
}

/* Calculations footer */
.tabulator .tabulator-footer .tabulator-calcs-holder,
.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row {
  background: rgba(59, 134, 178, 0.1) !important;
}

/* Pagination active - orange */
.tabulator .tabulator-footer .tabulator-page.active {
  color: #d65531;
  font-weight: bold;
}

.tabulator-page-size {
  width: unset !important;
}

/* Editing cell border - orange */
.tabulator-row .tabulator-cell.tabulator-editing {
  border-color: #d65531;
}

/* Toggle on state - blue */
.tabulator-toggle.tabulator-toggle-on {
  background: #3b86b2;
}

/* Edit list active item - blue */
.tabulator-edit-list .tabulator-edit-list-item.active,
@media (hover:hover) and (pointer:fine) {
  .tabulator-edit-list .tabulator-edit-list-item:hover {
    background: #3b86b2;
  }
}

.tabulator-edit-list .tabulator-edit-list-item.focused {
  outline-color: #3b86b2;
}

/* Responsive collapse toggle - blue */
.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle {
  background: #3b86b2;
}

/* Column resize handle hover - blue */
@media (hover: hover) and (pointer: fine) {
  .tabulator .tabulator-col-resize-handle:hover {
    cursor: ew-resize;
  }
}

.tabulator .tabulator-col-resize-guide {
  background-color: #3b86b2;
}

.tabulator .tabulator-row-resize-guide {
  background-color: #3b86b2;
}

/* Links inside paragraphs, headings, lists, and inline text elements */
.tabulator-cell a {
  color: var(--color-blue-600);
  text-decoration: underline;
}

.tabulator-cell a:hover {
  color: var(--color-blue-800);
}

.tabulator-cell a:visited {
  color: var(--color-blue-700);
}

/* Group header hover */
@media (hover: hover) and (pointer: fine) {
  .tabulator-row.tabulator-group:hover {
    background-color: rgba(59, 134, 178, 0.15);
  }
}

/* Menu item hover - blue */
@media (hover: hover) and (pointer: fine) {
  .tabulator-menu
    .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover {
    background: rgba(59, 134, 178, 0.1);
    color: #3b86b2;
  }
}
