/* MOO_SERP_LOADING_GATE_V103
 * The PHP template puts data-moo103-ready="0" on the grid BEFORE first paint
 * when search results are deferred. Keep right-column and legacy cards hidden
 * until #searchResults finishes its initial AJAX fragment.
 */
body.moo-search-page #mooSerpLayoutV102[data-moo103-ready="0"] #mooSerpSidebarV102 {
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
/* Do not allow old/migrating Wikipedia or tool cards to overlay the skeleton.
   Applies wherever another script temporarily puts the card inside main. */
body.moo-search-page #mainContent:has(#mooSerpLayoutV102[data-moo103-ready="0"]) :is(
  #mooUxWiki,
  .moo-ux-legacy-rail,
  .moo-knowledge-panel,
  .moo-wikipedia-panel,
  .moo-wiki-panel,
  .moo-brave-panel,
  .moo-knowledge-card,
  [data-moo102-kind],
  .moo103-pending-panel
) {display:none!important;visibility:hidden!important;pointer-events:none!important;}
/* Keep the loading UI visible and accessible: only the knowledge/sidebar UI
   disappears, not the search status, query, results, or skeleton cards. */
body.moo-search-page #mooSerpLayoutV102[data-moo103-ready="0"] #searchResults,
body.moo-search-page #mooSerpLayoutV102[data-moo103-ready="0"] .moo-results-skeleton {
  visibility:visible!important;
}
/* Direct legacy pre-results column (already hidden before layout by v1.0.2)
   may be injected AFTER the grid by late scripts; hide it while searching. */
body.moo-search-page #mainContent:has(#mooSerpLayoutV102[data-moo103-ready="0"]) > :is(
  .moo-legacy-sidebar,.moo-knowledge-sidebar,.moo-ux-legacy-rail,
  [class*="wikipedia-sidebar"],[class*="knowledge-sidebar"]
) {display:none!important;}
/* On completion the v1.0.2 responsive grid positions panels. Guard against
   delayed injected panels bringing back old absolute/fixed positioning. */
body.moo-search-page #mooSerpLayoutV102[data-moo103-ready="1"] #mooSerpSidebarV102 > :is(
  #mooUxWiki,.moo102-panel,[data-moo102-kind],.moo-ux-wiki
) {
  position:relative!important;
  top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
  transform:none!important;float:none!important;
  max-width:100%!important;min-width:0!important;
}
/* If an older script leaves a panel in the results area during loading,
   hide the identified card but don't blank out web search cards. */
body.moo-search-page #mooSerpLayoutV102[data-moo103-ready="0"] #mooSerpPrimaryV102 > .moo103-pending-panel {
  display:none!important;
}
