/* SiteCORE - Gauge Unification Layer
   One dial per container. Neutral track. Single fill arc.
   Defensive overrides for layered enhance scripts. */

/* Kill duplicate SVGs in any gauge wrapper */
.score-ring-lg > svg ~ svg,
.score-ring-sm > svg ~ svg,
.gauge-visual > svg ~ svg,
.dash-hero .score-ring-sm > svg ~ svg,
.health-widget .score-ring-lg > svg ~ svg,
.health-widget .score-ring-sm > svg ~ svg {
  display: none !important;
}

/* Suppress sibling duplicate ring containers */
.score-ring-lg + .score-ring-lg,
.score-ring-sm + .score-ring-sm,
.health-widget .score-ring-lg ~ .score-ring-lg,
.dash-hero .score-ring-sm ~ .score-ring-sm,
.gauge-visual + .gauge-visual {
  display: none !important;
}

/* Track ring: neutral, no color zones bleeding through */
.score-ring-bg {
  fill: none !important;
  stroke: rgba(255, 255, 255, 0.08) !important;
  stroke-width: 8 !important;
}
[data-theme="light"] .score-ring-bg,
body.light-theme .score-ring-bg {
  stroke: rgba(0, 0, 0, 0.08) !important;
}

/* Fill ring: clean single stroke, rounded cap, rotated to 12 o'clock */
.score-ring-fill {
  fill: none !important;
  stroke-width: 8 !important;
  stroke-linecap: round !important;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              stroke 0.3s ease !important;
}

/* Kill conic-gradient / pseudo backdrops that draw a second ring */
.score-ring-lg::before, .score-ring-lg::after,
.score-ring-sm::before, .score-ring-sm::after,
.gauge-visual::before, .gauge-visual::after,
.health-widget::before, .health-widget::after,
.dash-hero .score-ring-sm::before,
.dash-hero .score-ring-sm::after {
  background: none !important;
  background-image: none !important;
  border-image: none !important;
  box-shadow: none !important;
  content: none !important;
}

/* health-ring (small 40px badges in tables): single border */
.health-ring::before {
  border-width: 2.5px !important;
}
.health-ring > .health-ring-inner ~ * {
  display: none !important;
}

/* Defensive: isolate stacking context so absolute children stack cleanly */
.score-ring-lg, .score-ring-sm, .gauge-visual {
  position: relative;
  isolation: isolate;
}

/* Score-ring text always above the SVG */
.score-ring-text, .sr-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}
