/* AURELION_OFFICE_TOPUPS_FIXED_ROWS_V421_START */
/* Keep topup history rows compact immediately, independent of item count. CSS-only. */

body.aurelion-office-shell-v124 .topup-history-panel,
body.aurelion-office-shell-v124 .office-topup-history-panel {
  align-self: start !important;
  height: auto !important;
  min-height: 0 !important;
}

/* The list must not stretch rows to fill empty vertical space */
body.aurelion-office-shell-v124 .topup-history-list,
body.aurelion-office-shell-v124 .office-topup-history-list {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 10px !important;

  height: auto !important;
  min-height: 0 !important;
  max-height: 410px !important;

  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Fixed compact row height for 1–5 items */
body.aurelion-office-shell-v124 .topup-history-list > .office-topup-row,
body.aurelion-office-shell-v124 .office-topup-history-list > .office-topup-row,
body.aurelion-office-shell-v124 .topup-history-list > .office-row.office-topup-row,
body.aurelion-office-shell-v124 .office-topup-history-list > .office-row.office-topup-row {
  flex: 0 0 72px !important;
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;

  box-sizing: border-box !important;
  overflow: hidden !important;
  padding-top: 11px !important;
  padding-bottom: 11px !important;
}

/* Prevent inner blocks from stretching row height */
body.aurelion-office-shell-v124 .office-topup-row > div,
body.aurelion-office-shell-v124 .office-topup-row > div:first-child,
body.aurelion-office-shell-v124 .office-topup-row > div:last-child {
  min-height: 0 !important;
  max-height: 50px !important;
  overflow: hidden !important;
}

/* Keep amount/status/date/button visually stable */
body.aurelion-office-shell-v124 .office-topup-row > div:first-child > b {
  font-size: 18px !important;
  line-height: 1 !important;
}

body.aurelion-office-shell-v124 .office-payment-countdown,
body.aurelion-office-shell-v124 .office-payment-done {
  height: 22px !important;
  max-height: 22px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.aurelion-office-shell-v124 .office-topup-row a {
  height: 30px !important;
  max-height: 30px !important;
  white-space: nowrap !important;
}

/* If there are fewer than 5 records, keep the panel compact too */
body.aurelion-office-shell-v124 .topup-history-list:has(.office-topup-row:nth-child(1):last-child),
body.aurelion-office-shell-v124 .office-topup-history-list:has(.office-topup-row:nth-child(1):last-child) {
  max-height: 82px !important;
}

body.aurelion-office-shell-v124 .topup-history-list:has(.office-topup-row:nth-child(2):last-child),
body.aurelion-office-shell-v124 .office-topup-history-list:has(.office-topup-row:nth-child(2):last-child) {
  max-height: 164px !important;
}

body.aurelion-office-shell-v124 .topup-history-list:has(.office-topup-row:nth-child(3):last-child),
body.aurelion-office-shell-v124 .office-topup-history-list:has(.office-topup-row:nth-child(3):last-child) {
  max-height: 246px !important;
}

body.aurelion-office-shell-v124 .topup-history-list:has(.office-topup-row:nth-child(4):last-child),
body.aurelion-office-shell-v124 .office-topup-history-list:has(.office-topup-row:nth-child(4):last-child) {
  max-height: 328px !important;
}

body.aurelion-office-shell-v124 .topup-history-list:has(.office-topup-row:nth-child(5):last-child),
body.aurelion-office-shell-v124 .office-topup-history-list:has(.office-topup-row:nth-child(5):last-child) {
  max-height: 410px !important;
}

@media (max-width: 980px) {
  body.aurelion-office-shell-v124 .topup-history-list > .office-topup-row,
  body.aurelion-office-shell-v124 .office-topup-history-list > .office-topup-row,
  body.aurelion-office-shell-v124 .topup-history-list > .office-row.office-topup-row,
  body.aurelion-office-shell-v124 .office-topup-history-list > .office-row.office-topup-row {
    flex-basis: auto !important;
    height: auto !important;
    min-height: 86px !important;
    max-height: none !important;
  }

  body.aurelion-office-shell-v124 .office-topup-row > div,
  body.aurelion-office-shell-v124 .office-topup-row > div:first-child,
  body.aurelion-office-shell-v124 .office-topup-row > div:last-child {
    max-height: none !important;
  }
}
/* AURELION_OFFICE_TOPUPS_FIXED_ROWS_V421_END */
