
/*
 * HRreview — Auto Background Takeover (v3)
 * Shows wallpaper only when plugin overlay is present.
 * Primary path: body::before layer (robust against theme wipes).
 * Fallback path: footer script sets inline background on <html>.
 */

/* OFF by default — do not rely on content:none, use display toggle */
body::before{
  content: "";
  display: none !important;
}

/* ON only when footer script has detected the overlay */
:root.hrr-tk-on body::before{
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  background: transparent url('https://www.hrreview.co.uk/app/uploads/background-takeover-2025-10-20-Gallagher2.jpg')
              top center / cover no-repeat !important;
  z-index: 0 !important;       /* below overlay and header */
  pointer-events: none !important;
}

/* Expose wallpaper through TagDiv wrappers */
html, body { background-color: transparent !important; }

#td-outer-wrap,
.td-main-content-wrap,
.td-category-grid,
.td-header-wrap,
.td-footer-container {
  background-color: transparent !important;
}

/* Desktop gutters — adjust 1200 to match your plugin centre width */
@media (min-width: 1280px) {
  #td-outer-wrap {
    max-width: 1200px;     /* centre width */
    margin: 0 auto;
    overflow-x: visible;
    position: relative;
    z-index: 1;
  }
}

/* Keep plugin overlay clickable and full-viewport; make it transparent */
#wps-bt-background-takeover-id,
[data-background-takeover-id],
[id^="wps-bt-"]{
  position: fixed;
  inset: 0;
  z-index: 2;
  background: transparent !important;
}

/* Ensure header/menus are above overlay */
.td-header-wrap { position: relative; z-index: 9999; }
