/* UI layer hardening: preserve floating menus without covering the iframe with
   empty click-catching elements. These rules do not control Twitch playback. */

/* Keep the master control surface in its own stable strip, rather than
   expanding a hover-reactive layer over the video on every pointer movement. */
#vw-overlay .vw-viewers-panel { padding-bottom: 68px; }
#vw-overlay .vw-player-grid { min-height: 0; }
#vw-overlay .vw-controls {
  bottom: 0;
  background: #18181b;
  border: 1px solid #303039;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 9px 14px;
  box-shadow: none;
  transition: none;
  pointer-events: auto;
}
/* Do not let hovering anywhere across the video reveal or resize the controls. */
#vw-overlay .vw-viewers-panel:hover .vw-controls,
#vw-overlay .vw-controls:hover {
  background: #18181b;
  border: 1px solid #303039;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 9px 14px;
  box-shadow: none;
  transform: translateX(-50%);
}
#vw-overlay .vw-controls .vw-controls-inner,
#vw-overlay .vw-viewers-panel:hover .vw-controls .vw-controls-inner {
  max-height: 100px;
  opacity: 1;
  overflow: visible;
  margin-top: 5px;
  transition: none;
}
#vw-overlay .vw-controls .vw-timeline-wrap,
#vw-overlay .vw-viewers-panel:hover .vw-controls .vw-timeline-wrap {
  height: 20px;
  transition: none;
}
/* The loading label must never turn into an invisible interaction shield. */
#vw-overlay .vw-player-loading { pointer-events: none; }
#vw-overlay .vw-player-mount-wrap { isolation: isolate; }
#vw-overlay .vw-player-mount { z-index: 0; }

/* Search backdrop is intentionally click-through. The search panel itself
   remains visually over the player and receives events normally. Its Close
   button and Escape key remain available to dismiss it. */
#vw-overlay #vw-search-backdrop,
#vw-overlay #vw-search-backdrop:not([hidden]) { pointer-events: none; }
#vw-overlay .vw-floating-search-panel:not([hidden]) { pointer-events: auto; }

/* The landing-page dialogs have their own interactive modal surface, but the
   area outside is not a fullscreen hit target once a multiview is mounted. */
body:has(#vw-overlay.vw-open) #site-add-overlay,
body:has(#vw-overlay.vw-open) #site-settings-overlay { pointer-events: none; background: transparent; }
body:has(#vw-overlay.vw-open) .site-modal { pointer-events: auto; }

/* Keep chat, diagnostics, and menus clickable, while leaving the video iframe
   itself fully interactive outside the actual visible panels. */
#vw-overlay .vw-floating-chat-header,
#vw-overlay .vw-topbar,
#vw-diagnostic-toggle,
#vw-diagnostic-panel { pointer-events: auto; }
