/* ===== perf.css (2026-11-14): phones were heating up / freezing on the store page.
   Visual-only overrides, loaded after the theme. Payment logic is untouched. ===== */

/* 1. Background: blur + darkening are baked into bg-dim.jpg, so the browser no longer
      runs a full-screen filter on every frame (same look, 4-5x smaller file). */
body::before {
    background-image: url("../img/bg-dim.jpg") !important;
    filter: none !important;
}

/* 2. «Последние покупки» live dot: the pulse animated box-shadow, which repainted the page
      every frame forever (~3x main-thread work at idle). Same ring, now transform/opacity
      only, so it runs on the compositor. Paused off-screen by script.js (.lb-off). */
.main > .donate .lb-live-dot {
    position: relative;
    box-shadow: none !important;
    animation: none !important;
}
.main > .donate .lb-live-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(52, 211, 153, 0.55);
    animation: lb-ping 1.6s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
    pointer-events: none;
}
.main > .donate .lb-off .lb-live-dot::after { animation: none; opacity: 0; }
@keyframes lb-ping {
    0%   { transform: scale(1);    opacity: 1; }
    70%  { transform: scale(2.8);  opacity: 0; }
    100% { transform: scale(2.8);  opacity: 0; }
}

/* 3. Phones and tablets: no backdrop blur (the page behind is already a dark blurred
      picture, so the glass effect is invisible there but costs the GPU on every scroll
      frame). Backgrounds get a bit more opaque to keep the same contrast. */
@media (max-width: 991px), (hover: none) {
    body > .navbar,
    body > .navbar.open,
    .main > .mainslide.header .description,
    .main > .mainslide.header .monitoring,
    .main > .mainslide.header .hero-action,
    .donate-panel[data-id="donate"] > .wrapper > .modal-content,
    .static-page .section,
    .modal.pack-modal,
    #checkoutform,
    #methodform,
    #numberform {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
    html body > .navbar { background-color: rgba(10, 15, 25, 0.94); }
    html body > .navbar.open { background-color: rgba(9, 13, 23, 0.98); }
    html .static-page .section { background: rgba(11, 17, 31, 0.86); }
    .modal.pack-modal { background-color: rgba(2, 6, 23, 0.72); }
    html body #checkoutform, html body #methodform, html body #numberform { background: rgba(2, 6, 23, 0.88) !important; }
}

/* 4. Users who asked the system for less motion get no looping animations. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-iteration-count: 1 !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
