@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

/* =========== */
/* fix tab bar */
/* =========== */
.tab-close-button { -moz-box-ordinal-group: 1 !important; margin-left: -2px !important; }
.tab-text { -moz-box-ordinal-group: 2 !important; }
.tab-throbber { -moz-box-ordinal-group: 3 !important; }
.tab-icon-image { -moz-box-ordinal-group: 4; } 
.tabbrowser-tab:not([pinned]) .tab-icon-image { visibility: hidden !important; }

/* hide app tab arrows (TabUtils work-around, maybe not needed?) */
#PinnedTabsBarChevron {
    display: none !important;
}

/* hide tab close buttons */
.tab-close-button           { visibility: hidden !important; }
tab:hover .tab-close-button { visibility: visible !important; }


/* ======================== */
/* fix back/forward buttons */
/* ======================== */
#back-button > .toolbarbutton-icon,
#forward-button > .toolbarbutton-icon {
    margin-bottom: -1px !important;
}

#back-button,
#forward-button {
    min-width:      26px !important;
    max-width:      26px !important;
    height:         22px !important;
    max-height:     22px !important;
    padding-left:   0px !important;
    padding-right:  0px !important;
    padding-bottom: 0px !important;
}

#forward-button {
    min-width:      27px !important;
    padding-right:  1px !important;
}


/* =========== */
/* fix URL bar */
/* =========== */
/* hide identity labels for verified domains */
#identity-icon-labels {
    display: none !important;
}

/* hide drop marker */
#urlbar .autocomplete-history-dropmarker {
    display: none !important;
}


/* ================ */
/* fix 'AwesomeBar' */
/* ================ */
/* border colour */
.autocomplete-richlistitem:not(:first-child) {
    border-top: 1px solid #e6e6e6 !important;
}

/* hide tags */
#PopupAutoCompleteRichResult .ac-extra {
	display: none !important;
}

/* URL text colour */
#PopupAutoCompleteRichResult .ac-url-text {
    color: #959595 !important;
}
#PopupAutoCompleteRichResult .ac-url-text[selected="true"] {
    color: white !important;
}

/* menu selection */
.autocomplete-richlistitem[selected="true"],
treechildren.autocomplete-treebody::-moz-tree-row(selected) {
    text-shadow: rgba(000, 000, 000, 0.15) 0 1px !important;
    background:  -moz-linear-gradient(top, #5c7efc, #0f49fb) repeat-x !important;
}

.autocomplete-richlistitem[selected="true"]:not(:first-child),
treechildren.autocomplete-treebody::-moz-tree-row(selected) {
    border-top: 1px solid #5275f3 !important;
}


/* ============== */
/* fix search bar */
/* ============== */
/* disable favicon */
.searchbar-engine-image {
    visibility: hidden !important;
    width:      9px !important;
}

/* set icon to magnifying glass */
.searchbar-textbox > .autocomplete-textbox-container  {
    background-image:    url("chrome://browser/skin/Search.png") !important;
    background-position: 4px 4px !important;
    background-repeat:   no-repeat !important;
}

/* hide go button */
.search-go-button {
    display: none !important;
}


/* ================= */
/* fix bookmarks bar */
/* ================= */

/* reduce tool-bar padding */
#PersonalToolbar {
	margin-top: -1px !important;
	padding:    0px 6px 0px 2px !important;
}

/* reduce bookmark padding */
#PlacesToolbarItems > .bookmark-item {
	max-height: 16px !important;
	margin-bottom: 3px !important;
	padding:       1px 9px !important;
}

/* hide favicons */
#PlacesToolbarItems > .bookmark-item > .toolbarbutton-icon {
	display: none !important;
}

/* reduce drop-marker padding */
#PlacesToolbarItems > .bookmark-item > .toolbarbutton-menu-dropmarker {
	margin-left: 1px !important;
	padding-top: 1px !important;
}

/* hide Bookmarks menu */
#bookmarks-menu-button { display: none !important; }

/* reduce menu text size, menu max width  */
#personal-bookmarks menu,
#personal-bookmarks menuitem  {
    max-width: 460px !important;
    font-size: 10pt !important;
}


/* ========================= */
/* hide bull shit from menus */
/* ========================= */
/* hide 'Open All in Tabs' + separator */
menuitem[label="Open All in Tabs"], .bookmarks-actions-menuseparator {
    display: none !important;
}

/* hide empty menu separator on bookmarks bar */
#placesContext menuitem[hidden="true"] + menuseparator:nth-of-type(1) {
    display: none !important;
}

#context-sendlink, 
menuitem[label="Send Link…"],
menuitem[label^="Open Selected Links in New Tabs"] {
    display: none !important;
}

/* hide 'Open in Background/Foreground Tab' when not needed */
#context-openlinkintab[hidden="true"] ~ #context-openlinkinbackgroundtab,
#context-openlinkintab[hidden="true"] ~ #context-openlinkinforegroundtab {
	display: none !important;
}

/* hide menu icons */
menu#tools-menu * .menu-iconic,
menu#tools-menu * .menuitem-iconic {
    list-style-image: none !important;
}