!function(){console.log("AWT Header Script Loaded"),document.addEventListener("click",e=>{const t=e.target.closest(".mobile-toggle-btn");if(t){e.preventDefault(),e.stopPropagation();const n=t.closest(".awt-header-block");if(!n)return;const r=n.querySelector(".mobile-menu");if(!r)return;return r.classList.contains("hidden")?(r.classList.remove("hidden"),t.setAttribute("aria-expanded","true"),console.log("Menu Opened")):(r.classList.add("hidden"),t.setAttribute("aria-expanded","false"),console.log("Menu Closed")),o=n,void document.querySelectorAll(".awt-header-block").forEach(e=>{if(e!==o){const t=e.querySelector(".mobile-menu"),o=e.querySelector(".mobile-toggle-btn");t&&t.classList.add("hidden"),o&&o.setAttribute("aria-expanded","false")}})}var o;e.target.closest(".awt-header-block")||(document.querySelectorAll(".mobile-menu").forEach(e=>e.classList.add("hidden")),document.querySelectorAll(".mobile-toggle-btn").forEach(e=>e.setAttribute("aria-expanded","false")))});const e=()=>{const e=document.querySelector(".wp-block-awt-author-pro-header.fixed")||document.querySelector(".awt-header-block.fixed");if(!e)return;const t=()=>{const t=e.offsetHeight,o=document.querySelector(".awt-canvas-wrapper")||document.querySelector("main");o?o.style.marginTop=`${t}px`:document.body.style.paddingTop=`${t}px`};t(),window.addEventListener("resize",t)};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}();