/* Header bar's URL bar */

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

#urlbar {
	--urlbar-height: 34.00px;
	--urlbar-toolbar-height: 34.00px !important;
}

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

/* URL bar */
#urlbar {
	box-shadow: none !important;
}
#urlbar-background {
	box-shadow: none !important;
	border: 0 !important;
	background: transparent !important;
}

#urlbar[breakout][breakout-extend] {
	left: 0 !important;
	top: 0 !important;
	width: 100% !important;
	z-index: 5 !important;
}

#urlbar #urlbar-input-container {
	padding: 0 !important;
}

/* URL bar results */
.urlbarView {
	background: var(--gnome-menu-background) !important;
	color: var(--gnome-toolbar-color) !important;
	margin: 6px 0 0 0 !important;
	width: 100% !important;
	position: absolute !important;
	box-shadow: var(--gnome-urlbarView-shadow) !important;
	border-radius: 12px !important;
	border: 0 !important;
}

@media (prefers-color-scheme: dark) {
	.urlbarView {
		border: 1px solid rgba(255, 255, 255, 0.1) !important;
	}
}
/* Search bar result */
#PopupSearchAutoComplete {
	margin-top: 7px !important;
}

.urlbarView-body-outer {
	--item-padding-start: 0 !important;
	--item-padding-end: 0 !important;
	background: none !important;
	overflow-x: auto;
	padding: 2px 6px !important;
	border-radius: 8px 8px 0 0 !important;
	border: none !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-row[selected] .urlbarView-row-inner {
	background: var(--gnome-accent-bg) !important;
	color: white !important;
}
.urlbarView-row:not([selected]):hover .urlbarView-row-inner {
	background: var(--gnome-menu-button-hover-background) !important;
}

.urlbarView-action {
	background: transparent !important;
}

/* Search engines buttons */
.search-one-offs {
	padding: 8px !important;
	background: var(--gnome-entry-background) !important;
	border-top: 1px solid var(--gnome-menu-separator-color) !important;
	border-radius: 0 0 8px 8px !important;
}

.search-one-offs[is_searchbar="true"] {
	margin-bottom: -8px !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:hover,
.urlbar-icon-wrapper:hover,
.urlbar-icon[open],
.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;
}

#identity-box:hover, #tracking-protection-icon-container:hover,
.urlbar-page-action:hover, #urlbar-go-button:hover, .search-go-button:hover {
	background: var(--gnome-button-flat-hover-background) !important;
}

#identity-box:active, #tracking-protection-icon-container:active,
.urlbar-page-action:active, #urlbar-go-button:active, .search-go-button:active {
	background: var(--gnome-button-flat-active-background) !important;
}

/* Fixed size for some urlbar-icon */
/*#star-button.urlbar-icon,*/
/*#reader-mode-button > .urlbar-icon {*/
/*	padding: 3px 0 !important;*/
/*}*/

/* Search mode indicator */
#urlbar-search-mode-indicator,
#urlbar-label-box,
#urlbar-zoom-button {
	background: var(--gnome-button-background) !important;
	border: 0 !important;
	border-radius: 26px !important;
	outline: 0 !important;
	margin: 4px 0;
}
#urlbar-search-mode-indicator {
	padding-right: 0 !important;
}
#urlbar-search-mode-indicator-title {
	color: var(--gnome-toolbar-color);
	padding-inline: 4px !important;
}
#urlbar-search-mode-indicator-close {
	background-size: 16px !important;
	background-position: center;
	border-radius: 26px !important;
	padding: 5px !important;
}
#urlbar-search-mode-indicator-close:hover {
	background-color: var(--gnome-button-hover-background) !important;
}
#urlbar-zoom-button {
	opacity: 0.8;
}
#urlbar-zoom-button:hover {
	opacity: 1;
}

/* Firefox identity box */
#identity-box[pageproxystate="valid"].notSecureText > .identity-box-button,
#identity-box[pageproxystate="valid"].chromeUI > .identity-box-button,
#identity-box[pageproxystate="valid"].extensionPage > .identity-box-button,
#urlbar-label-box {
	background-color: transparent !important;
}

#identity-box[pageproxystate="valid"].notSecureText > .identity-box-button:hover:not([open]),
#identity-box[pageproxystate="valid"].chromeUI > .identity-box-button:hover:not([open]),
#identity-box[pageproxystate="valid"].extensionPage > .identity-box-button:hover:not([open]) {
	background-color: hsla(0,0%,70%,.2) !important;
}

#identity-box[pageproxystate="valid"].notSecureText > .identity-box-button:hover:active,
#identity-box[pageproxystate="valid"].notSecureText > .identity-box-button[open=true],
#identity-box[pageproxystate="valid"].chromeUI > .identity-box-button:hover:active,
#identity-box[pageproxystate="valid"].chromeUI > .identity-box-button[open=true],
#identity-box[pageproxystate="valid"].extensionPage > .identity-box-button:hover:active,
#identity-box[pageproxystate="valid"].extensionPage > .identity-box-button[open=true] {
	background-color: hsla(0,0%,70%,.3) !important;
}
