:root {
	--urlbarView-background-color: white;
	--urlbarView-color: black;
	--urlbarView-row-height: 25px;
	--urlbarView-highlight-background: SelectedItem !important;
	--urlbarView-highlight-color: SelectedItemText !important;

	&:not([uidensity="compact"]) .urlbarView-row:not([type="tip"], [type="dynamic"]) {
		min-height: 0 !important;
	}
}

#urlbar[open] > .urlbarView > .urlbarView-body-outer > .urlbarView-body-inner {
	border-top: 0 !important;
}

.urlbarView-results {
	padding: 0 !important;
}

.urlbarView-row {
	border-radius: 0 !important;
	border: 0 !important;
	padding-left: 4px !important;

	&[selected] {
		.urlbarView-action {
			color: rgb(255, 255, 255, 80%) !important;
		}

		.urlbarView-url {
			color: #7ff4b7 !important;
		}
		.urlbarView-title {
			color: rgb(255, 255, 255, 60%) !important;
		}
	}

	&[type="switchtab"] {
		.urlbarView-row-inner .urlbarView-title::before {
			display: none;
		}

		.urlbarView-action {
			padding: 0 !important;
		}
	}

	&[dynamicType="onboardTabToSearch"] > .urlbarView-row-inner {
		min-height: 14px !important;
	}

	&[type="search"] .urlbarView-title::before {
		display: none;
	}

	&[type="dynamic"] {
		display: none !important;
	}

	&:is([row-selectable]:hover, [selected]) > .urlbarView-button {
		background-color: transparent !important;
		color: white !important;
		fill-opacity: 1;
	}

	&[label] {
		margin: 0 !important;

		&::before {
			content: unset !important;
		}
	}

	// Fix for Rich Results feature
	&[rich-suggestion] .urlbarView-row-body-description {
		display: none !important;
	}

	// Remove empty gap in Firefox 121+
	&:not([has-url]) {
		.urlbarView-url {
			display: none !important;
		}
	}
}

.urlbarView {
	display: block;
	background: var(--urlbarView-background-color) !important;
	border: 1px solid rgba(0, 0, 0, 0.3) !important;
	margin-inline: 0 !important;
	box-shadow: 2px 2px 2px 0px rgba(0, 0, 0, .5);
	padding: 0;
	width: 100% !important;
}

.urlbarView-row-inner {
	position: relative !important;
	height: var(--urlbarView-row-height) !important;
	min-height: var(--urlbarView-row-height) !important;
	padding-block: 0 !important;

	// Fix for Rich Results feature
	align-items: center !important;
}

.urlbarView-no-wrap,
.urlbarView-row-body-top-no-wrap /* Fix for Rich Results feature */ {
	order: 2 !important;
}

.urlbarView-no-wrap::before {
	content: unset;
}

.urlbarView-favicon {
	display: none;

	// Fix for Rich Results feature
	margin-inline-start: 0 !important;

	position: absolute;
	left: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px !important;
	height: 16px !important;

	&[src="chrome://browser/skin/history.svg"] {
		opacity: 0.8;
	}
}

.urlbarView-type-icon {
	display: none;
}

.urlbarView-title {
	text-overflow: ellipsis;
	overflow: hidden;
	min-width: 0;
	color: var(--urlbarView-color);

	&:is([isurl="true"])::before {
		display: none !important;
	}
}

.urlbarView-overflowable[overflow],
.urlbarView-url[overflow] {
	mask-image: none !important;
}

.urlbarView-title-separator::before {
	display: none;
}

.urlbarView-action {
	display: none !important;
	position: absolute;
	right: 8px !important;
	background: transparent !important;
	color: -moz-menuhover !important;
}

.urlbarView-url {
	width: 50%;
	overflow: hidden !important;
	text-overflow: ellipsis;
	box-sizing: border-box;
	margin: 0 !important;
	font-size: unset !important;
	color: rgb(11, 133, 14) !important;
	flex-grow: 0 !important;
	flex-shrink: 0 !important;
	order: 1 !important;
}

.urlbarView-button-menu {
	display: none !important;
}

.search-one-offs {
	display: none !important;
}

.urlbarView-dynamic-onboardTabToSearch-no-wrap {
	.urlbarView-dynamic-onboardTabToSearch-icon {
		height: 16px !important;
		width: 16px !important;
		left: 0;
	}

	.urlbarView-dynamic-onboardTabToSearch-text-container {
		padding-left: 26px !important;
	}

	.urlbarView-dynamic-onboardTabToSearch-title.urlbarView-title::before {
		display: none !important;
	}
}

.urlbarView-dynamic-onboardTabToSearch-action {
  	display: none;
}

@media screen and (min-height: 600px) {
	.urlbarView-results[wrap] > .urlbarView-row:where(:not([rich-suggestion="with-icon"])) > .urlbarView-row-inner {
		flex-wrap: nowrap !important;
	}
}