/**
 * lite tier: for when safari looks at your backdrop-filter and starts sweating
 */

/* fixed backdrop-filter + scroll on ios = crime scene. this fixes it. allegedly. */
[data-nexus-perf="lite"] .nexus-frost-plate,
[data-nexus-perf="lite"] #nexus-home-frost,
[data-nexus-perf="lite"] #nexus-games-frost,
[data-nexus-perf="lite"] .nexus-glass-frost {
  display: none !important;
}

/* never animate filter during scroll. webkit will composite you into oblivion */
[data-nexus-perf="lite"] .blurred-blue-ball,
[data-nexus-perf="lite"] .blurred-red-ball,
[data-nexus-perf="lite"] .blurred-purple-ball {
  filter: blur(40px) !important;
  -webkit-filter: blur(40px) !important;
}

/* Pause work in hidden frames */
html.nexus-perf-paused .aurora-orb,
html.nexus-perf-paused .blurred-blue-ball,
html.nexus-perf-paused .blurred-red-ball,
html.nexus-perf-paused .blurred-purple-ball,
html.nexus-perf-paused .rise {
  animation-play-state: paused !important;
}

/* no content-visibility on iframes. webkit crashes. ask me how i know */
#dash-preload-frame.dash-hidden {
  opacity: 0;
  pointer-events: none;
}

[data-nexus-perf="lite"] #content-frame.page-transition-out {
  opacity: 0;
  pointer-events: none;
}

/* Compositor hygiene */
[data-nexus-perf="lite"] .game-tile,
[data-nexus-perf="lite"] .game-icon,
[data-nexus-perf="lite"] .blurred-blue-ball,
[data-nexus-perf="lite"] .blurred-red-ball,
[data-nexus-perf="lite"] .blurred-purple-ball,
[data-nexus-perf="lite"] .aurora-orb,
[data-nexus-perf="lite"] .game-launch-splash-icon,
[data-nexus-perf="lite"] .game-launch-morph {
  will-change: auto !important;
}

[data-nexus-perf="lite"] .sticky-header {
  will-change: auto !important;
}

[data-nexus-perf="lite"] .game-launch-splash-bg {
  filter: saturate(1.25) brightness(0.58) !important;
  -webkit-filter: saturate(1.25) brightness(0.58) !important;
  transform: scale(2);
}

[data-nexus-perf="lite"] html.nexus-games-scroll-root.nexus-webgl-active #nexus-webgl-bg,
[data-nexus-perf="lite"] html.nexus-games-scroll-root.nexus-video-bg-active #nexus-video-bg {
  filter: none !important;
  -webkit-filter: none !important;
  transform: none !important;
  width: 100% !important;
  height: 100% !important;
  left: 0 !important;
  top: 0 !important;
}

/* Reliable touch scrolling inside iframes on iPad */
[data-nexus-perf="lite"] html {
  -webkit-overflow-scrolling: touch;
}

/* games: real scrollport (matches projects.css ios path). visible was a trap. */
[data-nexus-perf="lite"] html.nexus-games-scroll-root {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

[data-nexus-perf="lite"] html.nexus-games-scroll-root body {
  height: auto;
  min-height: 100%;
  overflow: visible;
  touch-action: pan-y;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
}

[data-nexus-perf="lite"] html.nexus-games-scroll-root .sticky-header .top-bar,
[data-nexus-perf="lite"] html.nexus-games-scroll-root .top-bar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--theme-glass-tint, rgba(255, 255, 255, 0.88)) !important;
  will-change: auto !important;
}

[data-nexus-perf="lite"] html.nexus-games-scroll-root .category-filters,
[data-nexus-perf="lite"] html.nexus-games-scroll-root .games-section-box,
[data-nexus-perf="lite"] html.nexus-games-scroll-root .luna-rec-box,
[data-nexus-perf="lite"] html.nexus-games-scroll-root .qp-tile {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

[data-nexus-perf="lite"] html:not(.nexus-games-scroll-root) body {
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
