/* Site-wide data tables: pink header, zebra rows, hover highlight.
   Loaded last from SiteLayout so these colors win over per-page table CSS.
   Layout, stacking, and horizontal scroll stay in the page stylesheets. */

:root{
  /* Same hue as brand #EF599D, deepened so white header text meets WCAG AA 4.5:1. */
  --table-head:#D4387E;
  --table-head-fg:#fff;
  --table-row:#fff;
  --table-row-alt:#F3F6FD;
  --table-row-hover:#F4EAF5; /* light pink / lavender */
  --table-row-trans:background-color .2s var(--ease),box-shadow .2s var(--ease);
}

/* Shared selectors covering service, test-menu, coverage, legal, blog, and any future main table. */
.sp-table thead th,
.sp-table thead th.us,
.sp-table thead th.them,
.sp-table.dt thead th,
.tm-table thead th,
.cov-table thead th,
.cov-table th,
.legal .ccpa-table thead th,
.legal .ccpa-table th,
.blog-body table thead th,
.blog-body table th,
.cov-prose table thead th,
.cov-prose table th,
main table thead th{
  background:var(--table-head);
  color:var(--table-head-fg);
  border-bottom-color:transparent;
}

.sp-table tbody th,
.sp-table tbody td,
.tm-table tbody th,
.tm-table tbody td,
.cov-table td,
.legal .ccpa-table td,
.blog-body table td,
.blog-body table tbody th,
.cov-prose table td,
main table tbody td,
main table tbody th{
  transition:var(--table-row-trans);
}

/* Odd rows white, even rows faint blue. Applied to cells so collapse/fixed layouts paint reliably.
   Filterable tables (tm-table, cov-table) use :nth-child only until JS marks them .is-striped,
   then stripes follow .is-alt on the currently visible rows (hidden rows still count for nth-child). */
.sp-table tbody tr:nth-child(odd)>*,
.tm-table:not(.is-striped) tbody tr:nth-child(odd)>*,
.cov-table:not(.is-striped) tbody tr:nth-child(odd)>*,
.legal .ccpa-table tbody tr:nth-child(odd)>*,
.blog-body table tbody tr:nth-child(odd)>*,
.cov-prose table tbody tr:nth-child(odd)>*,
main table tbody tr:nth-child(odd)>*{
  background-color:var(--table-row);
}
.sp-table tbody tr:nth-child(even)>*,
.tm-table:not(.is-striped) tbody tr:nth-child(even)>*,
.cov-table:not(.is-striped) tbody tr:nth-child(even)>*,
.legal .ccpa-table tbody tr:nth-child(even)>*,
.blog-body table tbody tr:nth-child(even)>*,
.cov-prose table tbody tr:nth-child(even)>*,
main table tbody tr:nth-child(even)>*{
  background-color:var(--table-row-alt);
}

/* Visible-row stripes after filter/search/sort/pagination JS has run. */
.tm-table.is-striped tbody tr:not(.is-alt)>*,
.cov-table.is-striped tbody tr:not(.is-alt)>*{
  background-color:var(--table-row);
}
.tm-table.is-striped tbody tr.is-alt>*,
.cov-table.is-striped tbody tr.is-alt>*{
  background-color:var(--table-row-alt);
}

.sp-table tbody tr:hover>*,
.sp-table tbody tr:focus-within>*,
.tm-table tbody tr:hover>*,
.tm-table tbody tr:focus-within>*,
.cov-table tbody tr:hover>*,
.cov-table tbody tr:focus-within>*,
.legal .ccpa-table tbody tr:hover>*,
.legal .ccpa-table tbody tr:focus-within>*,
.blog-body table tbody tr:hover>*,
.blog-body table tbody tr:focus-within>*,
.cov-prose table tbody tr:hover>*,
.cov-prose table tbody tr:focus-within>*,
main table tbody tr:hover>*,
main table tbody tr:focus-within>*{
  background-color:var(--table-row-hover);
}

/* Comparison "IHDLab" cells keep weight/color; fill follows the row. */
.sp-table td.us{background-color:transparent;color:var(--navy);font-weight:500}

/* Blog / prose tables that are not already in a rounded wrap. */
.blog-body table,
.cov-prose table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border:1.5px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  margin:0 0 1.2em;
  font-size:15px;
  line-height:1.5;
  color:var(--navy);
}
.blog-body table thead th:first-child,
.cov-prose table thead th:first-child{border-radius:16px 0 0 0}
.blog-body table thead th:last-child,
.cov-prose table thead th:last-child{border-radius:0 16px 0 0}
.blog-body table th,
.blog-body table td,
.cov-prose table th,
.cov-prose table td{padding:12px 14px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line)}
.blog-body table tr:last-child>*,
.cov-prose table tr:last-child>*{border-bottom:0}

/* Keep wide tables scrollable inside their rounded wrappers. */
.sp-table-wrap,
.tm-tablewrap,
.cov-table-wrap,
.legal .ccpa-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}

/* Stacked / card tables (service compare + test menus): paint the row, not the cells. */
@media (max-width:860px){
  .tm-table:not(.is-striped) tbody tr:nth-child(odd){background-color:var(--table-row)}
  .tm-table:not(.is-striped) tbody tr:nth-child(even){background-color:var(--table-row-alt)}
  .tm-table.is-striped tbody tr{background-color:var(--table-row)}
  .tm-table.is-striped tbody tr.is-alt{background-color:var(--table-row-alt)}
  .tm-table tbody tr:hover,
  .tm-table tbody tr:focus-within{background-color:var(--table-row-hover)}
  .tm-table tbody tr:nth-child(odd)>*,
  .tm-table tbody tr:nth-child(even)>*,
  .tm-table.is-striped tbody tr>*,
  .tm-table tbody tr:hover>*,
  .tm-table tbody tr:focus-within>*{background-color:transparent;box-shadow:none}

  .sp-table tbody tr:nth-child(odd){background-color:var(--table-row)}
  .sp-table tbody tr:nth-child(even){background-color:var(--table-row-alt)}
  .sp-table tbody tr:hover,
  .sp-table tbody tr:focus-within{background-color:var(--table-row-hover)}
  .sp-table tbody tr:nth-child(odd)>*,
  .sp-table tbody tr:nth-child(even)>*,
  .sp-table tbody tr:hover>*,
  .sp-table tbody tr:focus-within>*{background-color:transparent;box-shadow:none}
  /* Keep them/us as inner chips so stacked comparison cards stay readable. */
  .sp-table td.them{background:#faf9fe}
  .sp-table td.us{background:#fff8fb}
}

@media (prefers-reduced-motion:reduce){
  .sp-table tbody th,
  .sp-table tbody td,
  .tm-table tbody th,
  .tm-table tbody td,
  .tm-table tbody tr,
  .sp-table tbody tr,
  .cov-table td,
  .legal .ccpa-table td,
  .blog-body table td,
  .blog-body table tbody th,
  .cov-prose table td,
  main table tbody td,
  main table tbody th{
    transition:none;
  }
}
