@function non-destructive-map-merge($parent-map, $child-map) {
  $result: $parent-map;
  @each $key, $value in $child-map {
    @if (not map-has-key($result, $key)) or (type-of(map-get($result, $key)) != type-of($value)) or (not (type-of(map-get($result, $key)) == map and type-of($value) == map)) {
      $result: map-merge($result, ($key: $value));
    }
    @else {
      $result: map-merge($result, ($key: non-destructive-map-merge(map-get($result, $key), $value)));
    }
  }
  @return $result;
}