/* ════════════════════════════════════════════════════════════════════
   TLC SHARED CSS — DataTables sort icons
   Master / Single Source of Truth — TurnerLee.com
   URL:  https://turnerlee.com/shared/core/v1/datatables-fix.css
   ════════════════════════════════════════════════════════════════════
   Every TLC site loads this file via <link> in their All-HeaderScripts.html.
   Edit this file ONCE on TurnerLee and every site gets the update on next
   page load. Do NOT duplicate these rules into per-site Custom_css.

   What this fixes:
   - "Pile of arrows" caused by DT 1.13.1 CSS + DT 1.10.24 JS version
     mismatch (newer CSS ships SVG sprite background that tiles when paired
     with older JS class system).
   - Replaces the broken background-image with clean Unicode triangle
     pseudo-elements; works in any font (no FontAwesome dependency).
   - Active sort column (sorting_asc / sorting_desc) renders the directional
     indicator at full opacity; inactive columns show both ▲▼ at 0.3.
   ════════════════════════════════════════════════════════════════════ */

table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc,
table.dataTable thead th.sorting_asc_disabled,
table.dataTable thead th.sorting_desc_disabled {
  background-image: none !important;
  position: relative;
  cursor: pointer;
  padding-right: 30px !important;
}

html body table.dataTable.dataTable thead tr th.sorting:before,
html body table.dataTable.dataTable thead tr th.sorting_asc:before,
html body table.dataTable.dataTable thead tr th.sorting_desc:before,
html body table.dataTable.dataTable thead tr th.sorting_asc_disabled:before,
html body table.dataTable.dataTable thead tr th.sorting_desc_disabled:before {
  content: "\25B2" !important;          /* ▲ up triangle */
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important;  /* Force consistent triangle rendering across sites; brand fonts vary so Unicode glyphs differ */
  position: absolute !important;
  top: 50% !important;
  right: 1.4em !important;
  transform: translateY(-90%);
  font-size: 0.65em !important;
  line-height: 1 !important;
  opacity: 0.3 !important;
  display: block !important;
  background: none !important;
}

html body table.dataTable.dataTable thead tr th.sorting:after,
html body table.dataTable.dataTable thead tr th.sorting_asc:after,
html body table.dataTable.dataTable thead tr th.sorting_desc:after,
html body table.dataTable.dataTable thead tr th.sorting_asc_disabled:after,
html body table.dataTable.dataTable thead tr th.sorting_desc_disabled:after {
  content: "\25BC" !important;          /* ▼ down triangle */
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important;  /* Force consistent triangle rendering across sites; brand fonts vary so Unicode glyphs differ */
  position: absolute !important;
  top: 50% !important;
  right: 1.4em !important;
  transform: translateY(10%);
  font-size: 0.65em !important;
  line-height: 1 !important;
  opacity: 0.3 !important;
  display: block !important;
  background: none !important;
}

/* Active sort: bring the directional indicator to full opacity.
   Matches whether the th has both .sorting + .sorting_asc (DT default) OR
   just .sorting_asc on its own (some DT versions/plugins strip the .sorting
   class when active). Matches the same way for sorting_desc. */
html body table.dataTable.dataTable thead tr th.sorting_asc:before,
html body table.dataTable.dataTable thead tr th.sorting_desc:after {
  opacity: 1 !important;
}

/* Disabled-sort columns: hide their indicators entirely */
html body table.dataTable.dataTable thead tr th.sorting_asc_disabled:before,
html body table.dataTable.dataTable thead tr th.sorting_desc_disabled:after {
  opacity: 0 !important;
}


/* ════════════════════════════════════════════════════════════════════
   DataTables wrapper, search box, and responsive scroll — UX fixes
   ════════════════════════════════════════════════════════════════════
   Centralized improvements applied site-wide via the SST:
     1. Search input stays put (sticky-left) when the table scrolls
        horizontally on responsive — no more search box moving with data
     2. Search input adapts to On Dark / On Mix context — same treatment
        as it gets on white, no more bright white box on dark backgrounds
     3. Border lives on the wrapper, not the table — left and right edges
        stay visible at all viewport widths (was lost on horizontal scroll)
   ════════════════════════════════════════════════════════════════════ */

/* (3) Wrapper is the horizontal scroll container. Search box and "Showing X"
       info both stick to the left so they stay anchored as content scrolls.
       Border lives on the TABLE itself so it wraps only the data area, not
       search or info. Trade-off: scrollbar appears at wrapper bottom (below
       info). */
html body .dataTables_wrapper {
  background: transparent;
  position: relative;
  overflow: visible;            /* wrapper does NOT scroll — inner frame does */
  max-width: 100%;
  width: 100%;                  /* explicit so wrapper can't grow past parent */
  box-sizing: border-box;
}

/* Defensive: prevent ANY page-level horizontal scroll when a DataTable is on
   the page, regardless of which other elements are loaded on a given site.
   Different sites load different brand CSS bundles (MDB on some, swiper on
   others), so element width constraints vary — this clips at body level so
   no descendant can push the page wider than the viewport. */
html body:has(.dataTables_wrapper) {
  overflow-x: clip;
  max-width: 100vw;
}

/* The .tlc-table-frame is wrapped around just the table by datatables-init.js.
   Border + scroll + scrollbar-hide all live HERE, so search box (above) and
   info (below) sit OUTSIDE the bordered area. Border stays visible at all 4
   sides regardless of horizontal scroll position. */
html body .dataTables_wrapper .tlc-table-frame {
  border: 1px solid var(--bdr, rgba(0, 0, 0, 0.09));
  border-radius: 4px;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior: contain;
  max-width: 100%;
  /* Hide scrollbar visually — scroll behavior preserved (touch/trackpad). */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html body .dataTables_wrapper .tlc-table-frame::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* "Showing X of Y entries" info — left edge aligned with the table frame
   below it. Sits outside the bordered .tlc-table-frame as the user wants. */
html body .dataTables_wrapper .dataTables_info {
  padding: 8px 0 !important;
  background: transparent;
}

/* Reset table border — lives on the wrapper now to stay visible during scroll */
html body table.dataTable.dataTable {
  border: 0 !important;
  border-radius: 0;
}

/* (1) Search filter row — ALWAYS its own row above the table, full-width.
       Beats t_tlc-styles.css's .dataTables_filter { float:left } which would
       otherwise let the table flow alongside the search box. */
html body .dataTables_wrapper .dataTables_filter {
  display: block !important;
  float: none !important;
  width: 100% !important;
  text-align: left !important;
  padding: 8px 0 !important;
  margin: 0 0 4px !important;
  background: transparent;
  clear: both;
}

/* Tracker-style search: <input> + <button> in a flex row, button toggles
   "Search" / "Clear" via JS. Ported from .ct-* classes in
   Control-Tracker-Styles.html — same pattern as /ops/contacts. */
html body .dataTables_wrapper .ct-search-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}
html body .dataTables_wrapper input.ct-search-input.ct-search-input-ct {
  width: 260px;
  height: auto !important;
  line-height: normal !important;
  padding: 8px 12px !important;
  border: 1px solid var(--bdr, rgba(0, 0, 0, 0.15));
  border-radius: 4px;
  font-size: 0.9rem !important;
  background: #fff;
  color: rgba(0, 0, 0, 0.85);
  margin: 0 !important;
}
html body .dataTables_wrapper input.ct-search-input.ct-search-input-ct:focus {
  border-color: var(--color1, #002554);
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.06);
}
html body .dataTables_wrapper .ct-search-label-btn {
  background: transparent;
  border: none;
  color: var(--color1, #002554);
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0 4px;
  line-height: 1;
  cursor: pointer;
  min-width: 4.8em;     /* holds wider "SEARCH" so "CLEAR" doesn't shift layout */
  text-align: left;
  display: inline-block;
}
html body .dataTables_wrapper .ct-search-label-btn:hover,
html body .dataTables_wrapper .ct-search-label-btn:focus {
  color: var(--color2, #ce0e2d);
  outline: none;
  text-decoration: none;
}
@media (max-width: 575px) {
  html body .dataTables_wrapper .ct-search-wrap { width: 100%; }
  html body .dataTables_wrapper input.ct-search-input.ct-search-input-ct {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
}

/* (2) Search input — On Dark / On Mix contexts get a subtle translucent bg
       so the input doesn't look like a glaring white rectangle on dark surfaces.
       Targets the new .ct-search-input-ct class added by datatables-init.js. */
[id^="page-"].onDrk html body .dataTables_wrapper input.ct-search-input.ct-search-input-ct,
[id^="page-"].onMix html body .dataTables_wrapper input.ct-search-input.ct-search-input-ct,
html body .onDrk .dataTables_wrapper input.ct-search-input.ct-search-input-ct,
html body .onMix .dataTables_wrapper input.ct-search-input.ct-search-input-ct {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: var(--txt, rgba(255, 255, 255, 0.88)) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}
[id^="page-"].onDrk html body .dataTables_wrapper .ct-search-label-btn,
[id^="page-"].onMix html body .dataTables_wrapper .ct-search-label-btn,
html body .onDrk .dataTables_wrapper .ct-search-label-btn,
html body .onMix .dataTables_wrapper .ct-search-label-btn {
  color: var(--color2, #ce0e2d);
}

/* On Dark / On Mix table-frame border — lighter rgba so it's visible on dark bg. */
[id^="page-"].onDrk html body .dataTables_wrapper .tlc-table-frame,
[id^="page-"].onMix html body .dataTables_wrapper .tlc-table-frame,
html body .onDrk .dataTables_wrapper .tlc-table-frame,
html body .onMix .dataTables_wrapper .tlc-table-frame {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* ════════════════════════════════════════════════════════════════════
   On Dark / On Mix — internal cell dividers
   ════════════════════════════════════════════════════════════════════
   Without this override, per-site CSS (t_tlc-styles.css and friends)
   leaves th/td borders at near-white, producing bright slashes between
   the header row and data, and between the sticky NAME column and the
   scrolling cells. Force them to the same subtle tone the outer frame
   border and search input border use (rgba 255/255/255 @ 0.15).
   ════════════════════════════════════════════════════════════════════ */
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable,
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable thead,
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable tbody,
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable tfoot,
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable thead tr,
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable tbody tr,
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable tfoot tr,
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable thead th,
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable thead td,
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable tbody th,
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable tbody td,
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable tfoot th,
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable tfoot td,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable thead,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable tbody,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable tfoot,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable thead tr,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable tbody tr,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable tfoot tr,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable thead th,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable thead td,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable tbody th,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable tbody td,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable tfoot th,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable tfoot td,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable thead,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable tbody,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable tfoot,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable thead tr,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable tbody tr,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable tfoot tr,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable thead th,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable thead td,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable tbody th,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable tbody td,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable tfoot th,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable tfoot td,
html body .onMix .dataTables_wrapper table.dataTable.dataTable,
html body .onMix .dataTables_wrapper table.dataTable.dataTable thead,
html body .onMix .dataTables_wrapper table.dataTable.dataTable tbody,
html body .onMix .dataTables_wrapper table.dataTable.dataTable tfoot,
html body .onMix .dataTables_wrapper table.dataTable.dataTable thead tr,
html body .onMix .dataTables_wrapper table.dataTable.dataTable tbody tr,
html body .onMix .dataTables_wrapper table.dataTable.dataTable tfoot tr,
html body .onMix .dataTables_wrapper table.dataTable.dataTable thead th,
html body .onMix .dataTables_wrapper table.dataTable.dataTable thead td,
html body .onMix .dataTables_wrapper table.dataTable.dataTable tbody th,
html body .onMix .dataTables_wrapper table.dataTable.dataTable tbody td,
html body .onMix .dataTables_wrapper table.dataTable.dataTable tfoot th,
html body .onMix .dataTables_wrapper table.dataTable.dataTable tfoot td {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Also target the sticky-col-left right border explicitly — some site
   stylesheets pin a separate border-right color on the sticky column to
   visually separate it from the scrolling area. Tone it down on dark/mix. */
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable thead th.sticky-col-left,
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable tbody td.sticky-col-left,
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable thead th.sticky-col,
[id^="page-"].onDrk html body .dataTables_wrapper table.dataTable.dataTable tbody td.sticky-col,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable thead th.sticky-col-left,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable tbody td.sticky-col-left,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable thead th.sticky-col,
[id^="page-"].onMix html body .dataTables_wrapper table.dataTable.dataTable tbody td.sticky-col,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable thead th.sticky-col-left,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable tbody td.sticky-col-left,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable thead th.sticky-col,
html body .onDrk .dataTables_wrapper table.dataTable.dataTable tbody td.sticky-col,
html body .onMix .dataTables_wrapper table.dataTable.dataTable thead th.sticky-col-left,
html body .onMix .dataTables_wrapper table.dataTable.dataTable tbody td.sticky-col-left,
html body .onMix .dataTables_wrapper table.dataTable.dataTable thead th.sticky-col,
html body .onMix .dataTables_wrapper table.dataTable.dataTable tbody td.sticky-col {
  border-right-color: rgba(255, 255, 255, 0.15) !important;
}
