/**
 * ChaCha Home RELEASE-04 R4 — Smart mobile header.
 * Uses the existing Kadence header/controls; no cloned markup.
 * JavaScript adds the enabled/direction classes only on supported pages.
 */
@media (max-width: 1024px) {
  body.chacha-smart-header-ready #masthead {
    position: sticky !important;
    top: 0;
    z-index: 1005;
    transform: translate3d(0, 0, 0);
    transition: transform 190ms cubic-bezier(.2, .7, .25, 1);
    will-change: transform;
    isolation: isolate;
  }

  body.chacha-smart-header-ready.chacha-smart-header-down #masthead {
    transform: translate3d(0, calc(-100% - 2px), 0);
    pointer-events: none;
  }

  body.chacha-smart-header-ready.chacha-smart-header-up #masthead,
  body.chacha-smart-header-ready.chacha-smart-header-locked #masthead {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
  }

  /* Desktop header styling and Kadence mobile drawer remain untouched. */
  @media (prefers-reduced-motion: reduce) {
    body.chacha-smart-header-ready #masthead {
      transition: none !important;
      will-change: auto;
    }
  }
}

/* Fixed WordPress admin bar only above the 600px breakpoint. */
@media (min-width: 601px) and (max-width: 782px) {
  body.admin-bar.chacha-smart-header-ready #masthead { top: 46px; }
}
@media (min-width: 783px) and (max-width: 1024px) {
  body.admin-bar.chacha-smart-header-ready #masthead { top: 32px; }
}
