#nre-charts .chart_ops,
.nrecharts-block .chart_ops {
  height:2em;
}

#nre-charts #crime.dc-chart g.row text {
  fill:unset;
}

#nre-charts #race.dc-chart .pie-slice,
#nre-charts #gender.dc-chart .pie-slice,
#nre-charts #crime.dc-chart .pie-slice {
  fill:unset;
  font-size: 0.8em;
}

#nre-charts #race .dc-legend-item text,
#nre-charts #gender .dc-legend-item text,
#nre-charts #crime .dc-legend-item text {
  dominant-baseline: middle;
}

#nre-charts,
.nrecharts-block {
  font-family: "Avenir",-apple-system,"Segoe UI",Roboto,Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
}

#nre-charts .dc-legend text,
.nrecharts-block .dc-legend text {
  font-size: 1.5em !important;
}

#nre-charts #crimeState .dc-legend .dc-legend-item {
  cursor: default !important;
}

#nre-charts #crimeState .states {
  cursor: pointer !important;
}

#nre-charts .grayed-out,
.nrecharts-block .grayed-out {
    opacity: 0.2;
  }

/* Simple styling for toggle switch */
#nre-charts .switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

#nre-charts .switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

#nre-charts .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

#nre-charts .slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

#nre-charts input:checked + .slider {
  background-color: #2196F3;
}

#nre-charts input:checked + .slider:before {
  transform: translateX(26px);
}

#nre-charts .slider.round {
  border-radius: 34px;
}

#nre-charts .slider.round:before {
  border-radius: 50%;
}

#nre-charts .muted {
  opacity: 0.2;
  filter: grayscale(100%);
  transition: opacity 0.2s ease;
}

.tooltip-inner {
  max-width: 500px !important; /* default is 200px */
  white-space: normal; /* allow text to wrap */
  text-align: left;
}

#nre-charts #crimeState {
  margin-top: var(--crimeState-margin, 0px);
  margin-bottom: 0.5rem; /* reduce bottom spacing */
  transition: margin-top 0.3s ease;
}

#nre-charts #crimeState .dc-legend {
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

#nre-charts .custom-legend {
  gap: 6px;
}

#nre-charts .legend-item {
  padding: 4px 8px;
  color: white;
  font-size: 0.8rem;
  border-radius: 3px;
  white-space: nowrap;
}

#nre-charts .legend-caption {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.25rem;
  text-align: center;
  width: 100%;
}

#nre-charts #race .dc-legend .dc-legend-item,
#nre-charts #gender .dc-legend .dc-legend-item,
#nre-charts #crime .dc-legend .dc-legend-item {
  font-size: 10px;
}

#nre-charts #datacount-map {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 1rem 0;
  text-align: center;
  color: #333;
}

#nre-charts .label i.bi {
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}
