/* perf.css — scrolling performance overrides. Loaded last. Keeps the look; removes per-card GPU cost.
   Measured before: up to 555 elements with backdrop-filter on one page (Movies), 100+ on Live/Sports/Radio,
   which made the GPU re-blur every pill on every scrolled frame. */

/* 1. Small pills / chips that sit on cards: no backdrop blur, a slightly firmer tint instead.
   (Top-level surfaces — nav, tab bar, sheets, modals, player OSD — keep their glass.) */
.badge, .badge-live, .ccard .badge-live, .sc-logo .badge-live,
.badge-premium, .badge-gold, .ccard .ch-tags .badge-premium, .pcard.kv .rp-prem,
.ccard .q, .badge-rating, .p-lock, .ch-num, .th-logo,
.rcard-radio .r-live, .rcard-radio .r-fav,
.pcard.kv .rp-orig, .pcard.kv .rp-chip, .pcard.kv .p-add,
.rq-card .rq-prem, .rq-card .rq-hastr, .rq-card .rq-count {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
.badge { background-color: rgba(12, 13, 19, 0.72); }
.badge-live, .ccard .badge-live, .sc-logo .badge-live,
.ccard .q, .badge-rating { background-color: rgba(10, 11, 15, 0.76); }
.badge-premium, .badge-gold, .ccard .ch-tags .badge-premium { background-color: rgba(10, 11, 15, 0.76); }
.p-lock { background-color: rgba(0, 0, 0, 0.7); }
.ch-num { background-color: rgba(0, 0, 0, 0.66); }
.rcard-radio .r-fav { background-color: rgba(7, 8, 12, 0.72); }
.pcard.kv .rp-orig { background-color: rgba(7, 8, 12, 0.74); }
.pcard.kv .p-add { background-color: rgba(7, 8, 12, 0.7); }
.pcard.kv .p-add:hover { background-color: rgba(255, 255, 255, 0.22); }
.rq-card .rq-prem, .rq-card .rq-hastr, .rq-card .rq-count { background-color: rgba(10, 11, 15, 0.76); }

/* 2. Skip rendering of rails / sections that are off screen (style, layout, paint and their
   animations), with a remembered size so the scrollbar does not jump. */
.rails > .rail, .page > .rail, .lib-rails > .rail { content-visibility: auto; contain-intrinsic-size: auto 280px; }
.r-secs > .r-sec { content-visibility: auto; contain-intrinsic-size: auto 1700px; }
.r-secs > .r-sec-fav { contain-intrinsic-size: auto 0px; }
.foot-pro { content-visibility: auto; contain-intrinsic-size: auto 590px; }

/* 3. Hero grain only moves while the hero is on screen (class set by app.js). */
.billboard.bb-off .bb-grain { animation-play-state: paused; }

/* 4. Live TV grid and sports panels: skip off-screen cards. */
.grid-ch > .ccard { content-visibility: auto; contain-intrinsic-size: auto 180px; }
.sp-view > .fb-panel { content-visibility: auto; contain-intrinsic-size: auto 2100px; }
