/* Cashback Pro 36.10.51: Keep the chosen theme visible beyond Dashboard.
   Root cause: the cinematic mobile dark veil had a .78 alpha at the bottom,
   and seasonal body backgrounds used scroll attachment. On long menu pages
   the art looked almost black after the first screen. Do not change card CSS. */

/* Built-in seasonal themes: use a viewport-fixed backdrop independent of the
   active tab's height/scroll. The existing scene remains unchanged on Home. */
html body.dashboard-tab-mode:is(.theme-halloween, .halloween-active, .theme-winter, .theme-ocean) {
  position: relative;
  isolation: isolate;
  background-image: none !important;
  background-repeat: no-repeat !important;
}
html body.dashboard-tab-mode:is(.theme-halloween, .halloween-active) {
  --cb-menu-scene: url('/static/assets/raster/halloween-desktop.webp?v=34');
  background-color: #10091f !important;
}
html body.dashboard-tab-mode.theme-winter {
  --cb-menu-scene: url('/static/assets/raster/winter-desktop.webp?v=34');
  background-color: #06162e !important;
}
html body.dashboard-tab-mode.theme-ocean {
  --cb-menu-scene: url('/static/assets/raster/ocean-desktop.webp?v=34');
  background-color: #031b2b !important;
}
html body.dashboard-tab-mode:is(.theme-halloween, .halloween-active, .theme-winter, .theme-ocean)::after {
  content: '' !important;
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: -2 !important;
  pointer-events: none !important;
  background-image: var(--cb-menu-scene) !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
}

/* Replace only the tab-view's heavy cinema veil (up to 78% black on mobile).
   Keep the scenic texture and glow readable throughout long menu pages. */
html:not(.theme-bootstrap-light) body.dashboard-tab-mode:is(.theme-halloween, .halloween-active, .theme-winter, .theme-ocean)::before {
  background: linear-gradient(180deg,
    rgba(3, 8, 22, .12) 0%,
    rgba(3, 8, 22, .19) 48%,
    rgba(3, 8, 22, .32) 100%) !important;
}

/* Default Dark: carry the aurora glow from Dashboard to every menu section.
   Preserve the native body gradient and theme glass panels underneath. */
html body.theme-default.default-dark-mode.dashboard-tab-mode::before {
  background:
    radial-gradient(ellipse at 18% 24%, rgba(73, 140, 225, .16), transparent 40%),
    radial-gradient(ellipse at 86% 66%, rgba(151, 94, 208, .13), transparent 42%),
    linear-gradient(180deg, rgba(3, 8, 22, .02), rgba(3, 8, 22, .19)) !important;
}

/* Seasonal portrait assets were designed for phone displays. Keep the picture
   fixed to the visible phone screen instead of stretching it over document height. */
@media (max-width: 760px) {
  html body.dashboard-tab-mode:is(.theme-halloween, .halloween-active) {
    --cb-menu-scene: url('/static/assets/raster/halloween-mobile.webp?v=34');
  }
  html body.dashboard-tab-mode.theme-winter {
    --cb-menu-scene: url('/static/assets/raster/winter-mobile.webp?v=34');
  }
  html body.dashboard-tab-mode.theme-ocean {
    --cb-menu-scene: url('/static/assets/raster/ocean-mobile.webp?v=34');
  }
}
