/**
 * Tables: module list builders, payment histories, reports and views.
 * Wide tables scroll inside their own wrapper (added by kanocommerce.js)
 * instead of widening the page.
 */
.kc-table-wrap {
  max-width: 100%;
  margin: 0 0 var(--kc-s6);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--kc-surface);
  border: 1px solid var(--kc-line);
  border-radius: var(--kc-radius-lg);
  box-shadow: var(--kc-shadow-sm);
}
.kc-table-wrap:focus-visible { box-shadow: var(--kc-focus-ring); }
.kc-table-wrap > table { margin: 0; border: 0; border-radius: 0; box-shadow: none; }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--kc-fs-sm);
  background: var(--kc-surface);
}
table:not(.kc-plain) { border: 1px solid var(--kc-line); border-radius: var(--kc-radius-lg); overflow: hidden; }
caption { padding: var(--kc-s3) var(--kc-s4); text-align: left; font-weight: 700; color: var(--kc-ink); caption-side: top; }
thead th, table > tr:first-child > th {
  position: sticky;
  top: 0;
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: bottom;
  font-size: var(--kc-fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--kc-green-900);
  background: var(--kc-green-50);
  border-bottom: 1px solid var(--kc-green-100);
}
th a, th a:hover { color: inherit; text-decoration: none; }
th.is-active, th[aria-sort] { background: var(--kc-green-100); }
td, tbody th {
  padding: 0.7rem 1rem;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid var(--kc-line);
  color: var(--kc-body);
}
tbody th { font-weight: 650; color: var(--kc-ink); background: var(--kc-surface-2); }
tbody tr:last-child > td, tbody tr:last-child > th { border-bottom: 0; }
tbody tr:hover > td { background: var(--kc-green-50); }
td.is-active { background: rgba(232, 185, 73, 0.07); }
td .kc-btn, td .button, td .btn { margin: 0.1rem 0.25rem 0.1rem 0; }
tfoot td { font-weight: 700; background: var(--kc-canvas); border-top: 1px solid var(--kc-line); }
.tabledrag-toggle-weight-wrapper { text-align: right; margin-bottom: var(--kc-s2); font-size: var(--kc-fs-xs); }
.tabledrag-handle .handle { width: 1rem; height: 1rem; }
td.empty, .empty.message { padding: var(--kc-s8); text-align: center; color: var(--kc-muted); }

/* Key/value tables (two columns, first column bold), e.g. the user data
   table on the account page. */
.kc-profile__content table:not(:has(thead)) td:first-child { width: 34%; font-weight: 650; color: var(--kc-ink); background: var(--kc-surface-2); }

@media (max-width: 39.99rem) {
  th, td { padding: 0.6rem 0.75rem; }
}
