.tableButton {
  width: max-content;
}

.subformTable {
  width: 100%;
}

.tableCellFormatting {
  --cell-width: auto;
  width: var(--cell-width);
}

/* The width here should be: calc(var(--cell-width) + var(--modal-padding-x) - var(--table-input-margin));
   Adding 8.15% is a workaround for calc not working with both percentages and pixels inside a cell element.
*/
.tableCellFormatting:first-child {
  width: calc(var(--cell-width) + 8.15%);
}

.tableCellFormatting:last-child {
  width: calc(var(--cell-width) + 8.15%);
}

/* ====
TODO(1779): Remove these styles after going through all the different Table styles in
Altinn, and making sure they are consistent. */
.subformTable > thead > tr > th {
  background-color: #f5f5f5;
  border-bottom: 1px solid #dde3e5;
  padding-top: 15px;
  padding-bottom: 15px;
}

.subformTable > tbody > tr > td {
  border-bottom-color: #dde3e5;
  padding-top: 12px;
  padding-bottom: 12px;
}
/* ==== */

.subformTable > tbody > tr:hover td {
  background-color: unset;
}

.buttonCell {
  min-width: unset;
  max-width: unset;
  width: 1px;
}

.buttonCell > div {
  margin: 0;
}

.buttonInCellWrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
}

.disabledRow {
  color: #ccc;
}

.tableRowError > td {
  background-color: var(--repeating-group-error-color) !important;
}

.addButton {
  width: 100%;
  margin-bottom: var(--ds-size-2);
}

.emptyField {
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6875;
}
