/* Action groups wrap cleanly; spacing belongs to the group, not every button. */
:is(.actions, .form-actions, .card-actions, .row-actions, .landing-actions) {
  flex-wrap: wrap;
  gap: 12px;
}
.form-actions {
  margin-block-start: 24px;
  padding-block-end: 4px;
}
.card-actions {
  margin-block-start: 20px;
}
:is(.actions, .form-actions, .card-actions, .row-actions) > .button {
  margin: 0;
  max-width: 100%;
}
/* Older inline action layouts also need room between controls and surrounding copy. */
:is(.panel-body, td) > .button {
  margin-block: 5px;
  margin-inline-end: 10px;
}
:is(.panel-body, td) > .button:last-child {
  margin-inline-end: 0;
}
.panel-body > :is(p, dl, .table-wrap, .upload-field) + .button {
  margin-block-start: 16px;
}
.panel-body > .button + :is(p, dl, form) {
  margin-block-start: 18px;
}
.workspace-choices .panel-body > .button {
  margin-inline: 0;
}
form > :is(button[type='submit'], .auth-submit) {
  margin-block-start: 20px;
}
form > .form-grid + .button {
  margin-block-start: 20px;
}
#clerk-auth > .text-link {
  display: inline-block;
  margin-block: 16px 8px;
}
.dental-auth-content .form-actions {
  margin-block-start: 24px;
}
dialog > :is(.button, .text-link) {
  margin-block-start: 16px;
  margin-inline-end: 10px;
}
@media (max-width: 580px) {
  :is(.form-actions, .card-actions, .row-actions) {
    gap: 10px;
  }
  .form-actions > .button {
    min-height: 44px;
    white-space: normal;
  }
  :is(.panel-body, td) > .button {
    margin-inline-end: 8px;
  }
  .workspace-choices .panel-body > .button {
    margin-inline: 0;
  }
}
