/**
 * @file
 * Critical mobile megamenu styles — loaded in <head> to prevent FOUC.
 * Must stay in sync with tb_megamenu breakpoint (920px).
 */

@media (max-width: 920px) {
  /* Hide menu panel until theme CSS is ready (prevents unstyled + desktop layout flash). */
  .tbm:not(.tbm-ready) .tbm-collapse,
  .tbm:not(.tbm-ready) .tbm-nav,
  .tbm:not(.tbm--mobile-show) .tbm-collapse {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    pointer-events: none !important;
  }

  /* Suppress desktop horizontal nav before .tbm--mobile is applied by JS. */
  .tbm:not(.tbm--mobile) .tbm-nav {
    display: none !important;
  }

  .tbm.tbm--mobile .tbm-button {
    display: block !important;
  }

  .tbm.tbm-ready.tbm--mobile-show .tbm-collapse {
    display: block !important;
    visibility: visible !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    overflow: visible !important;
    clip: auto !important;
    pointer-events: auto !important;
  }
}
