/* Tables opt in when their final column contains actions. Based on task management. */
.action-table > tbody > tr > td:last-child:not([colspan]) :is(button, a[href]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 6px;
  min-width: 32px;
  min-height: 32px;
  height: auto;
  padding: 6px 11px;
  border: 1px solid #dce3ef;
  border-radius: 5px;
  background: #fff;
  color: var(--table-action-color, #2268ca);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  box-shadow: none;
  cursor: pointer;
}
.action-table > tbody > tr > td:last-child:not([colspan]) :is(button, a[href]):hover:not(:disabled, [aria-disabled="true"]) {
  background: #f2f7ff;
  border-color: #8eb1e6;
  color: var(--table-action-color, #2268ca);
  text-decoration: none;
  box-shadow: none;
}
.action-table > tbody > tr > td:last-child:not([colspan]) :is(button, a[href]):focus-visible {
  outline: 2px solid #75a7ed;
  outline-offset: 2px;
}
.action-table > tbody > tr > td:last-child:not([colspan]) :is(button:disabled, [aria-disabled="true"]) {
  opacity: .45;
  cursor: not-allowed;
}
.action-table > tbody > tr > td:last-child :is(.danger, .danger-text, .btn-danger, [data-cl-cancel]) { --table-action-color: #c74b46; }
.action-table > tbody > tr > td:last-child .ac-success { --table-action-color: #27845b; }
.action-table > tbody > tr > td:last-child .ac-muted { --table-action-color: #788598; }
.action-table > tbody > tr > td:last-child:not([colspan]) > :is(button, a[href]) { margin: 3px 6px 3px 0; }
.action-table > tbody > tr > td:last-child:not([colspan]) > :is(button, a[href]):last-child { margin-right: 0; }

.action-table :is(.cl-row-actions, .ci-row-actions, .ac-row-actions, .cm-row-actions, .pt-row-actions, .rc-row-actions) {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  max-width: none;
}
.action-table > tbody > tr > td:last-child:not([colspan]) > div :is(button, a[href]) { margin: 0; }
.action-table:is(.rc-scales-table, .pt-table, .cm-table) { table-layout: auto; }
.action-table.pt-table :is(th, td):last-child { min-width: 130px; }
.action-table:is(.ci-table, .cm-table, .ac-table, .rc-table) :is(th, td):last-child { min-width: 180px; }
.action-table.pt-table > tbody > tr > td:last-child .pt-row-actions button { width: 32px; padding: 6px; }

/* Both search and intake use the same patient list surface and column spacing. */
.cl-table .cl-patient-info > div { min-width: 0; }
.cl-table .cl-validation { white-space: nowrap; }
.cl-results .cl-bottom { margin: 0; }
.cl-results .cl-batch .cs-button { box-shadow: none; }
