/* Scope the bounded layout to these operational forms; do not alter other editors. */
.dialog:has(.operational-workspace-form) .dialog-form {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 28px);
}

.dialog:has(.operational-workspace-form) .dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.dialog:has(.operational-workspace-form) .dialog-header,
.dialog:has(.operational-workspace-form) .dialog-footer {
  flex: 0 0 auto;
}

.dialog:has(.operational-workspace-form) .form-error {
  flex: 0 1 auto;
  max-height: 20dvh;
  overflow-y: auto;
}

/* Scoped party workflow controls inside the shared editor. */
.trading-party-checker-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line, #d9e2df);
  border-radius: 0.75rem;
}
.trading-party-checker-picker legend { padding-inline: 0.35rem; font-weight: 700; }
.trading-party-checker-search { align-self: end; min-height: 2.75rem; }
.trading-party-confirmation { display: flex; align-items: flex-start; gap: 0.65rem; }
.trading-party-confirmation input[type="checkbox"] {
  flex: 0 0 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  min-height: 1.25rem;
  margin: 0.2rem 0 0;
}
.trading-party-confirmation label { margin: 0; line-height: 1.7; }
@media (max-width: 600px) {
  .trading-party-checker-picker { grid-template-columns: minmax(0, 1fr); }
}
