xpi/content/css/appbutton2.css
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

@-moz-document url(chrome://browser/content/browser.xul) {

	toolbar #ctraddon_appbutton,
	#main-window:not([tabsintitlebar]) #ctraddon_appbutton2,
	#main-window[customizing][sizemode="maximized"] #ctraddon_appbutton2	{
	  visibility: collapse !important;
	}
	
	window:not([chromehidden~="toolbar"]) #ctraddon_appbutton2 {
	  visibility: visible !important;
	}
	
	#main-window[tabsintitlebar][sizemode="maximized"]:not([tabsontop="false"]) #TabsToolbar {
	  -moz-padding-start: 2px !important;
	}

	/* style appbutton*/
	#ctraddon_appbutton2{
	  -moz-appearance:none !important;
	  background-clip: padding-box !important;
	  border-radius: 0 0 4px 4px;
	  color: white !important;
	  text-shadow: 0 0 1px rgba(0,0,0,.7),
				   0 1px 1.5px rgba(0,0,0,.5) !important;
	  font-weight: bold;
	  padding: 0 1.4em .05em !important;
	  border-top: none !important;
	  border-right: 2px solid !important;
	  border-left: 2px solid !important;
	  border-bottom: 2px solid !important;
	  -moz-border-right-colors: rgba(255,255,255,.60) hsla(214,89%,21%,.5) !important;
	  -moz-border-left-colors: rgba(255,255,255,.60) hsla(214,89%,21%,.5) !important;
	  -moz-border-bottom-colors: rgba(255,255,255,.70) hsla(214,89%,21%,.5) !important;
	}

	#ctraddon_appbutton2 #ctraddon_appbuttonPopup{
	  margin-top:-1px;
	  -moz-margin-start:0px;
	}
	
	#ctraddon_appbutton2:hover:active,
	#ctraddon_appbutton2[open] {
	  border-radius:0 0 0 0;
	}

	/* restore hidden titlebar and move it behind tabs toolbar for 
	   'tabsintitlebar=false' */

	@media all and (-moz-windows-theme:aero) {

		@media all and (-moz-windows-compositor) {
			
			#main-window[sizemode="normal"] #ctraddon_appbutton2{
			  margin-top:1px !important;
			  margin: 1px 0 2px 0px !important;
			}
			
			#main-window[sizemode="maximized"] #ctraddon_appbutton2{
			  margin-top:0px !important;
			  margin: 0px 0 2px 0px !important;
			}
			
			#main-window[sizemode="normal"] > #titlebar:-moz-lwtheme #ctraddon_appbutton2{
			  margin-top:1px !important;
			  margin: 1px 0 -1px 1px !important;
			}
			
		}
		
		@media not all and (-moz-windows-compositor) {
			#main-window[tabsintitlebar][sizemode="normal"]  #ctraddon_appbutton2{
			  margin-top:0px !important;
			  margin: 0px 0 4px 1px !important;
			}
			#main-window[tabsintitlebar][sizemode="maximized"]  #ctraddon_appbutton2{
			  margin-top:-1px !important;
			  margin: 0px 0 2px 0px !important;
			}
			#main-window[sizemode="normal"] > #titlebar:-moz-lwtheme #ctraddon_appbutton2{
			  margin-top:1px !important;
			  margin: -1px 0 4px 1px !important;
			}
		}
		
	}

	@media all and (-moz-windows-classic) {

		#ctraddon_appbutton2{
		  margin-top:0px !important;
		  margin: 0px 0 1px 0px !important;
		}
		
		#main-window[tabsintitlebar][sizemode="normal"]:-moz-lwtheme #ctraddon_appbutton2{
		  margin-bottom: 0px !important;
		}

	}
	
	@media all and (-moz-windows-theme: luna-blue){

		#main-window[tabsintitlebar][sizemode="normal"]  #ctraddon_appbutton2{
		  margin-top:0px !important;
		  margin: 0px 0 10px 1px !important;
		}
		
		#main-window[tabsintitlebar][sizemode="maximized"]   #ctraddon_appbutton2{
		  margin-top:-1px !important;
		  margin: -1px 0 8px 0px !important;
		}
	}
	
	@media all and (-moz-windows-theme: luna-silver){
	
		#main-window[tabsintitlebar][sizemode="normal"]  #ctraddon_appbutton2{
		  margin-top:0px !important;
		  margin: 0px 0 10px 1px !important;
		}
		
		#main-window[tabsintitlebar][sizemode="maximized"]   #ctraddon_appbutton2{
		  margin-top:-1px !important;
		  margin: -1px 0 8px 0px !important;
		}
	}
	
	@media all and (-moz-windows-theme: luna-olive){

		#main-window[tabsintitlebar][sizemode="normal"]  #ctraddon_appbutton2{
		  margin-top:0px !important;
		  margin: 0px 0 10px 1px !important;
		}
		
		#main-window[tabsintitlebar][sizemode="maximized"]   #ctraddon_appbutton2{
		  margin-top:-1px !important;
		  margin: -1px 0 8px 0px !important;
		}
	}
	
	@media all and (-moz-windows-theme: royale){
		#main-window:not([tabsintitlebar])[sizemode="normal"] #titlebar,
		#main-window:not([tabsintitlebar])[sizemode="maximized"] #titlebar{
		  display: block !important;
		  margin-bottom:-12px !important;
		  -moz-appearance:none !important;
		}
	
		#main-window[tabsintitlebar][sizemode="normal"]  #ctraddon_appbutton2{
		  margin-top:0px !important;
		  margin: 0px 0 13px 1px !important;
		}
		
		#main-window[tabsintitlebar][sizemode="maximized"]   #ctraddon_appbutton2{
		  margin-top:-1px !important;
		  margin: -1px 0 8px 0px !important;
		}
	}
	
	@media all and (-moz-windows-theme: zune){
		#main-window[tabsintitlebar][sizemode="normal"]  #ctraddon_appbutton2{
		  margin-top:0px !important;
		  margin: 0px 0 13px 1px !important;
		}
		
		#main-window[tabsintitlebar][sizemode="maximized"]   #ctraddon_appbutton2{
		  margin-top:-1px !important;
		  margin: -1px 0 8px 0px !important;
		}
	}
	
	/* trigger non-default themes on Win7/8, but exclude Windows Classic theme*/
	@media not all and (-moz-windows-classic) {
	  @media not all and (-moz-os-version: windows-xp){
		@media not all and (-moz-windows-default-theme) {
			#main-window[sizemode="normal"] #titlebar #titlebar-content #ctraddon_appbutton2{
			  margin: 0px 0 5px 0px !important;
			}
			#main-window[sizemode="maximized"] #titlebar #titlebar-content #ctraddon_appbutton2{
			  margin: -2px 0 1px -1px !important;
			}
		}
	  }
	}

	/* Windows 8 tweaks */
	@media (-moz-os-version: windows-win8) {
	  #main-window[sizemode="normal"] #ctraddon_appbutton2{
		margin-top:0px !important;
		margin: 0 0 0 0 !important;
	  }
				
	  #main-window[sizemode="maximized"] #ctraddon_appbutton2{
		margin-top:-1px !important;
		margin: -1px 0 0px 0px !important;
	  }
	  
	  #main-window[sizemode="maximized"] #ctraddon_appbutton2{
		margin-top:0px !important;
		margin: 0px 0 -3px -2px !important;
	  }
	}

	/* Windows 10 tweaks */
	@media (-moz-os-version: windows-win10) {
	 @media (-moz-windows-default-theme) {
	  #main-window[sizemode="normal"] #ctraddon_appbutton2{
		margin-top:0px !important;
		margin: 0 0 2px 0 !important;
	  }
				
	  #main-window[sizemode="maximized"] #ctraddon_appbutton2{
		margin-top:0px !important;
		margin: 0px 0 6px 0px !important;
	  }
	  
	  #main-window[sizemode="maximized"] #ctraddon_appbutton2{
		margin-top:-1px !important;
		margin: -1px 0 6px -2px !important;
	  }
	  #main-window[fx47plus="true"][sizemode="maximized"] #ctraddon_appbutton2{
		margin-top:-2px !important;
		margin: -2px 0 5px -2px !important;
	  }
	  
	  #main-window[tabsintitlebar][chromehidden~="menubar"][sizemode="normal"]:not([inFullscreen])[tabsontop="false"] #toolbar-menubar ~ #TabsToolbar,
	  #main-window[tabsintitlebar][sizemode="normal"]:not([inFullscreen])[tabsontop="false"] #toolbar-menubar[autohide="true"][inactive] ~ #TabsToolbar,
	  #main-window[tabsintitlebar][sizemode="normal"]:not([inFullscreen]) #toolbar-menubar[autohide="true"][inactive="true"]:not([customizing="true"]) ~ #TabsToolbar {
		padding-top: 2px !important;
	  }

	  #main-window[sizemode="normal"]:not([inFullscreen]) #titlebar-buttonbox toolbarbutton image {
		margin-bottom: -4px !important;
	  }
	  #main-window[sizemode="normal"]:not([inFullscreen]) #titlebar-buttonbox toolbarbutton {
		padding-top: 8px !important;
		padding-bottom: 8px !important;
	  }
	  
	  @media not all and (-moz-windows-theme:aero) {
		
		#main-window[sizemode="normal"] #titlebar #titlebar-content #ctraddon_appbutton2{
		  margin-top:0px !important;
		  margin: 0px 0 1px 0px !important;
		}
		
		#main-window[sizemode="maximized"] #titlebar #titlebar-content #ctraddon_appbutton2{
		  margin-top:-1px !important;
		  margin: -1px 0 6px -2px !important;
		}
			
		#main-window[tabsintitlebar][chromehidden~="menubar"][sizemode="normal"]:not([inFullscreen])[tabsontop="false"] #toolbar-menubar ~ #TabsToolbar,
		#main-window[tabsintitlebar][sizemode="normal"]:not([inFullscreen])[tabsontop="false"] #toolbar-menubar[autohide="true"][inactive] ~ #TabsToolbar,
		#main-window[tabsintitlebar][sizemode="normal"]:not([inFullscreen]) #toolbar-menubar[autohide="true"][inactive="true"]:not([customizing="true"]) ~ #TabsToolbar {
		  padding-top: 9px !important;
		}

	  }
	  
	  /*tweak tabs title in Firefox titlebar positiom*/
	  #main-window[sizemode="maximized"] #ctraddon_titlebartitle {
		margin-top: -10px !important;
	  }
	 }
	 
	 /* adjust stuff for third party OS themes */
	 @media not all and (-moz-windows-default-theme) {
			
		#main-window[sizemode="normal"] #titlebar #titlebar-content #ctraddon_appbutton2{
		  margin: 0px 0 10px 0px !important;
		}
		#main-window[sizemode="maximized"] #titlebar #titlebar-content #ctraddon_appbutton2{
		  margin: -2px 0 6px -1px !important;
		}
		
		#main-window[tabsintitlebar][chromehidden~="menubar"][sizemode="normal"]:not([inFullscreen])[tabsontop="false"] #toolbar-menubar ~ #TabsToolbar,
		#main-window[tabsintitlebar][sizemode="normal"]:not([inFullscreen])[tabsontop="false"] #toolbar-menubar[autohide="true"][inactive] ~ #TabsToolbar,
		#main-window[tabsintitlebar][sizemode="normal"]:not([inFullscreen]) #toolbar-menubar[autohide="true"][inactive="true"]:not([customizing="true"]) ~ #TabsToolbar {
		  padding-top: 10px !important;
		}

	 }
	 
	}
	
	/*developer theme additions */
	#main-window[sizemode="maximized"][developertheme="true"] #TabsToolbar,
	#main-window[sizemode="maximized"][developertheme="true"] #tabbrowser-tabs,
	#main-window[sizemode="maximized"][developertheme="true"] #browser-panel {
	  background: unset !important;
	}
	
	#main-window[sizemode="maximized"][developertheme="true"][lwthemetextcolor="bright"]:not([tabsontop="false"]),
	#main-window[sizemode="maximized"][developertheme="true"][devtoolstheme="dark"]:not([tabsontop="false"]){
	  background: #1c2126 !important;
	}
	#main-window[sizemode="maximized"][developertheme="true"][lwthemetextcolor="dark"]:not([tabsontop="false"]),
	#main-window[sizemode="maximized"][developertheme="true"][devtoolstheme="light"]:not([tabsontop="false"]) {
	  background: #e3e4e6 !important;
	}
	
	@media (-moz-os-version: windows-win10) {
		#main-window[sizemode="normal"][developertheme="true"] #TabsToolbar,
		#main-window[sizemode="normal"][developertheme="true"] #tabbrowser-tabs,
		#main-window[sizemode="normal"][developertheme="true"] #browser-panel {
		  background: unset !important;
		}

		#main-window[sizemode="normal"][developertheme="true"][lwthemetextcolor="bright"]:not([tabsontop="false"]),
		#main-window[sizemode="normal"][developertheme="true"][devtoolstheme="dark"]:not([tabsontop="false"]){
		  background: #1c2126 !important;
		}
		#main-window[sizemode="normal"][developertheme="true"][lwthemetextcolor="dark"]:not([tabsontop="false"]),
		#main-window[sizemode="normal"][developertheme="true"][devtoolstheme="light"]:not([tabsontop="false"]) {
		  background: #e3e4e6 !important;
		}
		
		#main-window[fx57plus="true"] #titlebar #titlebar-content #titlebar-buttonbox-container #titlebar-buttonbox {
		  height: unset !important;
		}
		
	}

}