/* This Source Code Form is subject to the terms of the Creative Commons
 * Attribution-NonCommercial-ShareAlike International License, v. 4.0.
 * If a copy of the CC BY-NC-SA 4.0 was not distributed with this
 * file, You can obtain one at http://creativecommons.org/licenses/by-nc-sa/4.0/
 * or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. */

/* controls the appearance of the urlbar results popup .urlbarView and #urlbar-results, etc. */

.urlbarView-row {
  border-radius: 4px !important;
}

.urlbarView-no-wrap {
  min-width: 0 !important;
}

.urlbarView-no-wrap > span:not([title], [label]):empty,
.urlbarView-url:not([title], [label]):empty {
  display: none;
}

.urlbarView-tags:empty {
  display: none !important;
}

/* show search query results that are only space/tab characters
by underlining them (requires urlbarMods.uc.js) */
.urlbarView-title[all-whitespace] {
  text-decoration: underline !important;
  color: var(--panel-shortcut-color);
}

:is(.urlbarView-row, .urlbarView-row-inner)[selected] .urlbarView-title[all-whitespace] {
  color: var(--panel-shortcut-focus);
}

.urlbarView-row[selected]:not([dynamicType="quickactions"]) > .urlbarView-row-inner,
.urlbarView-row > .urlbarView-row-inner[selected],
.urlbarView-help[selected] {
  fill-opacity: 1;
}

#urlbar {
  /* fix weird bug with semitransparent background colors after bug 1948565.
  without it, buttons in panels are too bright when the arrowcontainer's
  max-width/max-height rule limits the panel's size */
  backface-visibility: hidden !important;
}

.urlbarView {
  /* temporarily give it a background to fix a bug from bug 1948565 */
/*   background: var(--urlbar-results-bgcolor) !important;
  background-clip: content-box !important; */
  border: none !important;
  font-size: 1.04em !important;
}

.urlbarView .urlbarView-body-inner {
  border-top: none !important;
  margin: revert !important;
  width: revert !important;
}

.urlbarView-results,
#urlbar-results {
  border-bottom-left-radius: 4px !important;
  border-bottom-right-radius: 4px !important;
}

#urlbar-results {
  border: none !important;
}

.urlbarView #urlbar-results:empty {
  padding-block: 0 !important;
}

.urlbarView-tags,
.urlbarView-url,
.urlbarView-title:not(:empty) ~ .urlbarView-action {
  font-size: 0.85em;
}

.urlbarView-tags {
  column-gap: calc(var(--urlbar-icon-padding) + 2px);
  line-height: inherit !important;
}

.urlbarView-tag {
  margin: 0 !important;
  border-color: var(--panel-separator-color) !important;
  padding: 2px 7px !important;
  line-height: 14px !important;
  height: 20px !important;
  box-sizing: border-box !important;
  border-radius: 10px !important;
  background-color: var(--arrowpanel-faint) !important;
}

.urlbarView-row[dynamicType="quickactions"] > .urlbarView-row-inner {
  gap: 4px calc(var(--urlbar-icon-padding) + 2px) !important;
  padding-inline: 2px !important;
  min-height: revert !important;
  align-items: start !important;
}

.urlbarView-row[dynamicType="quickactions"] .urlbarView-dynamic-quickactions-buttons {
  gap: calc(var(--urlbar-icon-padding) + 2px) !important;
  padding-block: 2px !important;
  align-items: center !important;
}

.urlbarView-row[dynamicType="quickactions"] .urlbarView-quickaction-button {
  background: var(--arrowpanel-faint) !important;
  border-radius: 20px !important;
  padding: 4px 7px !important;
  align-items: normal !important;
  box-sizing: border-box !important;
  border: 1px solid var(--panel-separator-color) !important;
  box-shadow: none !important;
  outline: none !important;
  margin: 0 !important;
  gap: 4px !important;
  font-size: 0.85em !important;
  color: var(--panel-description-color) !important;
}

.urlbarView-row[dynamicType="quickactions"] .urlbarView-quickaction-button:hover:not([disabled]) {
  background: var(--uc-arrowpanel-dimmed) !important;
  color: var(--panel-shortcut-focus) !important;
  fill-opacity: 1 !important;
}

.urlbarView-row[dynamicType="quickactions"] .urlbarView-quickaction-button:is(:focus-visible, [selected]):not([disabled]) {
  background: var(--uc-arrowpanel-dimmed-further) !important;
  border-color: transparent !important;
  color: var(--panel-shortcut-focus) !important;
  fill-opacity: 1 !important;
}

.urlbarView-row[dynamicType="quickactions"] .urlbarView-label {
  font-size: inherit !important;
  font-weight: var(--urlbar-result-strong-font-weight, 500) !important;
  color: inherit !important;
}

.urlbarView-row[dynamicType="quickactions"] .urlbarView-quickaction-button:is(:hover, :focus-visible, [selected]):not([disabled]) .urlbarView-label {
  opacity: 1;
}

.urlbarView-row[dynamicType="quickactions"] .urlbarView-favicon {
  -moz-context-properties: fill, fill-opacity !important;
  fill: currentColor !important;
}

.urlbarView-row[dynamicType="quickactions"] :where(.urlbarView-favicon, .urlbarView-favicon-img) {
  width: 14px !important;
  height: 14px !important;
}

.urlbarView-button {
  /* border-radius: var(--toolbarbutton-border-radius) !important; */
  border: 1px solid var(--panel-separator-color) !important;
}

.urlbarView-results:not([wrap]) > .urlbarView-row > .urlbarView-button-menu:not(:empty) {
	display: inline-flex;
	align-items: center;
	border-radius: var(--urlbarView-result-button-size);
	padding-inline: 8px 28px !important;
	background-position-x: right 6px !important;
}

.urlbarView-row[dynamicType="weather"] {
  padding-inline-end: 6px !important;
}

.urlbarView-row[dynamicType="weather"] .urlbarView-row-inner {
  padding: 5px !important;
  column-gap: 0 !important;
}

.urlbarView-dynamic-weather-summary > div {
	margin-block: 1px !important;
}

.urlbarView-dynamic-weather-bottom {
	margin-top: revert !important;
	opacity: revert !important;
}

.urlbarView-dynamic-weather-title {
  line-height: revert !important;
}

.urlbarView-dynamic-weather-currentConditions {
	color: inherit !important;
	background-color: var(--arrowpanel-faint) !important;
	padding: 0.61em 0.61em !important;
	margin-inline-end: 0.7em !important;
	border-radius: 3px !important;
	text-align: start !important;
}

.urlbarView-dynamic-weather-currently {
	margin-bottom: 0 !important;
}

.urlbarView-dynamic-weather-temperature {
	margin-inline-end: 3px !important;
}

.urlbarView-row[type="tip"] > .urlbarView-row-inner > .urlbarView-favicon,
.urlbarView-row[type="tip"] > .urlbarView-row-inner > .urlbarView-title,
.urlbarView-row:is([type="tip"], [dynamicType="quickactions"]) > .urlbarView-row-inner > .urlbarView-button-help,
.urlbarView-tip-button {
  margin: revert !important;
}

.urlbarView-button[selected] {
  background-color: var(--urlbarView-result-button-hover-background-color) !important;
  outline: none !important;
}

.urlbarView-button:is(:hover, [open]),
.urlbarView-button[selected] {
  fill-opacity: 1 !important;
}

.urlbarView-button-help {
	background-image: url(chrome://userchrome/content/help-solid.svg) !important;
}

.urlbarView-row[has-buttons] > .urlbarView-row-inner {
  display: inline-flex;
  vertical-align: middle;
  width: calc(100% - (var(--button-count, 0) * var(--urlbar-one-offs-engine-width, 28px)) - 4px) !important;
}

.urlbarView-favicon {
  background-position: center !important;
  margin-inline: 0 !important;
  -moz-context-properties: fill, fill-opacity, stroke, stroke-opacity !important;
}

.urlbarView-row:not([type], [has-url]) .urlbarView-favicon {
  max-width: 16px !important;
  max-height: 16px !important;
}

.urlbarView-row[rich-suggestion="no-icon"]:not([firefox-suggest-sponsored]) .urlbarView-favicon {
  /* margin-inline: 4px 16px; */
}

.urlbarView-row[rich-suggestion] > .urlbarView-row-inner > .urlbarView-row-body > .urlbarView-row-body-top .urlbarView-title-separator {
  display: none !important;
}

.urlbarView-row[rich-suggestion][icon-size="16"]:not([has-action]) .urlbarView-row-body {
  display: inline-flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  column-gap: calc(var(--urlbar-icon-padding) + 2px);
}

.urlbarView-row[rich-suggestion][icon-size="16"]:not([has-action]) .urlbarView-row-body > * {
  display: inline-block !important;
  min-width: min-content !important;
}

.urlbarView-row[rich-suggestion][icon-size="16"]:not([has-action]) .urlbarView-row-body > *:empty {
  display: none !important;
}

.urlbarView-row[rich-suggestion][icon-size="16"]:not([has-action]) .urlbarView-row-body > .urlbarView-row-body-top .urlbarView-action {
  display: none !important;
}

.urlbarView-row[rich-suggestion][icon-size="16"]:not([has-action]) .urlbarView-row-body > .urlbarView-row-body-top > .urlbarView-row-body-top-no-wrap {
  display: inline-block !important;
}

.urlbarView-row[rich-suggestion][icon-size="16"]:not([has-action]) .urlbarView-row-body > .urlbarView-row-body-description {
  margin-inline: 8px 6px !important;
}

.urlbarView-type-icon {
  margin-inline: 0 !important;
  position: relative !important;
  align-self: center !important;
  min-width: 16px !important;
  width: 16px !important;
  height: 16px !important;
  -moz-context-properties: fill, fill-opacity !important;
  fill: inherit !important;
}

.urlbarView-row:is([type="switchtab"], [type="bookmark"], [type="remotetab"], [type="dynamic"], [pinned]) .urlbarView-type-icon {
  fill-opacity: inherit !important;
  margin-block: 0 !important;
  display: flex !important;
}

.urlbarView-row[pinned] .urlbarView-type-icon {
  background: url(chrome://userchrome/content/material/pin-45.svg) no-repeat !important;
}

.urlbarView-row[type="bookmark"] .urlbarView-type-icon {
  background-image: url(chrome://userchrome/content/skin/bookmark.svg) !important;
  align-self: center !important;
  stroke: none !important;
  background-position: center !important;
  background-size: contain !important;
}

.urlbarView-row:is([type="switchtab"], [type="remotetab"]) .urlbarView-type-icon {
  align-self: center !important;
  stroke: none !important;
  background: url(chrome://userchrome/content/skin/tab.svg) no-repeat !important;
  background-position: 0 0 !important;
  background-size: contain !important;
}

.urlbarView-row[selected]:is([type="switchtab"], [type="remotetab"]) .urlbarView-type-icon {
  fill-opacity: 1 !important;
}

.urlbarView-row[type="remotetab"] .urlbarView-type-icon {
  background: var(--device-icon, url(chrome://userchrome/content/skin/synced-tabs.svg)) center/contain no-repeat !important;
}

.urlbarView-row[type="remotetab"][clientType="phone"] {
  --device-icon: url(chrome://browser/skin/device-phone.svg);
}

.urlbarView-row[type="remotetab"][clientType="tablet"] {
  --device-icon: url(chrome://browser/skin/device-tablet.svg);
}

.urlbarView-row[type="remotetab"][clientType="desktop"] {
  --device-icon: url(chrome://browser/skin/device-desktop.svg);
}

.urlbarView-row[type="remotetab"][clientType="tv"] {
  --device-icon: url(chrome://browser/skin/device-tv.svg);
}

.urlbarView-row[type="remotetab"][clientType="vr"] {
  --device-icon: url(chrome://browser/skin/device-vr.svg);
}

.urlbarView-row[type="dynamic"][dynamicType="calculator"] .urlbarView-favicon {
  box-sizing: border-box !important;
  background: url(chrome://userchrome/content/material/function.svg) no-repeat !important;
  width: 16px !important;
  height: 16px !important;
  padding-inline-start: 16px;
}

.urlbarView-row[type="dynamic"][dynamicType="unitConversion"] .urlbarView-dynamic-unitConversion-action,
.urlbarView-row[type="dynamic"][dynamicType="calculator"] .urlbarView-dynamic-calculator-action {
  color: var(--urlbar-popup-action-color);
}

.urlbarView-row[type="dynamic"][dynamicType="unitConversion"] .urlbarView-row-inner[selected] .urlbarView-dynamic-unitConversion-action,
.urlbarView-row[type="dynamic"][dynamicType="calculator"] .urlbarView-row-inner[selected] .urlbarView-dynamic-calculator-action {
  color: inherit;
}

.urlbarView-row[dynamicType="onboardTabToSearch"] > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-favicon {
  min-width: 16px !important;
  height: 16px !important;
  fill: currentColor !important;
  fill-opacity: 1 !important;
  color: var(--attention-color) !important;
}

.urlbarView-row[dynamicType="onboardTabToSearch"] > .urlbarView-row-inner {
  min-height: 0 !important;
  padding-block: 6px !important;
}

.urlbarView-dynamic-onboardTabToSearch-first-row-container {
  align-items: center !important;
}

.urlbarView-row[dynamicType="onboardTabToSearch"] .urlbarView-title {
  line-height: normal !important;
}

.urlbarView-dynamic-onboardTabToSearch-description {
  margin-block: 0 !important;
  font-size: 0.85em !important;
}

.urlbarView-row[dynamicType="onboardTabToSearch"] > .urlbarView-row-inner:not([selected]) .urlbarView-dynamic-onboardTabToSearch-description {
  opacity: 1 !important;
  color: var(--panel-shortcut-color) !important;
}

.urlbarView-row[dynamicType="onboardTabToSearch"] .urlbarView-action.urlbarView-dynamic-onboardTabToSearch-action {
  margin-inline-start: 10px !important;
}

.urlbarView-row[dynamicType="onboardTabToSearch"]:not([selected], [show-action-text], :hover) .urlbarView-action {
  display: none !important;
}

.urlbarView[actionoverride] .urlbarView-row[type="switchtab"] .urlbarView-type-icon {
  background: url(chrome://userchrome/content/skin/forward.svg) no-repeat !important;
  background-size: 90% !important;
  background-position: 0 1.5px !important;
}

.urlbarView[actionoverride] .urlbarView-row[type="switchtab"] .urlbarView-type-icon:-moz-locale-dir(rtl) {
  background: url(chrome://userchrome/content/skin/back.svg) no-repeat !important;
}

.urlbarView-row[dynamicType="contextualSearch"] .urlbarView-dynamic-contextualSearch-description,
.urlbarView-row:is([type="switchtab"], [type="remotetab"], [type="clipboard"]) > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-action {
  /* background-color: transparent !important;
  border-radius: unset !important; */
  margin: 0 !important;
  border: 1px solid var(--panel-separator-color) !important;
  padding: 2px 7px !important;
  height: 20px !important;
  line-height: 14px !important;
  box-sizing: border-box !important;
  border-radius: 10px !important;
  background-color: var(--arrowpanel-faint) !important;
  color: var(--uc-arrowpanel-color) !important;
}

.urlbarView-row:not([selected]) .urlbarView-action {
  color: var(--urlbar-popup-action-color) !important;
}

.urlbarView[actionoverride] .urlbarView-row[type="switchtab"] > .urlbarView-row-inner > .urlbarView-no-wrap {
  flex-shrink: 1 !important;
}

.urlbar-results:not([wrap]) .urlbarView-url,
.urlbar-results:not([wrap]) .urlbarView[actionoverride] .urlbarView-row[type="switchtab"] > .urlbarView-row-inner > .urlbarView-url {
  flex-shrink: 3 !important;
}

.urlbarView[actionoverride] .urlbar-results:not([wrap]) .urlbarView-row[has-url] > .urlbarView-row-inner > .urlbarView-no-wrap,
.urlbar-results:not([wrap]) .urlbarView-row[has-url]:not([type$="tab"]) > .urlbarView-row-inner > .urlbarView-no-wrap,
.urlbar-results:not([wrap]) .urlbarView-row[has-url]:is([type="remotetab"], [sponsored]):is(:hover, [selected]) > .urlbarView-row-inner > .urlbarView-no-wrap {
  flex-shrink: 0 !important;
  max-width: 75% !important;
}

.urlbarView-row:is([type="switchtab"], [type="remotetab"]) > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-title-separator {
  visibility: visible !important;
}

.urlbarView-row-inner,
.urlbarView-no-wrap {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center !important;
  justify-content: start;
  column-gap: calc(var(--urlbar-icon-padding) + 2px);
}

.urlbarView-url,
.urlbarView-tags,
.urlbarView-dynamic-calculator-action,
.urlbarView-dynamic-unitConversion-action,
.urlbarView-row[dynamicType="contextualSearch"] .urlbarView-dynamic-contextualSearch-description,
.urlbarView-row:is([type="switchtab"], [type="remotetab"], [type="clipboard"]) > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-action {
  margin-inline: 8px 0 !important;
}

.urlbarView-action {
  padding: 0 !important;
  margin-inline: 8px 6px !important;
}

:root[lwt-toolbar-field-brighttext] .urlbarView-row[source]:not([selected]) > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-favicon {
  fill: var(--panel-description-color) !important;
  fill-opacity: 0.6 !important;
}

:root[lwt-toolbar-field-brighttext] .urlbarView-row[source][selected] > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-favicon {
  fill: var(--panel-description-color) !important;
  fill-opacity: 1 !important;
}

.urlbarView .urlbarView-row[type="tip"] {
  border: none !important;
  padding-block: 0 0 !important;
  padding-inline: 0 0 !important;
  padding: 0 !important;
  justify-items: center !important;
  align-items: center !important;
  margin: 0 !important;
}

.urlbarView-tip-button,
.urlbarView-tip-help {
  margin-block: unset !important;
  height: unset !important;
  min-height: 16px !important;
  max-height: -moz-fit-content !important;
  outline-offset: 0 !important;
}

.urlbarView-tip-button-spacer {
  flex-grow: 0 !important;
  flex-basis: 8px !important;
}

.urlbarView-tip-button {
  padding-inline: 10px !important;
  padding-block: 4px !important;
  margin-inline-end: -3px !important;
  font-size: 0.9em !important;
  background-clip: revert !important;
  min-width: revert !important;
}

.urlbarView-tip-help {
  padding-inline: 3px !important;
  padding-block: 3px !important;
  margin: unset !important;
  margin-block: 0 !important;
  margin-inline: unset !important;
  margin-inline-start: 4px !important;
  margin-inline-end: 13px !important;
  height: 16.5px !important;
  width: 16.5px !important;
  border-radius: var(--tab-button-border-radius, 2px) !important;
  opacity: 1 !important;
  fill-opacity: 1 !important;
  color: var(--urlbar-popup-action-color) !important;
  fill: var(--urlbar-popup-action-color) !important;
}

:is(.urlbarView-tip-help, .urlbarView-tip-button):is(:hover, [selected]) {
  box-shadow: none !important;
}

.urlbarView-row[type="tip"] > .urlbarView-row-inner > .urlbarView-favicon {
  min-width: 16px !important;
  max-width: 16px !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
}

.urlbarView-row .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-title-separator,
.urlbarView-dynamic-weather-titleSeparator,
.urlbarView-dynamic-calculator-action::before,
.urlbarView-dynamic-unitConversion-action::before {
  align-items: center;
  display: none !important;
}

.urlbarView-title-separator::before,
.urlbarView-dynamic-calculator-action::before,
.urlbarView-dynamic-unitConversion-action::before {
  content: "" !important;
  width: 15px;
  height: 2px;
  display: flex;
  color: var(--panel-shortcut-color);
  border-bottom: 1px solid currentColor;
  opacity: 1 !important;
}

.urlbarView-row[dynamicType="calculator"]:hover .urlbarView-dynamic-calculator-action,
.urlbarView-row[dynamicType="unitConversion"]:hover .urlbarView-dynamic-unitConversion-action {
  visibility: visible !important;
}

.urlbarView-row .urlbarView-title,
.urlbarView-row .urlbarView-tag {
  font-weight: var(--urlbar-result-strong-font-weight, 500) !important;
}

.urlbarView-row .urlbarView-title strong,
.urlbarView-row .urlbarView-tag strong {
  font-weight: inherit !important;
}

.urlbarView-row[selected] .urlbarView-title-separator::before,
.urlbarView-row-inner[selected] .urlbarView-dynamic-calculator-action::before,
.urlbarView-dynamic-unitConversion-action::before {
  color: var(--panel-shortcut-focus);
}

.urlbarView-row[has-action] .urlbarView-title strong,
.urlbarView-row[has-action] .urlbarView-title[isurl],
.urlbarView-row[has-action][type="history"] .urlbarView-title:not(:has(strong)),
.urlbarView-row[type="bookmark"]:not([has-url]) .urlbarView-title,
.urlbarView-row[has-url] .urlbarView-title,
.urlbarView-row:not([has-action]) .urlbarView-title:has(strong),
.urlbarView-row .urlbarView-tag,
.urlbarView-row:where([type="tabtosearch"], [type="tokenaliasengine"], [type="tip"]) .urlbarView-title,
/* .urlbarView-row:not([has-url]) .urlbarView-title[data-l10n-id="urlbar-result-action-search-w-engine"], */
.urlbarView-row[type="search_engine"]:not([has-url]) .urlbarView-title,
.urlbarView-tail-prefix,
.urlbarView-dynamic-weather-bottom {
  font-weight: var(--urlbar-result-strong-font-weight, 500) !important;
  font-style: normal !important;
  color: var(--panel-shortcut-color);
}

.urlbarView-dynamic-calculator-input,
.urlbarView-dynamic-unitConversion-output {
  color: var(--panel-shortcut-color);
}

.urlbarView-row:where([type="tabtosearch"], [type="tokenaliasengine"], [type="tip"])[selected] .urlbarView-title,
.urlbarView-row[has-action][selected] .urlbarView-title strong,
.urlbarView-row[has-action][selected] .urlbarView-title[isurl],
.urlbarView-row[has-action][type="history"][selected] .urlbarView-title:not(:has(strong)),
.urlbarView-row[type="bookmark"][selected]:not([has-url]) .urlbarView-title,
.urlbarView-row[has-url][selected] .urlbarView-title,
.urlbarView-row[selected]:not([has-action]) .urlbarView-title:has(strong),
.urlbarView-row:not([has-action]) .urlbarView-row-inner[selected] .urlbarView-title:has(strong),
.urlbarView-row[selected] .urlbarView-tag,
.urlbarView-row[selected]:not([has-url]) .urlbarView-title[data-l10n-id="urlbar-result-action-search-w-engine"],
.urlbarView-row[selected] .urlbarView-tail-prefix,
.urlbarView-row-inner[selected] .urlbarView-dynamic-calculator-input,
.urlbarView-row-inner[selected] .urlbarView-dynamic-unitConversion-output,
.urlbarView-row[selected] .urlbarView-dynamic-weather-bottom {
  color: var(--panel-shortcut-focus);
}

.urlbarView-row[type="switchtab"][selected] .urlbarView-title strong {
  color: var(--toolbar-field-color);
}

.urlbarView-row[has-action] .urlbarView-title[isurl] strong,
.urlbarView-row[type="bookmark"]:not([has-url]) .urlbarView-title strong,
.urlbarView-row[has-url] .urlbarView-title strong,
.urlbarView-row:not([has-action]) .urlbarView-title:has(strong) strong,
.urlbarView-row .urlbarView-tag strong {
  font-weight: var(--urlbar-result-strong-font-weight, 500) !important;
  font-style: normal !important;
  color: var(--toolbar-field-color);
}

.urlbarView-row[rich-suggestion] > .urlbarView-row-inner > .urlbarView-row-body > .urlbarView-row-body-description,
.urlbarView-row[rich-suggestion] > .urlbarView-row-inner > .urlbarView-row-body > .urlbarView-row-body-bottom {
	color: var(--panel-shortcut-color) !important;
  opacity: 0.7;
}

.urlbarView-row[rich-suggestion][selected] > .urlbarView-row-inner > .urlbarView-row-body > .urlbarView-row-body-description,
.urlbarView-row[rich-suggestion][selected] > .urlbarView-row-inner > .urlbarView-row-body > .urlbarView-row-body-bottom {
	color: var(--panel-shortcut-color) !important;
  opacity: 1;
}

.urlbarView-row[sponsored] > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-action {
  color: var(--panel-shortcut-color) !important;
  opacity: 1 !important;
}

.urlbarView-row[rich-suggestion][selected] > .urlbarView-row-inner > .urlbarView-row-body .urlbarView-action,
.urlbarView-row[sponsored] > .urlbarView-row-inner[selected] > .urlbarView-no-wrap > .urlbarView-action {
  color: var(--toolbar-field-color) !important;
  opacity: 1 !important;
}

.urlbarView-button-menu:not(:empty) {
  color: var(--panel-shortcut-focus) !important;
}

.urlbarView-row[selected] > .urlbarView-button-menu:not(:empty) {
  color: inherit !important;
}

.urlbarView-row[has-action] .urlbarView-title[isurl] strong {
  text-decoration: underline !important;
}

.urlbarView-url {
  overflow: hidden;
  color: var(--urlbar-popup-url-color);
  line-height: 1.4;
}

.urlbarView-action[data-l10n-id="urlbar-result-action-visit"] {
  display: none;
}

/* tail suggestions */
.urlbarView-tail-prefix {
  margin-inline-end: calc(0px - var(--urlbar-icon-padding) - 2px) !important;
}

/* get rid of the ... and show the original string */
.urlbarView-tail-prefix > .urlbarView-tail-prefix-string {
  visibility: visible !important;
}

.urlbarView-tail-prefix > .urlbarView-tail-prefix-char {
  visibility: collapse !important;
}

/* instead, replace the favicon with a ... icon */
.urlbarView-row[tail-suggestion] > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-favicon {
  visibility: visible !important;
  box-sizing: border-box !important;
  background: url(chrome://global/skin/icons/more.svg) no-repeat !important;
  width: 16px !important;
  height: 16px !important;
  padding-inline-start: 16px;
}

.urlbarView-url > strong {
  text-decoration: underline !important;
  font-weight: initial !important;
}

/* change some remote page favicons in the urlbar results to match our search engine icons */
.urlbarView-favicon:is([src="page-icon:https://www.google.com/"],
  [src="page-icon:http://google.com/"],
  [src^="page-icon:https://www.google.com/search?"],
  [src^="page-icon:http://google.com/search?"])
{
  box-sizing: border-box !important;
  background: url(chrome://userchrome/content/engines/google-color.svg) no-repeat !important;
  width: 16px !important;
  height: 16px !important;
  padding-inline-start: 16px;
}

.urlbarView-row[engine="Google"]:is([type="tabtosearch"], [type="tokenaliasengine"])
  .urlbarView-favicon,
.urlbarView-row[engine="Google"][type="search"] .urlbarView-favicon[src]:not([src^="chrome"]),
.urlbarView-row[type="tip"] .urlbarView-favicon[src="moz-extension://cd4aad93-9726-49dd-a5cd-9e5f5c4d76f4/favicon.ico"]
{
  box-sizing: border-box !important;
  background: url(chrome://userchrome/content/engines/google.svg) no-repeat !important;
  width: 16px !important;
  height: 16px !important;
  padding-inline-start: 16px;
}

.urlbarView-row[engine="DuckDuckGo"]:is([type="tabtosearch"], [type="tokenaliasengine"]) .urlbarView-favicon,
.urlbarView-row[engine="DuckDuckGo"][type="search"] .urlbarView-favicon[src]:not([src^="chrome"]) {
  box-sizing: border-box !important;
  background: url(chrome://userchrome/content/engines/duckduckgo.svg) no-repeat !important;
  width: 16px !important;
  height: 16px !important;
  padding-inline-start: 16px;
}

.urlbarView-row:not([type="search"]) .urlbarView-favicon[src^="page-icon:http"] {
  &[src*="://en.wikipedia.org/"],
  &[src*="://en.wiktionary.org/"],
  &[src*="://gatherer.wizards.com/"],
  &[src*="://reelgood.com/"],
  &[src*="://kagi.com/"] {
    box-sizing: border-box !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    width: 16px !important;
    height: 16px !important;
    padding-inline-start: 16px;
  }

  &[src*="://en.wikipedia.org/"] {
    background: url(chrome://userchrome/content/engines/wikipedia.svg) no-repeat center/contain !important;
  }

  &[src*="://en.wiktionary.org/"] {
    background: url(chrome://userchrome/content/engines/wiktionary.svg) no-repeat center/contain !important;
  }

  &[src*="://gatherer.wizards.com/"] {
    background: url(chrome://userchrome/content/engines/gatherer.svg) no-repeat center/contain !important;
  }

  &[src*="://reelgood.com/"] {
    background: url(chrome://userchrome/content/engines/reelgood.svg) no-repeat center/contain !important;
  }

  &[src*="://kagi.com/"] {
    background: url(chrome://userchrome/content/engines/kagi.svg) no-repeat center/contain !important;
  }
}

.urlbarView-row:where([type="tabtosearch"], [type="tokenaliasengine"], [type="bookmark"]:not([has-url])):not([selected], [show-action-text], :hover) > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-action {
  display: none;
}

/* I think the slide-in animation looks pretty corny honestly */
.urlbarView-action[slide-in] {
  animation: none !important;
}

#urlbar[breakout][breakout-extend] > .urlbar-input-container,
#urlbar .urlbar-input-container {
  height: var(--urlbar-height) !important;
  padding: 0 !important;
  border-radius: var(--toolbarbutton-border-radius);
}

#urlbar[breakout][breakout-extend],
#urlbar[breakout][breakout-extend-disabled][open] {
  margin-inline: revert !important;
  margin-top: calc((var(--urlbar-container-height) - var(--urlbar-height)) / 2) !important;
  overflow: visible;
  box-shadow: none !important;
  background: none !important;
  transition: none !important;
}

#urlbar[breakout][breakout-extend] {
	width: var(--urlbar-width) !important;
}

.urlbarView {
  margin: 0 !important;
  border: 1px solid transparent !important;
  border-top-width: 0 !important;
  padding: 2px !important;
  width: calc(100% + 10px) !important;
  left: -5px !important;
  right: -5px !important;
  position: relative !important;
  overflow: visible !important;
  top: calc((var(--urlbar-container-height) - var(--urlbar-height)) / 2) !important;
  box-shadow: none !important;
  border-bottom-left-radius: 4px !important;
  border-bottom-right-radius: 4px !important;
}

#urlbar:not([open]) .urlbarView {
  padding-block: 0 !important;
}

.urlbar-background {
  width: calc(100% + 10px) !important;
  top: var(--urlbar-container-height) !important;
  border: var(--searchbar-popup-border) !important;
  border-top-width: 0 !important;
  background: var(--urlbar-results-bgcolor) !important;
  border-radius: var(--searchbar-popup-border-radius) !important;
}

#urlbar {
  &:not([open]),
  &:not([breakout]) {
    .urlbar-background {
      display: none !important;
    }
  }
}

#urlbar[breakout][breakout-extend] .urlbar-background {
  animation-name: urlbar-grow-bg !important;
  animation-timing-function: var(--animation-easing-function) !important;
  animation-duration: 0.1s !important;
  transform-origin: top !important;
  margin: calc(0px - (var(--urlbar-container-height) - var(--urlbar-height)) / 2) -5px !important;
  box-shadow: var(--searchbar-popup-box-shadow) !important;
  /* used to stop the shadow from casting onto the nav-bar. this theme intends
  for the results panel to look like it's sliding out from under the nav-bar like
  paper in a clipboard, rather than an extension of the urlbar as in vanilla
  firefox. but in DOM terms it's not actually under the nav-bar, it's inside the
  urlbar which is in the nav-bar. so in order to create the illusion that it's
  under the nav-bar we cut the shadow off at the boundary of the nav-bar. */
  clip-path: inset(0 -100% -100% -100%);
}

#urlbar[breakout][breakout-extend] .urlbarView {
  animation-name: urlbar-grow-results !important;
  animation-timing-function: ease-out !important;
  animation-duration: 0.1s !important;
}

@keyframes urlbar-grow-bg {
  0% {
    transform: scaleX(0.95) scaleY(0.5);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

@keyframes urlbar-grow-results {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* the animation's framerate can stall when loading really heavy pages.
so you might wanna turn the animation off. I might even make it off by default. */
/* stylelint-disable-next-line media-query-no-invalid */
@media -moz-pref("userChrome.urlbar-results.disable_animation") {
  #urlbar[breakout][breakout-extend] .urlbarView,
  #urlbar[breakout][breakout-extend] .urlbar-background {
    animation: none !important;
    transform-style: flat !important;
    backface-visibility: hidden !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #urlbar[breakout][breakout-extend] .urlbarView,
  #urlbar[breakout][breakout-extend] .urlbar-background {
    animation: none !important;
  }
}

#nav-bar:not([overflowing="true"]) .urlbarView[noresults="true"],
#nav-bar:not([overflowing="true"]) .urlbarView[noresults="true"] .urlbar-results {
  padding-block: 0 !important;
  box-shadow: none !important;
}

.urlbarView-row {
  overflow: hidden !important;
  min-width: 0 !important;
  min-height: 34px !important;
  border: 1px solid transparent !important;
}

.urlbarView-row[label] {
  overflow: revert !important;
  margin-block-start: revert !important;
}

.urlbarView-row[label]::before {
  display: none !important;
  top: -1.3em !important;
  opacity: 1 !important;
  color: var(--panel-description-color) !important;
}

.urlbarView-group-aria-label:empty {
  display: none !important;
}

.urlbarView-row-inner {
  padding-block: 3px !important;
  box-sizing: border-box !important;
  min-height: 34px !important;
  border-radius: var(--arrowpanel-menuitem-border-radius) !important;
  align-items: center !important;
  fill-opacity: 0.8;
  fill: var(--panel-description-color);
}

.urlbarView-row[has-help] > .urlbarView-row-inner {
  width: -moz-available !important;
  flex-grow: 1 !important;
}

.urlbarView-row[firefox-suggest-sponsored] > .urlbarView-row-inner > .urlbarView-no-wrap {
  flex-wrap: nowrap !important;
}

.urlbarView-help {
  box-shadow: none !important;
  outline: none !important;
  fill: var(--panel-description-color) !important;
  fill-opacity: 0.6 !important;
  background-image: url(chrome://userchrome/content/help.svg) !important;
  margin-inline: -31px 0 !important;
  width: 27px !important;
  height: 27px !important;
  box-sizing: border-box !important;
}

/* stylelint-disable-next-line media-query-no-invalid */
@media -moz-pref("userChrome.urlbar-results.hide-help-button") {
  .urlbarView-help {
    display: none !important;
  }
}

.urlbarView-row[has-help]:is([selected], :hover) .urlbarView-help,
.urlbarView-row[has-help] .urlbarView-row-inner[selected] ~ .urlbarView-help {
  fill-opacity: 1 !important;
}

.urlbarView-help:is([selected], :hover) {
  fill-opacity: 1 !important;
  fill: inherit !important;
}

.urlbarView-row[firefox-suggest-sponsored] > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-favicon {
  margin-top: revert !important;
}

.urlbarView-row[firefox-suggest-sponsored] > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-title {
  margin-block: revert !important;
}

.urlbarView-row[firefox-suggest-sponsored] > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-action {
  flex-basis: revert !important;
  margin-block: revert !important;
  margin-inline: 8px 6px !important;
  font-size: 0.85em !important;
  color: var(--urlbar-popup-action-color) !important;
}

.urlbarView-row[rich-suggestion="with-icon"] > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-title {
  line-height: revert !important;
}

.urlbarView-row[rich-suggestion="with-icon"] > .urlbarView-row-inner > .urlbarView-favicon {
	margin-block: 6px !important;
  border-radius: 2px !important;
}

.urlbarView #urlbar-results {
  display: flex;
  flex-flow: column nowrap;
  align-items: stretch;
  background: none !important;
  border-bottom-left-radius: 4px !important;
  border-bottom-right-radius: 4px !important;
  padding: 2px !important;
}

.urlbarView-results[wrap] > .urlbarView-row > .urlbarView-row-inner {
  flex-wrap: revert !important;
}

.urlbarView-results[wrap] > .urlbarView-row[has-url] > .urlbarView-row-inner {
  flex-wrap: wrap !important;
}

.urlbarView-results[wrap] > .urlbarView-row[has-url] > .urlbarView-row-inner > .urlbarView-url:-moz-locale-dir(ltr) {
  padding-left: calc(var(--urlbarView-item-inline-padding) + 0.5px + 16px) !important;
  margin-inline-start: 0 !important;
}

.urlbarView-results[wrap] > .urlbarView-row[has-url]:is([type="switchtab"], [type="bookmark"], [type="remotetab"], [type="dynamic"], [pinned]) > .urlbarView-row-inner > .urlbarView-url:-moz-locale-dir(ltr) {
  padding-left: calc(var(--urlbarView-item-inline-padding) + 0.5px + 16px) !important;
  margin-inline-start: 0 !important;
  /* the following will anchor the url to the text, even when there are 2 icons.
  it doesn't look as good as it sounds. */
  /* padding-left: calc(
    var(--urlbarView-item-inline-padding) + 0.5px + 16px + calc(var(--urlbar-icon-padding) + 2px) +
      16px
  ) !important; */
}

.urlbarView-results[wrap] > .urlbarView-row[has-url] > .urlbarView-row-inner > .urlbarView-url,
.urlbarView-results[wrap] > .urlbarView-row[type="bestmatch"] > .urlbarView-row-inner > .urlbarView-row-body > .urlbarView-row-body-top > .urlbarView-url {
  margin-top: revert !important;
}

.urlbarView-results[wrap] .urlbarView-row:is([type="remotetab"], [sponsored]):not([selected], :hover) > .urlbarView-row-inner > .urlbarView-url {
  visibility: visible !important;
}

.urlbarView-results[wrap] .urlbarView-row[has-url]:is([type="remotetab"], [sponsored]) > .urlbarView-row-inner > .urlbarView-no-wrap > .urlbarView-action {
  display: flex !important;
}

.urlbarView:not([actionoverride]) .urlbarView-results[wrap] .urlbarView-row[has-url]:is([type="remotetab"], [sponsored]) > .urlbarView-row-inner > .urlbarView-url {
  display: none !important;
}
