@function pow($base, $exponents) {
  $raised: 1;
  @for $i from 1 through $exponents {
    $raised: $raised * $base;
  }
  @return $raised;
}
@function toRem($px) {
  $rem: $px / 16;
  @return $rem + rem ;
}

@function mapReverse($map) {
  $result: null;

  @if type-of($map) == "map" {
      $keys: map-keys($map);
      $map-reversed: ();
      
      @for $i from length($keys) through 1 {
          $map-reversed: map-merge(
              $map-reversed,
              (nth($keys, $i): map-get($map, nth($keys, $i)))
          );
      }

      @if type-of($map-reversed) == "map" {
          $result: $map-reversed;
      } @else {
          @warn 'There was an error reversing the order of "#{$map}"';
      }
  } @else {
      @warn '"#{$map}" is not a valid map';
  }

  @return $result;
}

@mixin chrome-scrollbar {
  overflow: auto;
  &::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 7px;
    height: 7px;
    background-color: transparent;
  }
  &::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: rgba($gray-600, 0.3);
  }
}
@mixin firefox-scrollbar {
  scrollbar-color: rgba($gray-600, 0.3) transparent;
  scrollbar-width: thin;
}