/* ============================================================
   Debug Pages — shared table styles
   ============================================================ */

.debug-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin-bottom: 1.5rem;
  border: 1px solid #ccc;
}

.debug-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  font-size: 0.8rem;
  white-space: nowrap;
}

.debug-table th,
.debug-table td {
  padding: 0.3rem 0.6rem;
  border-bottom: 1px solid #ddd;
  border-right: 1px solid #eee;
  text-align: left;
}

.debug-table th {
  background: #333;
  color: #fff;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
}

/* Sticky first 2 columns */
.debug-table th:nth-child(1),
.debug-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 1;
}

.debug-table th:nth-child(2),
.debug-table td:nth-child(2) {
  position: sticky;
  left: var(--col1-width, 80px);
  z-index: 1;
}

.debug-table th:nth-child(1),
.debug-table th:nth-child(2) {
  z-index: 3;
}

/* Alternating rows */
.debug-table tbody tr:nth-child(even) td {
  background: #f4f4f4;
}

.debug-table tbody tr:nth-child(odd) td {
  background: #fff;
}

/* Sticky column backgrounds must override row color */
.debug-table tbody tr:nth-child(even) td:nth-child(1),
.debug-table tbody tr:nth-child(even) td:nth-child(2) {
  background: #eaeaea;
}

.debug-table tbody tr:nth-child(odd) td:nth-child(1),
.debug-table tbody tr:nth-child(odd) td:nth-child(2) {
  background: #f9f9f9;
}

/* Shadow on sticky columns for depth cue */
.debug-table td:nth-child(2),
.debug-table th:nth-child(2) {
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.06);
}

/* Disable sticky columns */
.debug-table.no-sticky th,
.debug-table.no-sticky td {
  position: static;
  box-shadow: none;
}

/* Expandable rows */
.debug-table .expand-toggle {
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
  font-family: monospace;
  font-size: 0.85rem;
  padding: 0 0.3rem;
}

.debug-table .expand-row td {
  padding: 0.5rem 0.6rem;
  white-space: normal;
  background: #fafafa;
}
