/* Override PyData Sphinx Theme default colors */
html[data-theme='light'] {
    --pst-color-table-row-hover-bg: #E2E8F0;
}

html[data-theme='dark'] {
    --pst-color-table-row-hover-bg: #1E293B;
}

a svg {
  color: var(--pst-color-text-base);
}

a svg:hover {
  color: var(--pst-color-link-hover);
}

/* Adds container for big tables, used for Compatibility Matrix */
.format-big-table {
    white-space: nowrap;
}

/* Compatibility Matrix: collapse borders */
.compat-matrix {
  border-collapse: collapse;
}

/* Make the header separator the same bold blue */
.compat-matrix thead th {
  border-bottom: 2px solid var(--pst-color-primary) !important;
}

/* Blue separator above rows that start a version group:
   - Matches when the first cell contains the role span.
   - Works whether the cell content is wrapped in <p> or not.
   - Applies the border to all cells in that row.
*/
.compat-matrix tbody tr:has(> td:first-child :is(span.version-start, .version-start)) > td {
  border-top: 1px solid var(--pst-color-primary) !important;
}

/* Fallback in case border-collapsing causes the 2px border to be overridden:
   Draw the line inside the row using an inset box-shadow. */
.compat-matrix tbody tr:has(> td:first-child :is(span.version-start, .version-start)) {
  box-shadow: inset 0 1px 0 var(--pst-color-primary);
}

/* Extra robustness: if your table isn’t inside .bd-content, these still apply.
   If it is inside .bd-content (PyData Sphinx Theme), the rules above already match. */
.bd-content .compat-matrix thead th { border-bottom-color: var(--pst-color-primary) !important; }