.chart-labels {
  color: var(--color-text-lightest);
  font-size: 1em;
  margin-bottom: 1.5em;
  text-align: center;
}

.chart-labels label {
  cursor: pointer;
  padding-left: .5em;
}

.chart-labels label.selected,
.chart-labels label:hover {
  color: var(--color-text-lighter);
}

.chart-labels label + label {
  border-left: 1px solid var(--color-text-lighter);
}

.chart-mode input {
  display: none;
}

.chart-mode label {
  background-color: var(--color-background-darker);
  color: var(--color-text);
  margin-right: 0;
}

.chart-mode label:hover {
  color: var(--color-background);
}

.chart-mode input:checked + label {
  background-color: var(--color-header);
  color: var(--color-background);
}

.toggle-chart {
  height: 22px;
  margin: 0;
  padding: 2px 6px;
}

.toggle-chart span {
  border: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 13px solid var(--color-background);
  display: block;
}

.hide-charts .toggle-chart span {
  border: 0;
  border-bottom: 13px solid var(--color-background);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
}

.hide-charts .chart-container,
.hide-charts .chart-legend,
.hide-charts .chart-currency,
.hide-charts .chart-mode,
.hide-charts .chart-labels {
  display: none;
}

.chart-container {
  min-height: 100px;
  position: relative;
}

.chart-legend {
  flex-grow: 1;
}

.chart-legend .color {
  border-radius: 10px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.chart-legend .name {
  margin: 0 6px 0 3px;
}

.loading {
  color: var(--color-text-lightest);
  font-style: italic;
  padding-top: 30px;
  text-align: center;
}

svg text {
  fill: var(--color-text-lightest);
}

svg .line {
  fill: none;
  stroke-width: 2px;
}

svg .axis path,
svg .axis line {
  fill: none;
  shape-rendering: crispEdges;
  stroke: var(--color-chart-axis);
}

svg .axis.y line {
  stroke: var(--color-chart-axis);
  stroke-dasharray: 2, 2;
}

svg .voronoi {
  fill: none;
  pointer-events: all;
}

.treemap {
  shape-rendering: crispEdges;
}

.treemap rect {
  stroke: var(--color-treemap-text);
  stroke-width: 2px;
}

.treemap text {
  cursor: pointer;
}

.sunburst .account {
  fill: var(--color-text);
}

.sunburst .balance {
  font-family: var(--font-family-monospaced);
}

.sunburst path {
  cursor: pointer;
}

.barchart .group:hover .group-box {
  opacity: .1;
}

.barchart .axis-group-box {
  cursor: pointer;
  opacity: 0;
}

.barchart .group-box {
  opacity: 0;
}

.barchart .budget {
  opacity: .3;
}

.tooltip {
  background: var(--color-background);
  border: 1px solid var(--color-background-darkest);
  box-shadow: 0 0 5px var(--color-background-darker);
  font-family: var(--font-family-monospaced);
  min-width: 5em;
  opacity: 0;
  padding: .5em;
  pointer-events: none;
  position: absolute;
  text-align: center;
  transform: translate(-50%, -100%);
  z-index: var(--z-index-floating-ui);
}

.tooltip::before {
  border: 15px solid transparent;
  border-top-color: var(--color-background-darkest);
  content: '';
  height: 0;
  left: 50%;
  margin-left: -15px;
  position: absolute;
  top: 100%;
  width: 0;
}

.tooltip em {
  color: var(--color-text-lightest);
  display: block;
  font-family: var(--font-family);
  margin-top: 5px;
}
