/* Header bar */
@import "headerbar-urlbar.css";
@import "headerbar-private-urlbar.css";
@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";

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

/* Headerbar CSD colors */
:root[tabsintitlebar] #nav-bar {
	background: var(--gnome-headerbar-background) !important;
	border: none !important;
	border-bottom: none !important;
	box-shadow: var(--gnome-headerbar-box-shadow) !important;
}

:root[tabsintitlebar] #nav-bar:-moz-window-inactive {
	background: var(--gnome-inactive-headerbar-background) !important;
	box-shadow: var(--gnome-inactive-headerbar-box-shadow) !important;
}

/* Headerbar buttons */
#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(.subviewbutton):not(.toolbarbutton-1) {
	border: none !important;
	box-shadow: none !important;
	background: none !important;
	-moz-appearance: none !important;
	border-radius: 8px !important;
	padding: 0 4px !important;
	min-height: 26px !important;
	min-width: 26px !important;
	color: var(--gnome-toolbar-color) !important;
	transition: background 200ms;
}

/* fix spacing for extensions
toolbar .toolbarbutton-1{
	margin: 0 8px !important;
}
.subviewbutton > .toolbarbutton-badge-stack {
	padding: 0 !important;
} */

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


/* Active headerbar buttons */
#nav-bar toolbarbutton:not(#allTabsMenu-searchTabs):not(.all-tabs-button):not(.all-tabs-secondary-button):not(#urlbar-zoom-button):not([disabled]):not(#hack):active,
#nav-bar toolbarbutton:not(#allTabsMenu-searchTabs):not(.all-tabs-button):not(.all-tabs-secondary-button):not(#urlbar-zoom-button):not([disabled])[open],
#nav-bar toolbarbutton:not(#allTabsMenu-searchTabs):not(.all-tabs-button):not(.all-tabs-secondary-button):not(#urlbar-zoom-button):not([disabled])[checked] {
	background: var(--gnome-headerbar-button-active-background) !important;
}

/* Buttons with margins */
#nav-bar toolbarbutton:not(#urlbar-zoom-button):not(#allTabsMenu-searchTabs) {
	margin: 0 2px !important;
}

#nav-bar #back-button:not(#hack),
#nav-bar #forward-button:not(#hack) {
	padding: 0 4px !important;
	width: 32px !important;
	min-width: 32px !important;
}

#nav-bar #forward-button:not(#hack) {
	margin-left: 0 !important;
}

#nav-bar #back-button:not(#hack) {
	margin-right: 1px !important;
}

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

#nav-bar-customization-target{
	max-height: 36px !important;
}

#nav-bar #searchbar:hover,
#urlbar .urlbar-input-container:hover {
	box-shadow: inset 0 0 0 2px 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 {
	background: none !important;
	box-shadow: none !important;
	padding: 0 6px !important;
}

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