xpi/content/css/alt_autocomplete.css
@import url(chrome://ctraddon_os_special/skin/alt_autocompleteextra.css);
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

@-moz-document url(chrome://browser/content/browser.xul) {

	/* Firefox 48/49 popup code */
	panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete),
	#PopupAutoCompleteRichResult[autocompleteinput="urlbar"] {
	  -moz-binding: url("chrome://classic_theme_restorer/content/urlbarBindings.xml#urlbar-rich-result-popup") !important;
	}

	/* Firefox 48/49 richlist item code */
	panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistitem,
	#PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistitem {
	  -moz-binding: url("chrome://classic_theme_restorer/content/urlbarBindings.xml#autocomplete-richlistitem") !important;
	}
	
	/* Firefox 50 popup code (50b1 not supported anymore) */
	#main-window[fx50plus="true"] panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete),
	#main-window[fx50plus="true"] #PopupAutoCompleteRichResult[autocompleteinput="urlbar"] {
	  -moz-binding: url("chrome://classic_theme_restorer/content/urlbarBindings50.xml#urlbar-rich-result-popup") !important;
	}

	/* Firefox 50 richlist item code (50b1 not supported anymore) */
	#main-window[fx50plus="true"] panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistitem,
	#main-window[fx50plus="true"] #PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistitem {
	  -moz-binding: url("chrome://classic_theme_restorer/content/urlbarBindings50.xml#autocomplete-richlistitem") !important;
	}
	
	/* Firefox 54 popup code */
	#main-window[fx54plus="true"] panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete),
	#main-window[fx54plus="true"] #PopupAutoCompleteRichResult[autocompleteinput="urlbar"] {
	  -moz-binding: url("chrome://classic_theme_restorer/content/urlbarBindings54.xml#urlbar-rich-result-popup") !important;
	}

	/* Firefox 54 richlist item code */
	#main-window[fx54plus="true"] panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistitem,
	#main-window[fx54plus="true"] #PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistitem {
	  -moz-binding: url("chrome://classic_theme_restorer/content/urlbarBindings54.xml#autocomplete-richlistitem") !important;
	}
	
	/* Firefox 55 popup code */
	#main-window[fx55plus="true"] panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete),
	#main-window[fx55plus="true"] #PopupAutoCompleteRichResult[autocompleteinput="urlbar"] {
	  -moz-binding: url("chrome://classic_theme_restorer/content/urlbarBindings55.xml#urlbar-rich-result-popup") !important;
	}

	/* Firefox 55 richlist item code */
	#main-window[fx55plus="true"] panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistitem,
	#main-window[fx55plus="true"] #PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistitem {
	  -moz-binding: url("chrome://classic_theme_restorer/content/urlbarBindings55.xml#autocomplete-richlistitem") !important;
	}
	
	/* Basilisk browser support - Basilisk shows itself as Fx55, but uses Fx52 code for location bars popup */
	#main-window[fx55plus="true"][title_normal="Basilisk"] panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) ,
	#main-window[fx55plus="true"][title_normal="Basilisk"] #PopupAutoCompleteRichResult[autocompleteinput="urlbar"] {
	  -moz-binding: url("chrome://classic_theme_restorer/content/urlbarBindings50.xml#urlbar-rich-result-popup") !important;
	}
	#main-window[fx55plus="true"][title_normal="Basilisk"] panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistitem,
	#main-window[fx55plus="true"][title_normal="Basilisk"] #PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistitem {
	  -moz-binding: url("chrome://classic_theme_restorer/content/urlbarBindings50.xml#autocomplete-richlistitem") !important;
	}

	/* restyle popup items */
	panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistitem,
	#PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistitem {
	  -moz-box-orient: vertical !important;
	  min-height: unset !important;
	  height: unset !important;
	  max-height: unset !important;
	  padding: 4px 0px !important;
	  border-radius: 0 !important;
	}

	panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistitem .ac-separator,
	#PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistitem .ac-separator {
	  display:none !important;
	  visibility: collapse !important;
	}

	panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistitem :-moz-any(.ac-site-icon,.ac-title,.ac-action,.ac-url),
	#PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistitem :-moz-any(.ac-site-icon,.ac-title,.ac-action,.ac-url){
	  -moz-margin-start: unset !important;
	  -moz-margin-end: unset !important;
	  -moz-padding-start: unset !important;
	  -moz-padding-end: unset !important;
	}

	panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistitem .ac-type-icon,
	#PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistitem .ac-type-icon {
	  margin-inline-start: 4px !important;
	  margin-inline-end: 4px !important;
	}

	panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistitem .ac-site-icon,
	#PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistitem .ac-site-icon {
	  -moz-margin-start: 4px !important;
	}

	panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistitem .ac-title,
	#PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistitem .ac-title{
	  -moz-margin-start: 5px !important;
	  margin-top: -3px !important;
	}
	
	panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistitem :-moz-any(.ac-url, .ac-action),
	#PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistitem :-moz-any(.ac-url, .ac-action){
	  -moz-margin-start: 25px !important;
	  margin-top: 1px !important;
	}
	
	panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistitem .ac-url,
	#PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistitem .ac-url{
	  padding-bottom: 1px !important;
	}

	panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistitem .ac-action[actiontype=searchengine]:not([selected]),
	#PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistitem .ac-action[actiontype=searchengine]:not([selected]) {
	  display: block !important;
	}
	
	#main-window:not([fx51plus="true"]) panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .search-one-offs,
	#main-window:not([fx51plus="true"]) #PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .search-one-offs {
	  visibility: collapse !important;
	  display: none !important;
	}
	
	@media all and (-moz-windows-classic) {
	  panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistitem .ac-title,
	  #PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistitem .ac-title {
		padding-top: 2px !important;
		padding-bottom: 2px !important;
	  }

	  panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistbox,
	  #PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistbox {
		padding: 0 !important;
	  }
	}
	
	panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) .autocomplete-richlistitem #ibox-spacer,
	#PopupAutoCompleteRichResult[autocompleteinput="urlbar"] .autocomplete-richlistitem #ibox-spacer {
	  width: 100000px !important;
	}
	
	#main-window[fx55plus="true"] panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) hbox[anonid="search-suggestions-notification"],
	#main-window[fx55plus="true"] #PopupAutoCompleteRichResult[autocompleteinput="urlbar"] hbox[anonid="search-suggestions-notification"] {
	  display: none !important;
	}
	
	panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) deck[search-suggestions-notification],
	#PopupAutoCompleteRichResult[autocompleteinput="urlbar"] deck[search-suggestions-notification] {
	  display: none !important;
	}
	
	/* Fx 56 tweaks */
	#main-window[fx56plus="true"] panel[type="autocomplete-richlistbox"]:not(#PopupAutoComplete) scrollbox,
	#main-window[fx56plus="true"] #PopupAutoCompleteRichResult[autocompleteinput="urlbar"] scrollbox{
	  overflow-y: auto !important;
	}

}