/* ID Federal: efeito sazonal puramente visual, sem alterar identidade, artes ou fluxo de trabalho */
body.idf-halloween-active {
  --idf-hw-bg:#120f20;
  --idf-hw-surface:#231c31;
  --idf-hw-edge:#554066;
  --idf-hw-text:#f7f2ff;
  background:radial-gradient(circle at 88% 9%, #533348 0, #24182d 24%, #120f20 68%) fixed!important;
  color:var(--idf-hw-text);
}
/* Não modificar imagens de posts nem logotipo: os seletores são de componentes de interface */
body.idf-halloween-active :is(#page,.site,#content,.site-content,main,.site-main,.entry-content,.wp-site-blocks,.elementor-section-wrap) {
  background-color:transparent!important;
}
body.idf-halloween-active :is(.marketing-dashboard,.dashboard-wrapper,.marketing-wrapper,.portal-wrapper,.portal-container,.elementor-section,.elementor-container) {
  border-color:#45374f;
}
body.idf-halloween-active :is(.marketing-card,.dashboard-card,.partner-card,.login-card,.portal-card,.card,.art-card,.wp-block-group,.post-card,.panel) {
  background-color:#251d31!important;
  border-color:#514063!important;
  color:#f6f0ff!important;
  box-shadow:0 10px 32px #0808102e;
}
body.idf-halloween-active :is(.marketing-card,.dashboard-card,.partner-card,.login-card,.portal-card,.card,.art-card,.post-card,.panel) :is(h1,h2,h3,h4,label,p,small) {
  color:inherit;
}
body.idf-halloween-active :is(input:not([type=checkbox]):not([type=radio]),textarea,select) {
  color:#f4eeff!important;
  background-color:#292238!important;
  border-color:#6a5277!important;
}
body.idf-halloween-active :is(input,textarea)::placeholder { color:#c8b7d7!important; opacity:1; }
body.idf-halloween-active :is(input[type=checkbox],input[type=radio]) { accent-color:#ff9a47; }
body.idf-halloween-active :is(button,.button,[type=submit],.elementor-button) { transition:filter .2s,box-shadow .2s; }
body.idf-halloween-active :is(button,.button,[type=submit],.elementor-button):hover { filter:brightness(1.07);box-shadow:0 0 17px #ff952855; }
body.idf-halloween-active :is(a,input,button,select,textarea):focus-visible { outline:2px solid #ffa957;outline-offset:3px; }
/* Para fundos de seção internos que antes permaneciam brancos. Exclui a mídia das artes. */
body.idf-halloween-active :is(.container,.content-container,.portal-content,.marketing-content,.marketing-main) {
  background-color:transparent!important;
}
/* Camada de decoração nunca captura mouse/toques nem altera os componentes internos */
#idf-halloween-scene { pointer-events:none!important; position:fixed;inset:0;overflow:hidden;z-index:9;isolation:isolate; }
#idf-halloween-scene .idf-hw-glow { position:absolute;inset:0;background:radial-gradient(circle at 86% 13%,#f99a3622,transparent 21%),radial-gradient(circle at 7% 76%,#9d4fc625,transparent 28%); }
#idf-halloween-scene .idf-hw-moon { position:absolute;right:5%;top:12%;width:clamp(54px,7vw,110px);aspect-ratio:1;border-radius:50%;background:#ffca76;opacity:.73;box-shadow:0 0 48px 15px #f8a44840,0 0 95px 40px #d9772220; }
#idf-halloween-scene .idf-hw-bat {position:absolute;width:20px;height:11px;opacity:.7; background:#100c18;clip-path:polygon(0 15%,18% 29%,29% 0,45% 34%,50% 50%,55% 34%,71% 0,82% 29%,100% 15%,89% 80%,69% 60%,50% 89%,31% 60%,11% 80%);animation:idf-hw-bat-drift 6s ease-in-out infinite alternate;}
#idf-halloween-scene .idf-hw-bat:nth-child(1){top:9%;right:24%;transform:rotate(-18deg)}
#idf-halloween-scene .idf-hw-bat:nth-child(2){top:19%;right:12%;animation-delay:-2s;animation-duration:7s}
#idf-halloween-scene .idf-hw-bat:nth-child(3){top:7%;left:18%;animation-delay:-3.5s;animation-duration:5s}
#idf-halloween-scene .idf-hw-witch-flight {
  position:absolute;
  left:0;top:0;
  width:clamp(105px, 11vw, 155px);
  height:auto;
  will-change:transform,opacity;
  animation:idf-hw-fly-right-v18 18s linear infinite;
  filter:drop-shadow(0 3px 5px rgba(8,4,17,.52));
}
#idf-halloween-scene .idf-hw-witch-facing {
  position:relative;
  width:100%;
  animation:none;
}
#idf-halloween-scene .idf-hw-witch-rock {
  position:relative;
  width:100%;
  animation:idf-hw-rock-v13 1.25s ease-in-out infinite alternate;
  transform-origin:55% 58%;
}
#idf-halloween-scene .idf-hw-witch-base,
#idf-halloween-scene .idf-hw-part {
  display:block;
  width:100%;height:auto;
  user-select:none;-webkit-user-drag:none;pointer-events:none;
}
#idf-halloween-scene .idf-hw-part {position:absolute;inset:0;will-change:transform;}
#idf-halloween-scene .idf-hw-part-hair {
  transform-origin:51% 31%;animation:idf-hw-hair-v13 .85s ease-in-out infinite alternate;
}
#idf-halloween-scene .idf-hw-part-cape {
  transform-origin:57% 50%;animation:idf-hw-cape-v13 1s ease-in-out infinite alternate;
}
#idf-halloween-scene .idf-hw-part-leg-front {
  transform-origin:63% 78%;animation:idf-hw-leg-front-v13 .7s ease-in-out infinite alternate;
}
#idf-halloween-scene .idf-hw-part-leg-back {
  transform-origin:52% 80%;animation:idf-hw-leg-back-v13 .7s ease-in-out infinite alternate-reverse;
}
@keyframes idf-hw-rock-v13 {from{transform:translateY(2px) rotate(-1.3deg)}to{transform:translateY(-3px) rotate(1.3deg)}}
@keyframes idf-hw-hair-v13 {from{transform:rotate(-4deg) translate(-2px,1px)}to{transform:rotate(4deg) translate(3px,-2px)}}
@keyframes idf-hw-cape-v13 {from{transform:rotate(-4deg) translate(-3px,-1px) scaleX(.98)}to{transform:rotate(5deg) translate(3px,2px) scaleX(1.01)}}
@keyframes idf-hw-leg-front-v13 {from{transform:rotate(-4deg) translateY(-1px)}to{transform:rotate(4deg) translateY(2px)}}
@keyframes idf-hw-leg-back-v13 {from{transform:rotate(4deg) translateY(2px)}to{transform:rotate(-4deg) translateY(-1px)}}
@keyframes idf-hw-bat-drift {to{translate:30px -18px;rotate:12deg;}}

/* Paleta completa da Central. O JS marca apenas paineis opacos claros,
   que sao variaveis entre templates. Nunca recolorir pixels das artes. */
body.idf-halloween-active {
  --idf-hw-bg:#110e1d;
  --idf-hw-surface:#241b30;
  --idf-hw-edge:#66425c;
  --idf-hw-orange:#ff981d;
  --idf-hw-text:#f6eefb;
  background:#110e1d!important;
  color:var(--idf-hw-text)!important;
  color-scheme:dark;
}
body.idf-halloween-active :is(#page,.site,#content,.site-content,main,.site-main,.entry-content,.wp-site-blocks,.elementor-section-wrap) {
  background-color:transparent!important;
}
body.idf-halloween-active .idf-hw-portal-root,
body.idf-halloween-active .idf-hw-dark-shell {
  background-color:#191323!important;
  background-image:radial-gradient(circle at 95% 0%,rgba(235,105,28,.09),transparent 35%)!important;
  color:#f6eefb!important;
  border-color:#513652!important;
}
body.idf-halloween-active .idf-hw-dark-surface {
  background:#2a2037!important;
  border-color:#634965!important;
  box-shadow:0 7px 22px rgba(4,1,12,.20)!important;
  color:#f6eefb!important;
}
body.idf-halloween-active .idf-hw-portal-root :is(h1,h2,h3,h4,h5,h6,label,legend,p,small,li,strong,em,figcaption),
body.idf-halloween-active .idf-hw-portal-root .idf-hw-dark-text {
  color:#f6eefb!important;
}
body.idf-halloween-active .idf-hw-portal-root a:not(.idf-hw-orange-button) {color:#ffbe78!important;}
body.idf-halloween-active .idf-hw-portal-root :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]),select,textarea) {
  background:#392941!important;
  color:#fff7f1!important;
  border:1px solid #79546b!important;
  box-shadow:none!important;
  color-scheme:dark;
}
body.idf-halloween-active .idf-hw-portal-root :is(input,textarea)::placeholder {color:#d4c2d9!important;opacity:1;}
body.idf-halloween-active .idf-hw-portal-root :is(input[type=checkbox],input[type=radio]) {accent-color:#ff961f!important;}
body.idf-halloween-active .idf-hw-portal-root :is(button:not(.components-button),input[type=button],input[type=submit],input[type=reset],.idf-hw-orange-button) {
  background:linear-gradient(105deg,#ffab34,#fa781b)!important;
  color:#271421!important;
  border:1px solid #ffc06b!important;
  font-weight:700;
  text-decoration:none!important;
  box-shadow:0 3px 10px rgba(192,81,4,.23)!important;
  transition:filter .2s,box-shadow .2s;
}
body.idf-halloween-active .idf-hw-portal-root :is(button:not(.components-button),input[type=button],input[type=submit],input[type=reset],.idf-hw-orange-button):hover {
  filter:brightness(1.10)!important;
  box-shadow:0 0 18px rgba(255,153,30,.42)!important;
}
body.idf-halloween-active .idf-hw-portal-root :is(button,input,a,select,textarea):focus-visible {outline:2px solid #ffba55!important;outline-offset:2px;}
body.idf-halloween-active .idf-hw-portal-root :is(button,input[type=submit],.idf-hw-orange-button):disabled {
  filter:grayscale(.45);opacity:.6;
}
body.idf-halloween-active .idf-hw-portal-root :is(hr,fieldset) {border-color:#604560!important;}
body.idf-halloween-active .idf-hw-portal-root :is(.card,.art-card,.portal-card,.partner-card,.marketing-card,.dashboard-card,.login-card,.panel) {
  background-color:#2a2037!important;
  border-color:#634965!important;
}
body.idf-halloween-active .idf-hw-portal-root :is(.container,.content-container,.portal-content,.marketing-content,.marketing-main) {
  color:#f6eefb!important;
}
/* O footer da cena nunca impede clicar, digitar ou rolar pelo portal. */
#idf-halloween-scene{pointer-events:none!important;}
@media(max-width:700px){
  #idf-halloween-scene .idf-hw-witch-flight{width:clamp(95px,25vw,130px);animation-duration:16s;}
  #idf-halloween-scene .idf-hw-witch-facing{animation-duration:16s;}
  #idf-halloween-scene .idf-hw-moon{right:7%;top:11%;}
  #idf-halloween-scene .idf-hw-bat:nth-child(3){display:none;}
}
@media(prefers-reduced-motion:reduce){
  #idf-halloween-scene .idf-hw-witch-flight{animation:none!important;display:none!important;}
  #idf-halloween-scene .idf-hw-witch-facing,
  #idf-halloween-scene .idf-hw-witch-rock,
  #idf-halloween-scene .idf-hw-part,
  #idf-halloween-scene .idf-hw-bat{animation:none!important;}
}

/* v1.4: fundos de componentes dentro da Central e camadas do tema.
   Reforco para cores claras declaradas pelo template como background-image. */
body.idf-halloween-active .idf-hw-portal-root {
  background:#191321!important;
  background-image:radial-gradient(circle at 90% 3%,rgba(237,123,31,.10),transparent 35%)!important;
  color:#f6eefb!important;
}
body.idf-halloween-active .idf-hw-dark-shell {
  background-color:#191321!important;
  background-image:radial-gradient(circle at 92% 4%,rgba(237,123,31,.10),transparent 35%)!important;
  color:#f6eefb!important;
}
body.idf-halloween-active .idf-hw-dark-surface {
  background-color:#292035!important;
  background-image:none!important;
  border-color:#654867!important;
  color:#f6eefb!important;
}
body.idf-halloween-active .idf-hw-portal-root :is(input[type=file]) {
  color:#efe5f5!important;
  background:transparent!important;
}
body.idf-halloween-active .idf-hw-portal-root input[type=file]::file-selector-button {
  background:linear-gradient(105deg,#ffad35,#f77c19)!important;
  color:#251525!important;
  border:1px solid #ffbc63!important;
  border-radius:6px;
  padding:6px 10px;
  cursor:pointer;
}
body.idf-halloween-active .idf-hw-portal-root :is(.idf-hw-dark-surface,.idf-hw-dark-shell) a:not(.idf-hw-orange-button) { color:#ffbd78!important; }

/* Sobrescreve a regra antiga de transparencias do template em paginas com ID. */
body.idf-halloween-active :is(#page,.site,#content,.site-content,main,.site-main,.entry-content,.wp-site-blocks,.elementor-section-wrap).idf-hw-dark-shell {
  background-color:#191321!important;
  background-image:radial-gradient(circle at 92% 4%,rgba(237,123,31,.10),transparent 35%)!important;
}

/* ------------------------------------------------------------------------
   v1.6 - Cor original roxo/laranja, duas bruxas e conflito com plugins antigos
   ------------------------------------------------------------------------ */
body.idf-halloween-active .idf-halloween-sky,
body.idf-halloween-active #idf-halloween-scene:not([data-idf-version="2.1"]),
body.idf-halloween-active .idf-halloween-witch,
body.idf-halloween-active .idf-witch-1,
body.idf-halloween-active .idf-witch-2,
body.idf-halloween-active .idf-witch-3 {display:none!important;}

body.idf-halloween-active #idf-halloween-scene[data-idf-version="2.1"] {
  display:block!important;
  position:fixed!important;inset:0!important;
  z-index:40!important;overflow:hidden!important;
  pointer-events:none!important;isolation:isolate;
  filter:none!important;backdrop-filter:none!important;
  mix-blend-mode:normal!important;opacity:1!important;
}
body.idf-halloween-active #idf-halloween-scene[data-idf-version="2.1"] :is(img,.idf-hw-witch-facing,.idf-hw-witch-rock,.idf-hw-part) {
  mix-blend-mode:normal!important;
  /* elimina colorizacao involuntaria das bruxas por efeitos legados */
  filter:none!important;
  backdrop-filter:none!important;
  opacity:1!important;
}
body.idf-halloween-active #idf-halloween-scene[data-idf-version="2.1"] .idf-hw-witch-flight {
  display:block!important;
  position:absolute!important;top:0!important;left:0!important;
  height:auto!important;
  filter:drop-shadow(0 5px 8px rgba(9,4,20,.48))!important;
  will-change:transform;
}
body.idf-halloween-active #idf-halloween-scene[data-idf-version="2.1"] .idf-hw-flight-a {
  width:clamp(110px,11vw,170px)!important;
  animation:idf-hw-fly-right-v18 18s linear infinite!important;
}
body.idf-halloween-active #idf-halloween-scene[data-idf-version="2.1"] .idf-hw-flight-b {
  width:clamp(92px,8vw,132px)!important;
  animation:idf-hw-fly-left-v18 21s linear -9s infinite!important;
}
body.idf-halloween-active #idf-halloween-scene[data-idf-version="2.1"] .idf-hw-flight-a .idf-hw-witch-facing {
  transform:scaleX(1)!important;animation:none!important;
}
body.idf-halloween-active #idf-halloween-scene[data-idf-version="2.1"] .idf-hw-flight-b .idf-hw-witch-facing {
  transform:scaleX(-1)!important;animation:none!important;
}
body.idf-hw-js-flight #idf-halloween-scene[data-idf-version="2.1"] .idf-hw-witch-flight {
  animation:none!important;
}
/* Camadas individuais mantem os movimentos da roupa sem colorizacao. */
body.idf-halloween-active #idf-halloween-scene[data-idf-version="2.1"] .idf-hw-part {filter:none!important;}
body.idf-halloween-active :is(header.site-header,.site-header,.elementor-location-header,.site-branding,.custom-logo-link) {
  background-color:#191321!important;
  background-image:none!important;
}
body.idf-halloween-active :is(header.site-header,.site-header,.elementor-location-header) :is(.site-title,.site-description) {
  color:#f5e9ff!important;
}
body.idf-halloween-active img.idf-hw-logo-render {background:transparent!important;box-shadow:none!important;mix-blend-mode:normal!important;}
@media(max-width:700px){
  body.idf-halloween-active #idf-halloween-scene[data-idf-version="2.1"] .idf-hw-flight-a{width:105px!important;}
  body.idf-halloween-active #idf-halloween-scene[data-idf-version="2.1"] .idf-hw-flight-b{width:84px!important;}
}
@media(prefers-reduced-motion:reduce){
  body.idf-halloween-active #idf-halloween-scene[data-idf-version="2.1"] .idf-hw-witch-flight{display:none!important;animation:none!important;}
  body.idf-halloween-active #idf-halloween-scene[data-idf-version="2.1"] .idf-hw-part{animation:none!important;}
}

body.idf-halloween-active .idf-hw-brand-shell {background:#191321!important;background-image:none!important;}

/* v1.6: padrao escuro persistente, inclusive durante carregamento do JS.
   Somente nos containers da interface; nao mexe no conteudo visual das artes. */
body.idf-halloween-active :is(#page,.site,#content,.site-content,.wp-site-blocks,main,.site-main,.entry-content,.portal-wrapper,.portal-container,.dashboard-wrapper,.marketing-wrapper,.marketing-dashboard,.marketing-main,.portal-content,.marketing-content) {
 background-color:#191321!important; color:#f6eefb!important;
}
body.idf-halloween-active :is(.marketing-card,.dashboard-card,.partner-card,.login-card,.portal-card,.card,.art-card,.post-card,.panel,.marketing-dashboard aside,.portal-wrapper aside) {
 background-color:#292035!important; color:#f6eefb!important;
}
body.idf-halloween-active #idf-halloween-scene[data-idf-version="2.1"]{display:block!important;}

/* v1.7: fallback para layouts que nao publicam body_class().
   O bootstrap em wp_head/login_head garante o estado antes do script visual. */
html.idf-hw-preview-ready { background:#110e1d!important; }
html.idf-hw-preview-ready body.idf-halloween-active {background:#110e1d!important;color:#f6eefb!important;}

/* V1.8: sobreposicoes consolidadas; voos horizontais sem diagonais longas. */
#idf-halloween-scene .idf-hw-moon {
  right:clamp(32px,9vw,160px);top:clamp(95px,15vh,190px);
  width:clamp(135px,19vw,320px);opacity:.64;
  background:radial-gradient(circle at 32% 29%,#f8dcab 0 5%,transparent 6%),radial-gradient(circle at 63% 52%,#d2a97599 0 11%,transparent 12%),radial-gradient(circle at 36% 67%,#d5b18188 0 8%,transparent 9%),radial-gradient(circle at 40% 35%,#fff2cb,#f5cb86 64%,#d89552 100%);
  box-shadow:0 0 48px 12px #f8c16d38,0 0 120px 44px #fca34b12;
  z-index:0;
}
#idf-halloween-scene .idf-hw-glow {z-index:0;opacity:.65}
#idf-halloween-scene .idf-hw-bats {position:absolute;inset:0;z-index:1}
#idf-halloween-scene .idf-hw-witch-flight{z-index:2}
@keyframes idf-hw-fly-right-v18 {
  from{transform:translate3d(-300px,19vh,0) rotate(2deg)}
  25%{transform:translate3d(25vw,21vh,0) rotate(1deg)}
  50%{transform:translate3d(50vw,18vh,0) rotate(-1deg)}
  75%{transform:translate3d(75vw,21vh,0) rotate(1deg)}
  to{transform:translate3d(calc(100vw + 300px),19vh,0) rotate(2deg)}
}
@keyframes idf-hw-fly-left-v18 {
  from{transform:translate3d(calc(100vw + 300px),59vh,0) rotate(-2deg)}
  25%{transform:translate3d(75vw,57vh,0) rotate(-1deg)}
  50%{transform:translate3d(50vw,60vh,0) rotate(1deg)}
  75%{transform:translate3d(25vw,57vh,0) rotate(-1deg)}
  to{transform:translate3d(-300px,59vh,0) rotate(-2deg)}
}
@media(max-width:700px){#idf-halloween-scene .idf-hw-moon{top:12vh;right:-36px;width:175px;opacity:.47}}
@media(prefers-reduced-motion:reduce){#idf-halloween-scene .idf-hw-witch-flight{animation:none!important;display:none!important}}
