.counterparty-person-dialog {
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  margin: auto;
  border: 1px solid var(--line, #dbe5e4);
  border-radius: 4px;
  background: #fff;
  color: var(--text, #171b1a);
  overflow: auto;
  font-size: 13px;
  line-height: 18px;
}
.counterparty-person-dialog::backdrop { background: rgb(0 0 0 / 24%); }
.counterparty-person-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line, #dbe5e4);
}
#counterpartyPersonDialog h2 { margin: 0; font-size: 16px !important; line-height: 22px; font-weight: 600 !important; }
.counterparty-person-dialog p { margin: 4px 0 0; overflow-wrap: anywhere; }
.counterparty-person-dialog form { display: grid; gap: 12px; padding: 16px; }
.counterparty-person-dialog label { display: grid; gap: 4px; min-width: 0; margin: 0; }
.counterparty-person-dialog :is(input, select) { width: 100%; min-width: 0; }
.counterparty-person-dialog :is(input, select, button) { box-sizing: border-box; min-height: 32px; height: 32px; border-radius: 4px; padding: 0 10px; font: inherit; }
.counterparty-person-dialog :is(input, select) { border: 1px solid var(--line, #dbe5e4); background: #fff; color: var(--text, #171b1a); }
.counterparty-person-dialog button { box-shadow: none; transform: none; }
#counterpartyPersonDialog .primary-button:not(:disabled) { border-color: var(--brand-primary) !important; background: var(--brand-primary) !important; color: #fff !important; -webkit-text-fill-color: #fff; }
#counterpartyPersonDialog .primary-button:not(:disabled):hover { background: var(--brand-primary-hover) !important; }
.counterparty-person-dialog :is(input, select, button):focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.counterparty-person-dialog button.icon-button { width: 32px; min-width: 32px; padding: 0; flex: 0 0 32px; }
.counterparty-person-dialog footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.counterparty-person-dialog [hidden] { display: none !important; }
.counterparty-person-dialog [data-person-status]:empty { display: none; }
.counterparty-person-load-actions { display: flex; gap: 4px; }
.counterparty-person-load-actions:has(> [hidden]):not(:has(> :not([hidden]))) { display: none; }
