/* Cashback Pro V36.10.55 — Content-sized customer histories and mobile portrait swipe. */

/* Old V36.8.1 forced a 220–510px tall scroll box even for one loading line,
   zero results, or one converted URL. Natural height now wins; scrolling starts
   only when content reaches the cap. Leave the existing card's glass intact. */
html body #tab-converter #user-links-list.customer-links-list-scroll,
html body #tab-finance #customer-withdrawals-list.customer-withdrawals-list {
  display: grid !important;
  align-content: start !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: min(52vh, 440px) !important;
  max-height: min(52dvh, 440px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior-y: auto !important;
  scrollbar-gutter: auto !important;
  -webkit-overflow-scrolling: touch !important;
}
html body #tab-converter > .table-card,
html body #tab-finance .customer-withdrawals-card {
  height: auto !important;
  min-height: 0 !important;
}
html body #tab-converter #user-links-list .customer-list-load-state,
html body #tab-finance #customer-withdrawals-list .customer-list-load-state {
  padding: 6px 8px !important;
  margin: 0 !important;
}
/* Don't leave a tall message placeholder before/after API responses. */
html body #tab-converter #user-links-list > .notification-empty,
html body #tab-finance #customer-withdrawals-list > .notification-empty {
  min-height: 0 !important;
  padding: 10px 8px !important;
}

@media (max-width: 760px) {
  html body #tab-converter #user-links-list.customer-links-list-scroll,
  html body #tab-finance #customer-withdrawals-list.customer-withdrawals-list {
    max-height: min(46vh, 380px) !important;
    max-height: min(46dvh, 380px) !important;
  }
}

/* V36.10.54 blocked native vertical overscroll on the document root. On some
   Android portrait browsers that also swallowed the first upward swipe on the
   Dashboard. Restore one normal root scrollport; keep the root theme background
   unchanged (it remains fixed). Do not lock touch directions on nested lists. */
@media (orientation: portrait) and (max-width: 980px) {
  html:has(> body:is(.dashboard-home, .dashboard-tab-mode):is(.theme-halloween, .halloween-active, .theme-winter, .theme-ocean)) {
    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: auto !important;
  }
  html body:is(.dashboard-home, .dashboard-tab-mode):is(.theme-halloween, .halloween-active, .theme-winter, .theme-ocean) {
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow-y: visible !important;
    overscroll-behavior-y: auto !important;
    touch-action: auto !important;
  }
  html body.dashboard-home main.main-container,
  html body.dashboard-home #seasonal-dashboard,
  html body.dashboard-home #seasonal-dashboard .seasonal-main {
    max-height: none !important;
    touch-action: auto !important;
  }
}
