/* Header bar */
@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";

/* Headerbar */
#nav-bar {
	padding: 8px !important;
}

/* Headerbar CSD colors */
:root[tabsintitlebar] #nav-bar {
	border: none !important;
}

/* Headerbar buttons */
#nav-bar toolbarbutton:not(#urlbar-zoom-button),
toolbar .toolbaritem-combined-buttons > .toolbarbutton-1 {
	border: none !important;
	box-shadow: none !important;
	background: none !important;
	-moz-appearance: none !important;
	border-radius: 8px !important;
	margin: 0 2px !important;
	padding: 0 4px !important;
	max-height: 32px !important;
	min-height: 32px !important;
	min-width: 32px !important;
	transition: background 200ms;
}

:root:-moz-window-inactive #nav-bar toolbarbutton:not(#urlbar-zoom-button) {
	background: none !important;
}

#nav-bar .toolbaritem-combined-buttons:not(.unified-extensions-item) {
	padding: 0 !important;
	margin: 0 2px !important;
	border-radius: 8px !important;
	background: var(--gnome-headerbar-button-combined-background) !important;
}

#nav-bar .toolbaritem-combined-buttons toolbarbutton:not(#urlbar-zoom-button) {
	margin: 0 !important;
}

/* Hover headerbar buttons */
#nav-bar toolbarbutton:not(#urlbar-zoom-button):not([open]):not([disabled]):not([checked]):hover,
#TabsToolbar .toolbarbutton-1:hover,
#tabs-newtab-button:hover, #TabsToolbar #new-tab-button:hover {
	outline: 0 !important;
	background: var(--gnome-headerbar-button-hover-background) !important;
}

/* Active headerbar buttons */
#nav-bar toolbarbutton:not(#urlbar-zoom-button):not([disabled]):not(#hack):active,
#nav-bar toolbarbutton:not(#urlbar-zoom-button):not([disabled])[open],
#nav-bar toolbarbutton:not(#urlbar-zoom-button):not([disabled])[checked],
#TabsToolbar .toolbarbutton-1:active, #TabsToolbar .toolbarbutton-1[open],
#tabs-newtab-button:active, #TabsToolbar #new-tab-button:active {
	background: var(--gnome-headerbar-button-active-background) !important;
}

/* Disabled headerbar buttons */
#nav-bar toolbarbutton:not(#urlbar-zoom-button)[disabled] {
	background: transparent !important;
	border-color: var(--gnome-button-disabled-border-color) !important;
	box-shadow: none !important;
	opacity: 1 !important;
}

/* Inactive window buttons */
#nav-bar toolbarbutton:not(#urlbar-zoom-button):-moz-window-inactive {
	background: var(--gnome-inactive-button-background) !important;
	box-shadow: var(--gnome-inactive-button-box-shadow) !important;
	border-color: var(--gnome-inactive-button-border-color) !important;
}

/* Headerbar entries */
#nav-bar #searchbar,
#urlbar #urlbar-input-container,
#urlbar .urlbar-input-container {
	-moz-appearance: none !important;
	background: var(--gnome-urlbar-background) !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: 8px !important;
	color: var(--gnome-urlbar-color) !important;
	padding: 0 3px !important;
	height: 32px !important;
	max-height: 32px !important;
	transition: box-shadow 200ms;
}

:root:-moz-window-inactive #nav-bar #searchbar,
:root:-moz-window-inactive #urlbar #urlbar-input-container,
:root:-moz-window-inactive #urlbar .urlbar-input-container {
	background: var(--gnome-inactive-urlbar-background) !important;
}

#nav-bar #searchbar:hover,
#urlbar #urlbar-input-container:hover,
#urlbar .urlbar-input-container:hover {
	box-shadow: inset 0 0 0 1px var(--gnome-hover-urlbar-border-color) !important;
	transition-duration: 100ms;
}

#urlbar[breakout][breakout-extend] #urlbar-input-container,
#urlbar[breakout][breakout-extend] #urlbar-input-container:hover,
#urlbar[breakout][breakout-extend] .urlbar-input-container,
#urlbar[breakout][breakout-extend] .urlbar-input-container:hover {
	background: none !important;
	box-shadow: none !important;
	padding: 0 3px !important;
}

#nav-bar #searchbar:focus-within {
	border: none !important;
	background: var(--gnome-urlbar-background) !important;
	box-shadow: inset 0 0 0 2px var(--gnome-focused-urlbar-highlight-color) !important;
}
