/* Header bar's URL bar */

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

#urlbar {
	--urlbar-height: 32px !important;
	--urlbar-container-height: 32px !important;
	--urlbar-toolbar-height: 32px !important;
	--urlbar-inner-padding: 0 !important;
}

/* Center the URL bar */
toolbarspring {
	max-width: 1000px !important;
}

#stop-reload-button + toolbarspring {
	max-width: 1px !important;
}

#urlbar-container + toolbarspring {
	width: 1000px !important;
}

/* URL bar */
#urlbar {
	margin-top: -1px !important;
	box-shadow: none !important;
	background: var(--gnome-popover-background) !important;
	border-radius: 8px !important;
	border: 1px solid transparent !important;
	padding: 0 0 !important;
	max-width: 360px !important;
}
#urlbar-background {
	box-shadow: none !important;
	border: 0 !important;
	background: transparent !important;
	border-radius: 8px !important;
	padding: 0 0 !important;
}

#urlbar:-moz-window-inactive {
	background: var(--gnome-inactive-urlbar-background) !important;
	border-color: var(--gnome-inactive-headerbar-background) !important;
}

#urlbar-container,
#wrapper-urlbar-container,
#urlbar #urlbar-input-container {
	padding: 0 !important;
	width: 360px !important;
	min-width: 360px !important;
}

:root[sizemode="maximized"] #urlbar,
:root[sizemode="maximized"] #urlbar-container,
:root[sizemode="maximized"] #wrapper-urlbar-container {
	width: 360px !important;
	min-width: 360px !important;
}

#urlbar[breakout][breakout-extend] {
	left: 0 !important;
	top: 0 !important;
	width: 360px !important;
	z-index: 5 !important;
	padding: 0 0 !important;
}
#urlbar[breakout][breakout-extend][open] {
	height: auto !important;
	max-height: unset !important;
}
#urlbar[breakout][breakout-extend] #urlbar-input-container {
	height: 32px !important;
	max-height: 32px !important;
	padding: 0 !important;
}

#urlbar[breakout][breakout-extend][open] #urlbar-background {
	box-shadow: var(--gnome-urlbar-box-shadow) !important;
}

/* URL bar results */
.urlbarView {
	background: transparent !important;
	color: var(--gnome-toolbar-color) !important;
	margin: 0 !important;
	width: 100% !important;
}

.urlbarView-body-outer {
	--item-padding-start: 0 !important;
	--item-padding-end: 0 !important;
	max-height: 40vh !important;
	overflow-x: auto;
	padding: 0 8px !important;
}

.urlbarView-body-inner {
	border: 0 !important;
}

.urlbarView-row-inner, .urlbarView-no-wrap  {
	align-items: center !important;
}
.urlbarView-row-inner {
	padding-block: 5px !important;
	border-radius: 5px !important;
}
.urlbarView-action {
	background: transparent !important;
}
/* Search engines buttons */
.search-one-offs {
	margin: 0 0 2px !important;
	padding: 8px !important;
	background: var(--gnome-popover-background) !important;
	border-top: 1px solid var(--gnome-button-border-color) !important;
	border-radius: 0 0 8px 8px !important;
}

.searchbar-engine-one-off-item {
	--toolbarbutton-active-background: var(--gnome-headerbar-button-active-background) !important;
	--toolbarbutton-hover-background: var(--gnome-headerbar-button-hover-background) !important;
	-moz-appearance: none !important;
	background: transparent !important;
	box-shadow: none !important;
	border: none !important;
	padding: 0 0 !important;
	min-height: 32px !important;
	min-width: 32px !important;
	margin: 0 !important;
}

.searchbar-engine-one-off-item:hover, .searchbar-engine-one-off-item[selected] {
	background: var(--gnome-headerbar-button-hover-background) !important;
	color: unset !important;
}

#urlbar-anon-search-settings-compact {
	border: none !important;
	border-radius: 5px;
	margin-left: 6px !important;
}

/* URL bar and Search bar */
#urlbar[focused] .urlbar-textbox-container {
	margin: -1px !important;
}
#searchbar > .searchbar-textbox[focused] .searchbar-search-button {
	margin-left: -1px !important;
}
#searchbar > .searchbar-textbox[focused] .search-go-button {
	margin-right: -1px !important;
}

/* URL bar and Search bar's icons */
.urlbar-icon-wrapper:hover,
.urlbar-icon-wrapper[open],
.urlbar-icon:hover:active,
.urlbar-icon-wrapper:hover:active,
.searchbar-search-button:hover .searchbar-search-icon,
.searchbar-search-button[open] .searchbar-search-icon,
.searchbar-search-button:hover:active .searchbar-search-icon {
	background-color: transparent !important;
	fill-opacity: 1 !important;
}

.urlbar-icon {
	width: 16px !important;
	height: 16px !important;
	padding: 0 1px !important;
	margin: 0 !important;
}

#identity-box {
	margin: 3px 2px !important;
	border-radius: 5px !important;
}

.urlbar-page-action, #urlbar-go-button, .search-go-button,
#tracking-protection-icon-container {
	margin: 3px 0 !important;
	border-radius: 5px !important;
}

#identity-box:hover {
	background: var(--gnome-headerbar-button-hover-background) !important;
}

#identity-box:active {
	background: var(--gnome-headerbar-button-active-background) !important;
}

.identity-box-button {
	border-radius: 5px !important;
	background: none !important;
}

#identity-box.extensionPage #identity-icon-label {
	visibility: collapse !important;
}

/* Search mode indicator */
#urlbar-search-mode-indicator,
#urlbar-label-box {
	background: var(--gnome-headerbar-button-hover-background) !important;
	border: none !important;
	border-radius: 5px !important;
	outline: 0 !important;
	margin-top: 3px !important;
	margin-bottom: 3px !important;
}
#urlbar-search-mode-indicator-title {
	padding-inline: 4px !important;;
}
#urlbar-search-mode-indicator-close {
	background-size: 12px 12px !important;
	border-radius: 3px !important;
	opacity: 0.8 !important;
	fill: var(--gnome-toolbar-color) !important;
}
