/* v2.52: pre-hide only the free-delivery exact marker before JS finishes detecting region.
   This removes the visible flicker on page load. It does not touch "Хит" or other markers. */
html:not(.nvmed-region-moscow) .widget-markers-recommend,
body:not(.nvmed-region-moscow) .widget-markers-recommend,
html:not(.nvmed-region-moscow) [data-nvmed-badge-scope-exact="1"],
body:not(.nvmed-region-moscow) [data-nvmed-badge-scope-exact="1"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* If the current region is Moscow, force the exact marker visible even if an older script left stale classes. */
html.nvmed-region-moscow .widget-markers-recommend,
body.nvmed-region-moscow .widget-markers-recommend,
html.nvmed-region-moscow .nvmed-badge-scope-exact,
body.nvmed-region-moscow .nvmed-badge-scope-exact {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* v2.52: override old broad hiding and hide only exact free-delivery labels. */
html.nvmed-region-not-moscow [data-nvmed-badge-scope-parent-restored="1"],
body.nvmed-region-not-moscow [data-nvmed-badge-scope-parent-restored="1"],
[data-nvmed-badge-scope-parent-restored="1"] {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Only labels explicitly marked as exact by the hotfix may be hidden. */
.nvmed-badge-scope-exact.nvmed-badge-scope-hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* In Moscow, force exact labels back if old scripts left stale classes/attributes. */
html.nvmed-region-moscow .nvmed-badge-scope-exact,
body.nvmed-region-moscow .nvmed-badge-scope-exact {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
