/* Wartip donate performance layer.
   Presentation stays the same; this file only limits paint/layout work outside the viewport. */
html.wt-donate-night body > .container > section.cover,
html.wt-donate-night body > .container > nav.tabs.wt-premium-tabs {
  contain: paint;
}

html.wt-donate-night #wtPublicView .shopgrid .product {
  content-visibility: auto;
  contain-intrinsic-size: 360px;
  contain: layout paint style;
}

html.wt-donate-night body > .container > footer.wt-public-footer {
  content-visibility: auto;
  contain-intrinsic-size: 340px;
}

html.wt-donate-night .wt-public-skeleton,
html.wt-donate-night #wtPublicView .wpay-success-card,
html.wt-donate-night #wtPublicView #donationForm .wi-confirm,
html.wt-donate-night #wtPublicView #donationForm .wi-finish {
  contain: layout paint style;
}

/* Pause only continuous CSS animations while the tab/window is not visible. */
html.wt-page-hidden *,
html.wt-page-hidden *::before,
html.wt-page-hidden *::after,
html.wt-donate-night .wt-perf-offscreen,
html.wt-donate-night .wt-perf-offscreen::before,
html.wt-donate-night .wt-perf-offscreen::after,
html.wt-donate-night .wt-perf-offscreen *,
html.wt-donate-night .wt-perf-offscreen *::before,
html.wt-donate-night .wt-perf-offscreen *::after {
  animation-play-state: paused !important;
}

/* Avoid expensive offscreen sidebar rendering on the stacked mobile layout. */
@media (max-width: 850px) {
  html.wt-donate-night #wtPublicView .wt-support-info {
    content-visibility: auto;
    contain-intrinsic-size: 520px;
  }
}


/* Mobile payment cleanup:
   On phones the user is already on the upload device, so hide the "send slip via phone"
   bridge button. Desktop/tablet layout stays unchanged. */
@media (max-width: 850px) {
  html.wt-donate-night #donationForm .wpay-mobile-open,
  html.wt-donate-night #donationForm [data-wpay-mobile-open] {
    display: none !important;
  }
}
