table,
.table,
table.table {
  border-radius: 10px;
  font-family: var(--font-family-body);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  margin: var(--space-lg) 0;
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--greyLighter) !important;
}
.table a {
  color: var(--textColor);
}
/* Cell padding */
/* Consolidated below in the Bootstrap neutraliser block */
.table,
.table th,
.table td,
table.table,
table.table th,
table.table td,
table th,
table td {
  border: 1px solid var(--greyLighter) !important;
}
/* Darker table header - higher specificity to override Bootstrap */
.table thead th,
.table thead td,
table.table thead th,
table.table thead td,
table thead th,
table thead td {
  background-color: var(--greyHeader) !important;
  color: var(--white) !important;
  font-weight: var(--font-weight-bold) !important;
  border: 1px solid var(--greyLighter) !important;
}
/* Borders removed on borderless tables */
.table-borderless th,
.table-borderless td {
  border: none !important;
}
.table-blank tr {
  background-color: transparent !important;
}
.webform-likert-table[data-likert-answers-count="2"] th:first-child {
  width: 75%;
}
.webform-likert-table[data-likert-answers-count="2"] th {
  width: 12.5%;
}
.webform-likert-table tr {
  background: transparent;
  background-color: rgba(72, 81, 99, .06) !important;
  border: none !important;
}
.webform-likert-table td,
.webform-likert-table th {
  border: none !important;
}
.webform-likert-table thead th {
  color: var(--textColor) !important;
  font-family: var(--font-family-body);
  font-weight: var(--font-weight-bold) !important;
  text-align: center;
  background-color: var(--greyLight) !important;
  padding: var(--space-md) !important;
  border-bottom: 1px solid var(--greyLighter) !important;
}

.webform-likert-table thead th:first-child {
  text-align: left;
}

.webform-likert-table tr.odd {
  background-color: var(--greyLight) !important;
}
.webform-likert-table tr.even {
  background-color: var(--greyLighter) !important;
}

/* Fix sticky header positioning after patches */
.webform-likert-table.sticky-header thead {
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Ensure proper spacing when header is sticky */
.webform-likert-table.sticky-header tbody tr:first-child td {
  border-top: none;
}

/* Bootstrap table component neutralisers
   Ensures our theme table styles take precedence across all environments
   without needing to remove Bootstrap globally. */
table.table,
.table {
  /* Reset Bootstrap table colours to theme tokens */
  --bs-table-color: var(--textColor) !important;
  --bs-table-bg: transparent !important;
  --bs-table-border-color: var(--greyLighter) !important;
  --bs-table-striped-color: var(--textColor) !important;
  --bs-table-striped-bg: transparent !important;
  --bs-table-hover-color: var(--textColor) !important;
  --bs-table-hover-bg: transparent !important;
  color: var(--textColor) !important;
  background-color: transparent !important;
  border-color: var(--greyLighter) !important;
}

/* Ensure consistent cell spacing and no inner backgrounds/shadows */
.table > :not(caption) > * > * ,
table > :not(caption) > * > * {
  /* Remove Bootstrap inner cell background/box-shadow padding handling */
  background-color: transparent !important;
  box-shadow: none !important;
  padding: var(--space-md) var(--space-lg) !important;
}

/* Neutralise Bootstrap optional variants so our theme styles show */
.table-striped > tbody > tr:nth-of-type(odd) > * { background-color: transparent !important; }
.table-hover > tbody tr:hover > * { background-color: transparent !important; }
.table-borderless > :not(caption) > * > * { border-bottom-width: 0 !important; }