/* Shared sizing for related actions: fill the row without enlarging utility controls. */
.row-actions,
.history-tools,
.payment-actions,
.report-actions,
.report-card-actions,
.opportunity-report-actions,
.ht-form-actions,
.platform-business-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}

.row-actions > a:not(.small),
.row-actions > button,
.row-actions > form,
.history-tools > a,
.history-tools > form,
.history-tools > .home-simplified,
.payment-actions > a,
.payment-actions > button,
.payment-actions > form,
.report-actions > a:not(.small),
.report-actions > button,
.report-actions > form,
.report-card-actions > a,
.report-card-actions > button,
.report-card-actions > form,
.opportunity-report-actions > a,
.opportunity-report-actions > button,
.opportunity-report-actions > form,
.ht-form-actions > a,
.ht-form-actions > button,
.ht-form-actions > form,
.platform-business-actions > a,
.platform-business-actions > button,
.platform-business-actions > form {
  flex: 1 1 220px;
  min-width: min(100%, 220px);
}

.row-actions > a:not(.small),
.row-actions > button,
.payment-actions > a,
.payment-actions > button,
.report-actions > a:not(.small),
.report-actions > button,
.report-card-actions > a,
.report-card-actions > button,
.opportunity-report-actions > a,
.opportunity-report-actions > button,
.ht-form-actions > a,
.ht-form-actions > button,
.platform-business-actions > a,
.platform-business-actions > button {
  display: inline-flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.row-actions > form,
.history-tools > form,
.payment-actions > form,
.report-actions > form,
.report-card-actions > form,
.opportunity-report-actions > form,
.ht-form-actions > form,
.platform-business-actions > form {
  display: flex;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.row-actions > form > button,
.history-tools > form > button,
.payment-actions > form > button,
.report-actions > form > button,
.report-card-actions > form > button,
.opportunity-report-actions > form > button,
.ht-form-actions > form > button,
.platform-business-actions > form > button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Purchase actions live in a narrow history-table column; fill it vertically. */
.purchase-actions > a,
.purchase-actions > button,
.purchase-actions > form {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
}
.purchase-actions > a,
.purchase-actions > button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.purchase-actions > form {
  display: flex;
  margin: 0;
}
.purchase-actions > form > button {
  width: 100%;
  min-height: 44px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.history-tools > .home-simplified {
  display: flex;
  min-width: 0;
}
.history-tools > .home-simplified .home-simplified__purchase,
.history-tools > .home-simplified .button {
  width: 100%;
}
.history-tools > .home-simplified .button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
}

.report-card-actions > .report-progress {
  flex: 1 1 100%;
}
.report-card-actions > .report-run-form {
  flex-basis: 220px;
}

#history-confirmation .row-actions > button {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.public-home__actions > .public-home__purchase-form,
.public-home__actions > .public-home__cta {
  flex: 1 1 320px;
  max-width: 420px;
}

.cr-back-row > .cr-back-link {
  flex: 1 1 0;
  justify-content: center;
}

.cr-shell > .cr-ai:not(.cr-ai--home) {
  width: min(420px, 100%);
}
.cr-shell > .cr-ai:not(.cr-ai--home) .cr-ai__launcher {
  width: 100%;
}

@media (max-width: 600px) {
  .row-actions,
  .purchase-actions,
  .history-tools,
  .payment-actions,
  .report-actions,
  .report-card-actions,
  .opportunity-report-actions,
  .ht-form-actions,
  .platform-business-actions {
    gap: 8px;
  }
  .cr-shell > .cr-ai:not(.cr-ai--home) {
    width: 100%;
    max-width: none;
  }
}
