01 - Preheat your oven to 375°F (190°C). Lightly grease a 9x13-inch baking dish.
02 - Cook the elbow macaroni in a large pot of generously salted boiling water until it reaches an al dente consistency. Drain the pasta thoroughly and set aside.
03 - In a medium saucepan, melt the butter over medium heat. Whisk in the all-purpose flour and cook for 1 minute, stirring constantly.
04 - Gradually whisk in the whole milk and heavy cream. Continue to cook and stir until the sauce thickens, approximately 3-4 minutes.
05 - Remove the saucepan from the heat. Stir in the shredded cheddar and mozzarella cheeses, garlic powder, onion powder, black pepper, and salt until the mixture is smooth and well combined.
06 - Gently fold the cooked macaroni, finely chopped dill pickles, and pickle brine into the cheese sauce. Ensure all components are evenly distributed.
07 - Pour the macaroni and cheese mixture into the prepared baking dish, spreading it evenly.
08 - In a small bowl, combine the panko breadcrumbs, melted butter, grated Parmesan cheese, and optional fresh dill. Sprinkle this mixture uniformly over the top of the casserole.
09 - Bake for 20-25 minutes, or until the topping is golden brown and the casserole is bubbling. Allow the dish to rest for 10 minutes before serving to allow the flavors to meld.