/* StreamCore R36 FIX8 — strongly neutralize the inner gray/black metric chips
   behind topbar values while preserving the original outer counter visual.
   Based on FIX7 behavior, with stronger selectors to beat legacy topbar theme
   rules in both Light and Dark modes. No backend/polling/data logic changes. */

/* Highest-priority neutralization for value lanes only: <b> and <small>. */
html body .xui-shell[class*="topbar-"] .xui-live-counters .top-counter > b,
html body .xui-shell[class*="topbar-"] .xui-live-counters .top-counter > small,
html body .xui-shell[class*="topbar-"] .xui-live-counters .top-counter.compact > b,
html body .xui-shell[class*="topbar-"] .xui-live-counters .top-counter.compact > small,
html body .xui-shell[class*="topbar-"] .xui-live-counters .top-counter.stream-state > b,
html body .xui-shell[class*="topbar-"] .xui-live-counters .top-counter.stream-state > small,
html body .xui-shell[class*="topbar-"] .xui-live-counters .top-counter.bandwidth-state > b,
html body .xui-shell[class*="topbar-"] .xui-live-counters .top-counter.bandwidth-state > small,
html body .theme-light.xui-shell[class*="topbar-"] .xui-live-counters .top-counter > b,
html body .theme-light.xui-shell[class*="topbar-"] .xui-live-counters .top-counter > small,
html body .theme-light.xui-shell[class*="topbar-"] .xui-live-counters .top-counter.compact > b,
html body .theme-light.xui-shell[class*="topbar-"] .xui-live-counters .top-counter.compact > small,
html body .theme-light.xui-shell[class*="topbar-"] .xui-live-counters .top-counter.stream-state > b,
html body .theme-light.xui-shell[class*="topbar-"] .xui-live-counters .top-counter.stream-state > small,
html body .theme-light.xui-shell[class*="topbar-"] .xui-live-counters .top-counter.bandwidth-state > b,
html body .theme-light.xui-shell[class*="topbar-"] .xui-live-counters .top-counter.bandwidth-state > small,
html body .xui-shell.topbar-light-grey .xui-live-counters .top-counter > b,
html body .xui-shell.topbar-light-grey .xui-live-counters .top-counter > small,
html body .xui-shell.topbar-light-grey .xui-live-counters .top-counter.compact > b,
html body .xui-shell.topbar-light-grey .xui-live-counters .top-counter.compact > small,
html body .xui-shell.topbar-light-grey .xui-live-counters .top-counter.stream-state > b,
html body .xui-shell.topbar-light-grey .xui-live-counters .top-counter.stream-state > small,
html body .xui-shell.topbar-light-grey .xui-live-counters .top-counter.bandwidth-state > b,
html body .xui-shell.topbar-light-grey .xui-live-counters .top-counter.bandwidth-state > small,
html body .xui-shell:not(.theme-light)[class*="topbar-"] .xui-live-counters .top-counter > b,
html body .xui-shell:not(.theme-light)[class*="topbar-"] .xui-live-counters .top-counter > small,
html body .xui-shell:not(.theme-light)[class*="topbar-"] .xui-live-counters .top-counter.compact > b,
html body .xui-shell:not(.theme-light)[class*="topbar-"] .xui-live-counters .top-counter.compact > small,
html body .xui-shell:not(.theme-light)[class*="topbar-"] .xui-live-counters .top-counter.stream-state > b,
html body .xui-shell:not(.theme-light)[class*="topbar-"] .xui-live-counters .top-counter.stream-state > small,
html body .xui-shell:not(.theme-light)[class*="topbar-"] .xui-live-counters .top-counter.bandwidth-state > b,
html body .xui-shell:not(.theme-light)[class*="topbar-"] .xui-live-counters .top-counter.bandwidth-state > small {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  outline: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  text-decoration: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  font-variant-numeric: tabular-nums lining-nums !important;
}

/* Explicitly kill legacy generated inner slabs on pseudo-elements. */
html body .xui-shell[class*="topbar-"] .xui-live-counters .top-counter > b::before,
html body .xui-shell[class*="topbar-"] .xui-live-counters .top-counter > b::after,
html body .xui-shell[class*="topbar-"] .xui-live-counters .top-counter > small::before,
html body .xui-shell[class*="topbar-"] .xui-live-counters .top-counter > small::after,
html body .theme-light.xui-shell[class*="topbar-"] .xui-live-counters .top-counter > b::before,
html body .theme-light.xui-shell[class*="topbar-"] .xui-live-counters .top-counter > b::after,
html body .theme-light.xui-shell[class*="topbar-"] .xui-live-counters .top-counter > small::before,
html body .theme-light.xui-shell[class*="topbar-"] .xui-live-counters .top-counter > small::after,
html body .xui-shell.topbar-light-grey .xui-live-counters .top-counter > b::before,
html body .xui-shell.topbar-light-grey .xui-live-counters .top-counter > b::after,
html body .xui-shell.topbar-light-grey .xui-live-counters .top-counter > small::before,
html body .xui-shell.topbar-light-grey .xui-live-counters .top-counter > small::after {
  content: none !important;
  display: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Keep older fluid overlay contracts inert. */
.xui-shell [data-sc-fluid-value="1"],
.xui-shell [data-sc-fluid-text] {
  color: inherit !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  min-width: 0 !important;
  contain: none !important;
}
.xui-shell [data-sc-fluid-value="1"]::before,
.xui-shell [data-sc-fluid-value="1"]::after,
.xui-shell [data-sc-fluid-text]::before,
.xui-shell [data-sc-fluid-text]::after {
  content: none !important;
  display: none !important;
}

/* Preserve approved fluid digits on dashboard-level metrics. */
html.sc-dashboard-route #sc-bandwidth-in,
html.sc-dashboard-route #sc-bandwidth-out,
html.sc-dashboard-route .server-bottom-metrics b {
  font-variant-numeric: tabular-nums lining-nums !important;
}
html.sc-dashboard-route .resource-track > i {
  transition: width 260ms cubic-bezier(.2,.72,.3,1) !important;
}

@media (prefers-reduced-motion: reduce) {
  html.sc-dashboard-route .resource-track > i { transition-duration: 0ms !important; }
}

/* FIX19: spacing of Live/Net lanes only; preserve FIX8 neutralization and metrics. */
html body .xui-shell[class*="topbar-"] .xui-live-counters .top-counter:is(.stream-state,.bandwidth-state) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center;
  gap: 10px !important;
  white-space: nowrap !important;
  flex-shrink: 0;
}
html body .xui-shell[class*="topbar-"] .xui-live-counters .top-counter:is(.stream-state,.bandwidth-state) > :is(b,small,.sc-top-counter-label) {
  display: inline-flex !important;
  align-items: center;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}
