.tooltip {
  background-color: var(--theme-card-color);
  border: 1px solid var(--theme-border-color);
  border-radius: 4px;
}

.tooltipTitle {
  font: var(--font-p2);
  font-weight: 600;
  padding: 8px;
  color: var(--theme-primary-color);
  background: var(--theme-body-color);
  text-align: center;
  margin: 4px 4px 0;
  border-radius: 4px;
}

.tooltipItems {
  margin: 16px;
}

.tooltipItem {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.tooltipName {
  font: var(--font-sm);
  font-weight: 600;
  color: var(--theme-secondary-color);
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  padding-right: 16px;

  &::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: var(--dot-color, var(--theme-primary-color));
    border-radius: 50%;
    margin-right: 8px;
  }
}

.tooltipValue {
  font: var(--font-p2);
  font-weight: 600;
  color: var(--theme-primary-color);
  margin: 0;
  text-align: right;
  margin-left: auto;
}

.legend {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px 24px;
  margin-top: 16px;
  overflow-y: auto;

  @media (max-width: 768px) {
    justify-content: flex-start;
  }
}

.legendItem {
  font: var(--font-sm);
  font-weight: 600;
  background: var(--theme-body-color);
  color: var(--theme-secondary-color);
  border-radius: 4px;
  padding: 8px 12px;
  position: relative;
  display: flex;
  align-items: center;
  white-space: nowrap;

  &::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: var(--dot-color, var(--theme-primary-color));
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
  }
}
