.resource-calculator__panel[hidden] {
  display: none;
}

.resource-calculator__table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e9f1;
  border-radius: 12px;
  background: var(--white-base);
  color: var(--primary-base);
}

main table.resource-calculator__table {
  display: table;
}

.resource-calculator__table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.resource-calculator__table :is(th, td) {
  padding: .65rem 1rem;
  border-bottom: 1px solid #e2e9f1;
  text-align: start;
}

.resource-calculator__table thead {
  background: var(--details-darker);
  color: var(--white-base);
}

.resource-calculator__group {
  background: #eef3f9;
}

.resource-calculator__table tr > :nth-child(3) {
  text-align: end;
  white-space: nowrap;
}

.resource-calculator__table input {
  box-sizing: border-box;
  width: 5.75rem;
  padding: .35rem .5rem;
  border: 1px solid #a9bcd2;
  border-radius: 6px;
  background: var(--white-base);
  color: inherit;
  font: inherit;
  text-align: end;
}

.resource-calculator__summary,
.resource-calculator__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
}

.resource-calculator__summary {
  justify-content: space-between;
  margin-top: 1rem;
}

.resource-calculator__total {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.resource-calculator__status:empty {
  margin: 0;
}

.resource-calculator__export {
  background: var(--details-darker);
  color: var(--white-base);
}

@media (max-width: 40rem) {
  .resource-calculator__table {
    min-width: 17rem;
    table-layout: fixed;
    font-size: .8rem;
  }

  .resource-calculator__table :is(th, td) {
    padding: .55rem .3rem;
    overflow-wrap: anywhere;
  }

  .resource-calculator__table thead th:nth-child(1) { width: 25%; }
  .resource-calculator__table thead th:nth-child(2) { width: 35%; }
  .resource-calculator__table thead th:nth-child(3) { width: 21%; white-space: normal; }
  .resource-calculator__table thead th:nth-child(4) { width: 19%; }

  .resource-calculator__table input {
    width: 100%;
    padding-inline: .25rem;
  }
}
