/*
 * Payment history drawer layout fix
 *
 * The base application uses four grid columns for each payment row. Once the
 * Accounts workflow adds its extra actions, those fixed-content controls can
 * squeeze the amount and reference columns until text renders one character
 * per line. Keep details in two useful columns and place status/actions on a
 * dedicated second row instead.
 */
.admin-page .payment-history article {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.9fr) !important;
  align-items: start !important;
  column-gap: 22px !important;
  row-gap: 12px !important;
}

.admin-page .payment-history article > div:not(.row-actions) {
  min-width: 0;
}

.admin-page .payment-history article > div:not(.row-actions) strong,
.admin-page .payment-history article > div:not(.row-actions) span,
.admin-page .payment-history article > div:not(.row-actions) small {
  overflow-wrap: break-word !important;
  word-break: normal !important;
}

.admin-page .payment-history article > div:not(.row-actions) strong {
  white-space: nowrap;
}

.admin-page .payment-history article > .pill {
  grid-column: 1;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.admin-page .payment-history article > .row-actions {
  grid-column: 1 / -1;
  min-width: 0;
  justify-content: flex-end;
  align-items: center;
}

.admin-page .payment-history article > .row-actions > * {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .admin-page .payment-history article {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .admin-page .payment-history article > .pill,
  .admin-page .payment-history article > .row-actions {
    grid-column: 1;
  }

  .admin-page .payment-history article > .row-actions {
    justify-content: flex-start;
  }
}

