// ─── Foreign admin notice isolation ───────────────────────────────────────────
// Fallback for Easyjobs_Admin_Notice_Guard (admin/includes/class-easyjobs-admin-notice-guard.php).
// The guard removes other plugins' callbacks from the core notice hooks on
// EasyJobs screens. Some plugins bypass those hooks: they echo in
// `in_admin_header` or `admin_footer`, or inject a notice with JS. WP core JS
// (common.js) then moves every `div.notice/.error/.updated` under
// `hr.wp-header-end`, inside our app `.wrap`. This hides those leftovers.
//
// `body.easyjobs-admin-screen` is added server-side (admin_body_class), so the
// rules apply on first paint, before React mounts. EasyJobs' own notices keep
// showing: they carry `.easyjobs-notice` (WPNotice account id) or
// `.easyjobs-admin-notice` (for callbacks on the `easyjobs_admin_notices` action).
$ej-foreign-notice: ":is(.notice, .error, .updated, .update-nag, .notice-error, .notice-warning, .notice-info, .notice-success)";
$ej-own-notice: ":not(.easyjobs-notice):not(.easyjobs-admin-notice):not(.easyjobs-admin-notices)";

body.easyjobs-admin-screen {
	#wpcontent > #{$ej-foreign-notice}#{$ej-own-notice},
  #wpbody > #{$ej-foreign-notice}#{$ej-own-notice},
  #wpbody-content > #{$ej-foreign-notice}#{$ej-own-notice},
  // The app .wrap only holds hr.wp-header-end and .easy-page-body; anything
  // else in it was put there by another plugin or by core's notice mover.
  #wpbody-content > .wrap > :not(.easy-page-body):not(.wp-header-end)#{$ej-own-notice} {
		display: none !important;
	}
}
