/* AllmaNews 1.2.24 | Reversible, editorial background illustration system.
   Layer behind every heading, card and ad; never block clicks or readability.
   Settings are page-type scoped, not tied to the global header/footer mode. */

/* Legacy right-edge decorative widget from imported homepage: never show it.
   The clean import JSON also omits the widget entirely. */
:is(#allmanews-content,.elementor) .an-page:not(.an-category-page) .an-ornament-right,
:is(#allmanews-content,.elementor) .an-page:not(.an-category-page) > .an-ornament-right {
  display:none!important;
  visibility:hidden!important;
}

body.anm-visual-enabled :is(#allmanews-content,.elementor) :is(.an-page,.an-category-page),
body.anm-visual-article #allmanews-content.an-article-page,
body.anm-visual-category #allmanews-content.an-post-shell:not(.an-article-page) {
  position:relative;
  isolation:isolate;
}

body.anm-visual-home :is(#allmanews-content,.elementor) .an-page:not(.an-category-page)::before,
body.anm-visual-category :is(#allmanews-content,.elementor) .an-category-page::before,
body.anm-visual-category #allmanews-content.an-post-shell:not(.an-article-page)::before,
body.anm-visual-article #allmanews-content.an-article-page::before {
  content:"";
  pointer-events:none;
  position:absolute;
  inset:0;
  z-index:-1;
  display:block;
  opacity:var(--anm-visual-opacity,.20);
  background-image:
    var(--anm-visual-art),
    radial-gradient(ellipse 480px 400px at 14% 29%,rgba(40,113,178,.37),rgba(40,113,178,0) 78%),
    radial-gradient(ellipse 320px 330px at 89% 71%,rgba(238,58,95,.25),rgba(238,58,95,0) 80%);
  background-size:
    var(--anm-visual-size,600px) auto,
    880px 720px,
    660px 680px;
  background-position:
    var(--anm-visual-position,right top),
    left top,
    right center;
  background-repeat:
    var(--anm-visual-repeat,no-repeat),
    no-repeat,
    no-repeat;
  background-attachment:scroll;
}

/* Native article screens get a narrower watercolor-style accent: the main
   reading column stays pure white, and artwork remains behind its contents. */
body.anm-visual-article #allmanews-content.an-article-page::before {
  background-image:
    var(--anm-visual-art),
    radial-gradient(ellipse 360px 430px at 8% 63%,rgba(62,114,166,.20),transparent 77%),
    radial-gradient(ellipse 300px 420px at 91% 82%,rgba(234,63,101,.12),transparent 80%);
}

/* Decorative-only layers: do not change element positions, avoid layout shift.
   The original page and Elementor content remain intact. */

@media (min-width:768px) {
  body.anm-visual-hide-desktop :is(#allmanews-content,.elementor) .an-page:not(.an-category-page)::before,
  body.anm-visual-hide-desktop :is(#allmanews-content,.elementor) .an-category-page::before,
  body.anm-visual-hide-desktop #allmanews-content.an-post-shell::before {
    content:none!important;
    display:none!important;
  }
}
@media (max-width:767px) {
  body.anm-visual-hide-mobile :is(#allmanews-content,.elementor) .an-page:not(.an-category-page)::before,
  body.anm-visual-hide-mobile :is(#allmanews-content,.elementor) .an-category-page::before,
  body.anm-visual-hide-mobile #allmanews-content.an-post-shell::before {
    content:none!important;
    display:none!important;
  }
  body.anm-visual-enabled :is(#allmanews-content,.elementor) .an-page::before,
  body.anm-visual-enabled #allmanews-content.an-post-shell::before {
    background-size:
      min(88vw,var(--anm-visual-size,600px)) auto,
      min(95vw,500px) 500px,
      min(95vw,480px) 490px;
  }
}
