The source code for the GTK+ themes is located in the https://git.gnome.org/browse/gnome-themes-standard/ git repository. The styling for the different widgets for Adwaita is located in the themes/Adwaita/gtk-3.0/gtk-widgets.css
file -- see the section starting:
/***************
* Header bars *
***************/
Specifically:
.header-bar { ... }
.header-bar:backdrop { ... }
.header-bar .button.text-button { ... }
.header-bar .button.image-button { ... }