/* SVCFIX1 · 20260805-svcfix1
 * Closed «Сервисы» / product-switcher / swarm13 scrim must NEVER capture the viewport.
 * Kill: invisible full-screen scrim · blue ghost ::after ring · offset shadow box.
 * Tips LOCKED — fold only. Cascade-last via late HTML inject.
 */
html[data-vy-svcfix1="20260805-svcfix1"] {
  --vy-svcfix1: 1;
}

/* ── 1) Messenger swarm13 scrim: closed = fully out of hit-test ─────────────
 * Edge 201 had display:block!important + opacity:0 forever; pe:none without
 * !important lost to tip button pe:auto → freeze entire phone UI. */
html[data-vy-svcfix1="20260805-svcfix1"] body[data-page="messenger"] .msg-swarm13-scrim,
html[data-vy-svcfix1="20260805-svcfix1"] body[data-page="messenger"] button.msg-swarm13-scrim {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  inset: auto !important;
  top: -9999px !important;
  left: -9999px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: -1 !important;
  background: transparent !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  transform: none !important;
  transition: none !important;
}

html[data-vy-svcfix1="20260805-svcfix1"] body[data-page="messenger"].g02-profile-open .msg-swarm13-scrim,
html[data-vy-svcfix1="20260805-svcfix1"] body[data-page="messenger"].g02-profile-open button.msg-swarm13-scrim {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 1255 !important;
  background: rgba(8, 12, 24, 0.34) !important;
  cursor: pointer !important;
  overflow: visible !important;
}

/* Closing mid-state: never leave PE-auto capture */
html[data-vy-svcfix1="20260805-svcfix1"] body[data-page="messenger"].g02-profile-closing .msg-swarm13-scrim,
html[data-vy-svcfix1="20260805-svcfix1"] body[data-page="messenger"].g02-profile-closing button.msg-swarm13-scrim {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

/* ── 2) Product launcher: kill blue ghost ::after ring / offset box ───────── */
html[data-vy-svcfix1="20260805-svcfix1"] .vy-product-launcher::before,
html[data-vy-svcfix1="20260805-svcfix1"] .vy-product-launcher::after {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: none !important;
  width: 0 !important;
  height: 0 !important;
  inset: auto !important;
  pointer-events: none !important;
  transform: none !important;
  animation: none !important;
}

html[data-vy-svcfix1="20260805-svcfix1"] .vy-product-launcher {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12) !important;
  overflow: hidden !important; /* clip mark glow so it cannot read as offset blue rect */
  isolation: isolate;
}
html[data-vy-svcfix1="20260805-svcfix1"] .vy-product-launcher__mark {
  box-shadow: 0 2px 8px rgba(15, 47, 104, 0.14) !important;
  filter: none !important;
}
html[data-vy-svcfix1="20260805-svcfix1"] .vy-product-launcher:hover,
html[data-vy-svcfix1="20260805-svcfix1"] .vy-product-launcher[aria-expanded="true"] {
  transform: none !important; /* no translateY that leaves a ghost footprint */
}

/* ── 3) Closed switcher: never full-bleed / never invisible capture layer ─── */
html[data-vy-svcfix1="20260805-svcfix1"] .vy-product-switcher:not([data-open="true"]):not(.is-open) {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  max-width: fit-content !important;
  max-height: fit-content !important;
  width: fit-content !important;
  height: fit-content !important;
  overflow: visible !important;
  /* Keep FAB tappable on Voice/LK; Messenger chrome-burger stays PE-none via W3 */
}
html[data-vy-svcfix1="20260805-svcfix1"] .vy-product-switcher:not([data-open="true"]):not(.is-open) > .vy-product-panel,
html[data-vy-svcfix1="20260805-svcfix1"] .vy-product-panel[hidden],
html[data-vy-svcfix1="20260805-svcfix1"] body:not(.vy-product-panel-open) > .vy-product-panel[hidden],
html[data-vy-svcfix1="20260805-svcfix1"] body:not(.vy-product-panel-open) > .vy-product-panel[data-vy-portaled="1"][hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  inset: auto !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  z-index: -1 !important;
  overflow: hidden !important;
}

/* Messenger chrome-burger closed: reinforce W3 zero geometry */
html[data-vy-svcfix1="20260805-svcfix1"] body[data-page="messenger"] > .vy-product-switcher.vy-product-switcher--chrome-burger:not([data-open="true"]):not(.is-open) {
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  z-index: 35 !important;
  opacity: 1; /* root can stay; children clipped */
}
html[data-vy-svcfix1="20260805-svcfix1"] body[data-page="messenger"] > .vy-product-switcher.vy-product-switcher--chrome-burger:not([data-open="true"]):not(.is-open) > .vy-product-launcher {
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  clip: rect(0, 0, 0, 0) !important;
  overflow: hidden !important;
}

/* Open: panel clickable; root itself must not paint a ghost fullscreen layer */
html[data-vy-svcfix1="20260805-svcfix1"] body.vy-product-panel-open > .vy-product-switcher.is-open,
html[data-vy-svcfix1="20260805-svcfix1"] body.vy-product-panel-open > .vy-product-switcher[data-open="true"] {
  background: transparent !important;
  box-shadow: none !important;
}
