/* Referenced project, contract and flow data uses one dense horizontal evidence table. */
body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog .flow-context {
  min-width: 0 !important;
  overflow: hidden !important;
}

body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog .flow-context > .flow-section-title {
  min-height: 28px !important;
  padding: 4px 8px !important;
}

body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog .flow-context > .flow-linked-context-heading {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
}

.flow-linked-context-heading > .data-table-column-reset {
  flex: 0 0 auto !important;
  margin: 0 0 0 auto !important;
}

.flow-linked-context-table-shell {
  --flow-linked-column-width: 176px;
  --flow-horizontal-scrollbar-clearance: 18px;
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding-bottom: var(--flow-horizontal-scrollbar-clearance) !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  border: 1px solid #d9e0e8 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
}

.flow-linked-context-table-shell:focus-visible {
  outline: 2px solid #1677ff;
  outline-offset: 1px;
}

.flow-linked-context-table {
  width: max-content !important;
  min-width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  table-layout: fixed !important;
  background: #ffffff !important;
}

.flow-linked-context-table :is(th, td) {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  border-right: 1px solid #dfe5ec !important;
  border-bottom: 1px solid #dfe5ec !important;
  vertical-align: middle !important;
}

.flow-linked-context-table :is(th, td).is-wide {
  min-width: 0 !important;
}

.flow-linked-context-table :is(th, td):last-child {
  border-right: 0 !important;
}

.flow-linked-context-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.flow-linked-context-table th {
  position: relative !important;
  height: 26px !important;
  padding: 3px 7px !important;
  overflow: hidden !important;
  color: #20242b !important;
  background: #f4f6f8 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 18px !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.flow-linked-context-table .data-table-column-resizer,
.payment-line-items-table .data-table-column-resizer {
  display: block !important;
}

.flow-linked-context-table td {
  height: 30px !important;
  padding: 0 !important;
  background: #ffffff !important;
}

.flow-linked-context-table td .context-card {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 30px !important;
  min-height: 30px !important;
  margin: 0 !important;
  padding: 2px 7px !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #20242b !important;
  text-align: left !important;
}

.flow-linked-context-table td .context-card > strong {
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  letter-spacing: 0 !important;
}

.flow-linked-context-table td .context-card > strong {
  flex: 1 1 auto;
  color: #16191f !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 18px !important;
}

.flow-linked-context-table td .context-card.linked {
  cursor: pointer;
}

.flow-linked-context-table td .context-card.linked:hover {
  background: #f3f8ff !important;
}

.flow-linked-context-table td:has(.context-card.danger) {
  background: #fff5f3 !important;
}

.flow-linked-context-table td .context-card.danger > strong {
  color: #c9362b !important;
}

body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog .flow-linked-history-details {
  margin-top: 4px !important;
}

body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog .flow-linked-history-details > summary {
  min-height: 28px !important;
  padding: 4px 8px !important;
  line-height: 20px !important;
}

body[data-ui-theme="macos-workspace-v3"] #payment-line-items {
  width: 100% !important;
  min-width: 0 !important;
}

.payment-line-items-shell {
  --flow-horizontal-scrollbar-clearance: 18px;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  padding-bottom: var(--flow-horizontal-scrollbar-clearance) !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  border: 1px solid #d9e0e8;
  background: #fff;
}

.payment-line-items-shell:focus-visible {
  outline: 2px solid #1677ff;
  outline-offset: 1px;
}

.payment-line-items-table {
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  background: #fff !important;
}

.payment-line-items-table :is(th, td) {
  box-sizing: border-box !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 2px 7px !important;
  overflow: hidden !important;
  border-right: 1px solid #dfe5ec !important;
  border-bottom: 1px solid #dfe5ec !important;
  color: #20242b !important;
  font-size: 12px !important;
  line-height: 24px !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.payment-line-items-table th {
  position: relative !important;
  height: 28px !important;
  min-height: 28px !important;
  background: #f4f6f8 !important;
  font-weight: 600 !important;
  line-height: 22px !important;
}

.payment-line-items-table :is(input, select) {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 26px !important;
  min-height: 26px !important;
  margin: 0 !important;
  padding: 2px 6px !important;
  border: 1px solid #cfd7e2 !important;
  border-radius: 2px !important;
  background: #fff !important;
  color: #16191f !important;
  font: inherit !important;
}

.payment-line-items-table .is-money {
  font-variant-numeric: tabular-nums;
  text-align: right !important;
}

.payment-line-items-table .payment-receiving-account {
  display: table-cell !important;
}

.payment-line-items-table .payment-cell-ellipsis {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: inherit !important;
  line-height: inherit !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#settlement-line-items {
  --flow-horizontal-scrollbar-clearance: 18px;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  padding-bottom: var(--flow-horizontal-scrollbar-clearance) !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

.supplier-settlement-line-table,
.flow-unified-document .business-line-table.supplier-settlement-line-table,
body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) .flow-unified-document .business-line-table.supplier-settlement-line-table {
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  table-layout: fixed !important;
}

.supplier-settlement-line-table :is(th, td) {
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (max-width: 760px) {
  .flow-linked-context-table-shell {
    --flow-linked-column-width: 158px;
    --flow-horizontal-scrollbar-clearance: 12px;
    scrollbar-gutter: auto;
  }

  .flow-linked-context-table :is(th, td).is-wide {
    min-width: 0 !important;
  }

  .payment-line-items-shell {
    --flow-horizontal-scrollbar-clearance: 12px;
    scrollbar-gutter: auto;
  }

  html body[data-ui-theme="macos-workspace-v3"] .flow-unified-document .payment-line-items-table :is(th, td) {
    height: 38px !important;
    min-height: 38px !important;
    padding-block: 2px !important;
  }

  html body[data-ui-theme="macos-workspace-v3"] .flow-unified-document .payment-line-items-table :is(input, select) {
    height: 32px !important;
    min-height: 32px !important;
  }

  html body[data-ui-theme="macos-workspace-v3"] .flow-unified-document .payment-line-items-table .table-action.amount-link {
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 2px !important;
  }

  #settlement-line-items {
    --flow-horizontal-scrollbar-clearance: 12px;
    overflow-x: auto !important;
    scrollbar-gutter: auto;
  }

  .flow-unified-document .business-line-table.supplier-settlement-line-table,
  body[data-ui-theme="macos-workspace-v3"] #erp-flow-launch-dialog:not(.is-picker) .flow-unified-document .business-line-table.supplier-settlement-line-table {
    width: max-content !important;
    min-width: 100% !important;
    table-layout: fixed !important;
  }
}
