legacy/fx91-100/css/appbutton/appbutton_in_titlebar_icon_only.css
/* Firefox userChrome.css tweaks ********************************************************/
/* Github: https://github.com/aris-t2/customcssforfx ************************************/
/****************************************************************************************/


/************************************************/
/* cheat main menu button into title bar ********/
/************************************************/


/* tabs toolbar adjustments */
#main-window[tabsintitlebar] #toolbar-menubar {
  margin-inline-start: 43px !important;
}
#main-window[tabsintitlebar][sizemode="maximized"] #toolbar-menubar {
  margin-inline-start: 41px !important;
}
#main-window[uidensity=compact][tabsintitlebar] #toolbar-menubar {
  margin-inline-start: 40px !important;
}
#main-window[uidensity=compact][tabsintitlebar][sizemode="maximized"] #toolbar-menubar {
  margin-inline-start: 39px !important;
}
#main-window[uidensity=touch][tabsintitlebar] #toolbar-menubar {
  margin-inline-start: 48px !important;
}
#main-window[uidensity=touch][tabsintitlebar][sizemode="maximized"] #toolbar-menubar {
  margin-inline-start: 47px !important;
}

/* tabs toolbar adjustments */
#main-window[tabsintitlebar] #toolbar-menubar[autohide="true"][inactive="true"] ~ #TabsToolbar{
  padding-inline-start: 43px !important;
}
#main-window[tabsintitlebar][sizemode="maximized"] #toolbar-menubar[autohide="true"][inactive="true"] ~ #TabsToolbar{
  padding-inline-start: 41px !important;
}
#main-window[uidensity=compact][tabsintitlebar] #toolbar-menubar[autohide="true"][inactive="true"] ~ #TabsToolbar{
  padding-inline-start: 40px !important;
}
#main-window[uidensity=compact][tabsintitlebar][sizemode="maximized"] #toolbar-menubar[autohide="true"][inactive="true"] ~ #TabsToolbar{
  padding-inline-start: 39px !important;
}
#main-window[uidensity=touch][tabsintitlebar] #toolbar-menubar[autohide="true"][inactive="true"] ~ #TabsToolbar{
  padding-inline-start: 48px !important;
}
#main-window[uidensity=touch][tabsintitlebar][sizemode="maximized"] #toolbar-menubar[autohide="true"][inactive="true"] ~ #TabsToolbar{
  padding-inline-start: 47px !important;
}

#main-window[tabsintitlebar][sizemode="fullscreen"] #TabsToolbar {
 padding-inline-start: 43px !important;
}

#main-window[tabsintitlebar] #toolbar-menubar[autohide="true"]:not([inactive="true"]) ~ #TabsToolbar,
#main-window[tabsintitlebar] #toolbar-menubar[autohide="false"] ~ #TabsToolbar{
  margin-top: 4px !important;
}

/* appbutton */
#main-window[tabsintitlebar] #PanelUI-button {
  appearance: none !important;
  -moz-box-ordinal-group: 0 !important;
  position: fixed !important;
  display: flex !important;
  height: 22px !important;
  margin: 0 !important;
  margin-inline-start: 0px !important;
  border: unset !important;
  box-shadow: unset !important;
  padding-left: 0px !important;
  padding-right: 0px !important;
}

#main-window[tabsintitlebar][sizemode="normal"] #PanelUI-button {
  top: 0px !important;
}

#main-window[tabsintitlebar][sizemode="maximized"] #PanelUI-button {
  top: 8px !important;
}

@media (min-resolution: 110dpi) {
	#main-window[tabsintitlebar][sizemode="maximized"] #PanelUI-button {
	  top: 6px !important;
	}
}

@media (min-resolution: 120dpi) {
	#main-window[tabsintitlebar][sizemode="maximized"] #PanelUI-button {
	  top: 5px !important;
	}
}

@media (min-resolution: 140dpi) {
	#main-window[tabsintitlebar][sizemode="normal"] #PanelUI-button {
	  top: 0px !important;
	}
	#main-window[tabsintitlebar][sizemode="maximized"] #PanelUI-button {
	  top: 4px !important;
	}
}

@media (min-resolution: 160dpi) {
	#main-window[tabsintitlebar][sizemode="maximized"] #PanelUI-button {
	  top: 2px !important;
	}
}

@media (-moz-windows-classic) {
	#main-window[tabsintitlebar][sizemode="maximized"] #PanelUI-button {
	  top: 2px !important;
	}
}

/* code for Unix (macOS/Linux) */
@media (not (-moz-os-version: windows-win10)) and (not (-moz-os-version: windows-win8)) and (not (-moz-os-version: windows-win7)) {
	#main-window[tabsintitlebar][sizemode="maximized"] #PanelUI-button {
	  top: 0px !important;
	}  
}

@media not (-moz-platform: windows) {
	#main-window[tabsintitlebar][sizemode="maximized"] #PanelUI-button {
	  top: 0px !important;
	}  
}

#main-window[tabsintitlebar][sizemode="fullscreen"] #PanelUI-button {
  top: 0px !important;
}

#main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button {
  background-clip: padding-box !important;
  padding: 0 4px 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-inline-start: 4px !important;
  padding-inline-end: 4px !important;
  height: 22px !important;
  border-radius: 0 0 4px 4px;
  border-top: none !important;
  border-right: 1px solid !important;
  border-left: 1px solid !important;
  border-bottom: 1px solid !important;
}

/* code for Unix (macOS/Linux) */
@media (not (-moz-os-version: windows-win10)) and (not (-moz-os-version: windows-win8)) and (not (-moz-os-version: windows-win7)) {
  #main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button {
	max-width: 40px !important;
  }	  
}

@media not (-moz-platform: windows) {
  #main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button {
	max-width: 40px !important;
  }
}

/* hide button in fullscreen mode, if toolbars get automatically hidden */
#main-window[tabsintitlebar][sizemode="fullscreen"] #navigator-toolbox[style*="margin-top: -"] #PanelUI-button {
  visibility: collapse !important;
}

/* dropmarker icon / arrow */
#main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button {
  list-style-image: unset !important;
  -moz-image-region: unset !important;
}

#main-window[tabsintitlebar] #PanelUI-button .toolbarbutton-icon {
  list-style-image: url("../../image/appbutton-inv.svg") !important;
  background: unset !important;
  box-shadow: unset !important;
}

/* adjust button badge stack */
#main-window[tabsintitlebar] :-moz-any(#PanelUI-button,#PanelUI-menu-button):not([checked]):not([open]):not(:active) > .toolbarbutton-badge-stack,
#main-window[tabsintitlebar] :-moz-any(#PanelUI-button,#PanelUI-menu-button):not([disabled=true]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-badge-stack,
#main-window[tabsintitlebar] :-moz-any(#PanelUI-button,#PanelUI-menu-button):not([disabled=true]):-moz-any([open],[checked],:hover:active) > .toolbarbutton-badge-stack{
  background: unset !important;
  border-color: unset !important;
  border: 0 !important;
  box-shadow: unset !important;
}

/* adjust button badge */
#main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button .toolbarbutton-badge-stack .toolbarbutton-badge  {
  margin-inline-end: 2px !important;
  margin-top: 0px !important;
  margin-inline-start: -30px !important;
}

/* button color/border */

/* orange (default) */
#main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button {
  background-image: linear-gradient(rgb(247,182,82), rgb(215,98,10) 95%) !important;
  border-right-color:hsla(214,89%,21%,.5) !important;
  border-left-color: hsla(214,89%,21%,.5) !important;
  border-bottom-color: hsla(214,89%,21%,.5) !important;
  box-shadow: 0 1px 0 hsla(0,0%,100%,.2) inset,
			  0 0 2px 1px hsla(0,0%,100%,.25) inset,
			  0 1px 0 0px rgba(255,255,255,.5),
			  0 -1px 0 0px rgba(255,255,255,.5),
			  1px 0 0 0px rgba(255,255,255,.5),
			  -1px 0 0 0px rgba(255,255,255,.5) !important;
}
#main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button:hover:not(:active):not([open]){
  background-image: radial-gradient(farthest-side at center bottom, rgba(252,240,89,.5) 10%, rgba(252,240,89,0) 70%),
					radial-gradient(farthest-side at center bottom, rgb(236,133,0), rgba(255,229,172,0)),
					linear-gradient(rgb(246,170,69), rgb(209,74,0) 95%) !important;
  border-color: rgba(83,42,6,.9) !important;
  box-shadow: 0 1px 0 hsla(0,0%,100%,.15) inset,
			  0 0 2px 1px hsla(0,0%,100%,.5) inset,
			  0 -1px 0 hsla(0,0%,100%,.2),
			  0 1px 0 0px rgba(255,255,255,.5),
			  0 -1px 0 0px rgba(255,255,255,.5),
			  1px 0 0 0px rgba(255,255,255,.5),
			  -1px 0 0 0px rgba(255,255,255,.5) !important;
}
#main-window[tabsintitlebar] #PanelUI-button #PanelUI-menu-button:-moz-any(:hover:active,[open]){
  background-image: linear-gradient(rgb(246,170,69), rgb(209,74,0) 95%) !important;
  box-shadow: 0 2px 3px rgba(0,0,0,.4) inset,
			  0 1px 1px rgba(0,0,0,.2) inset,
			  0 1px 0 0px rgba(255,255,255,.5),
			  0 -1px 0 0px rgba(255,255,255,.5),
			  1px 0 0 0px rgba(255,255,255,.5),
			  -1px 0 0 0px rgba(255,255,255,.5) !important;
}

/*private browsing - purple */
#main-window[privatebrowsingmode=temporary][tabsintitlebar] #PanelUI-button #PanelUI-menu-button{
  background-image: linear-gradient(rgb(153,38,211), rgb(105,19,163) 95%) !important;
}
#main-window[privatebrowsingmode=temporary][tabsintitlebar] #PanelUI-button #PanelUI-menu-button:hover:not(:active):not([open]){
  background-image: radial-gradient(farthest-side at center bottom, rgba(240,193,255,.5) 10%, rgba(240,193,255,0) 70%),
					radial-gradient(farthest-side at center bottom, rgb(192,81,247), rgba(236,172,255,0)),
					linear-gradient(rgb(144,20,207), rgb(95,0,158) 95%) !important;
}
#main-window[privatebrowsingmode=temporary][tabsintitlebar] #PanelUI-button #PanelUI-menu-button:-moz-any(:hover:active,[open]) {
  background-image: linear-gradient(rgb(144,20,207), rgb(95,0,158) 95%) !important;
}

/* fix for 'buttons_on_navbar_squared_buttons.css' */
#main-window[tabsintitlebar][uidensity=compact] #PanelUI-menu-button .toolbarbutton-badge-stack,
#main-window[tabsintitlebar]:not([uidensity=compact]):not([uidensity=touch]) #PanelUI-menu-button .toolbarbutton-badge-stack,
#main-window[tabsintitlebar][uidensity=touch] #PanelUI-menu-button .toolbarbutton-badge-stack {
  padding-top: 0px !important;
  padding-bottom: 0px !important;
  width: unset !important;
  height: 22px !important;
}

#main-window[tabsintitlebar][uidensity=compact] #PanelUI-menu-button .toolbarbutton-icon,
#main-window[tabsintitlebar]:not([uidensity=compact]):not([uidensity=touch]) #PanelUI-menu-button .toolbarbutton-icon,
#main-window[tabsintitlebar][uidensity=touch] #PanelUI-menu-button .toolbarbutton-icon {
  padding: 0px !important;
  width: 16px !important;
  height: 16px !important;
}

/* fix for toolbar + text mode */
#main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) toolbaritem #PanelUI-menu-button,
#main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) #PanelUI-menu-button,
#main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) .toolbarbutton-1[type="menu-button"] #PanelUI-menu-button{
  appearance: unset !important;
}
#main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) toolbaritem #PanelUI-menu-button .toolbarbutton-text,
#main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) #PanelUI-menu-button:not([type="menu-button"]) .toolbarbutton-text,
#main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) .toolbarbutton-1[type="menu-button"] #PanelUI-menu-button .toolbarbutton-text{
  display: none !important;
}
#main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) toolbaritem #PanelUI-menu-button:not([type="menu-button"]),
#main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) #PanelUI-menu-button:not([type="menu-button"]),
#main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) .toolbarbutton-1[type="menu-button"] #PanelUI-menu-button{
  -moz-box-orient: unset !important;
  min-width: unset !important;
}

#main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) toolbaritem #PanelUI-menu-button:not(#nav-bar-overflow-button):not(#PlacesChevron) > :-moz-any(.toolbarbutton-icon,.toolbarbutton-badge-stack),
#main-window[tabsintitlebar] toolbox toolbar:not(#TabsToolbar) #PanelUI-menu-button:not([type="menu-button"]):not(#nav-bar-overflow-button):not(#PlacesChevron) > :-moz-any(.toolbarbutton-icon,.toolbarbutton-badge-stack) {
  opacity: 1.0 !important;
  margin-bottom: unset !important;
}

/* support for tab title in Firefox titlebar option*/
#main-window[tabsintitlebar]::after {
  margin-inline-start: 45px !important;
}

/* remove this nonsense button, a menuitem is inside menu button anyways */
#PanelUI-button #whats-new-menu-button {
  display: none !important;
}

/* workaround for Firefox 71+ *******************/
#main-window[tabsintitlebar] #PanelUI-button > *:not(#PanelUI-menu-button) {
  display: none !important;
}

#main-window[tabsintitlebar][uidensity=compact] #PanelUI-menu-button .toolbarbutton-badge-stack,
#main-window[tabsintitlebar]:not([uidensity=compact]):not([uidensity=touch]) #PanelUI-menu-button .toolbarbutton-badge-stack,
#main-window[tabsintitlebar][uidensity=touch] #PanelUI-menu-button .toolbarbutton-badge-stack,
#main-window[tabsintitlebar][uidensity=compact] #PanelUI-menu-button .toolbarbutton-icon,
#main-window[tabsintitlebar]:not([uidensity=compact]):not([uidensity=touch]) #PanelUI-menu-button .toolbarbutton-icon,
#main-window[tabsintitlebar][uidensity=touch] #PanelUI-menu-button .toolbarbutton-icon {
  height: unset !important;
}
