/***!Important*** Dropped Firefox 4 support, for style to work properly update browser to the latest Firefox or up to the latest Fx 14 builds, userstyle for Fx 15+ builds or newer found here: http://userstyles.org/styles/45809/  ***/

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

/* Tab bar left and right padding */
/* Adjust according to the size of your Firefox button and window controls */

#main-window:not([inFullscreen]) #TabsToolbar { 
  -moz-padding-start: 0.05em !important;
  -moz-padding-end: 0.1em !important;
}

.titlebar-placeholder[type="caption-buttons"] {
  -moz-margin-start: 10px !important;
}

.titlebar-placeholder[type="appmenu-button"] {
  -moz-margin-start: -3px !important;
}

/* Re-size "Windows caption controls" */

#titlebar-restore:-moz-system-metric(windows-default-theme),
#titlebar-restore:-moz-system-metric(windows-theme-luna-blue),
#titlebar-restore:-moz-system-metric(windows-theme-luna-olive),
#titlebar-restore:-moz-system-metric(windows-theme-luna-silver),
#titlebar-restore:-moz-system-metric(windows-theme-royale),
#titlebar-restore:-moz-system-metric(windows-theme-zune),
#titlebar-max:-moz-system-metric(windows-default-theme),
#titlebar-max:-moz-system-metric(windows-theme-luna-blue),
#titlebar-max:-moz-system-metric(windows-theme-luna-olive),
#titlebar-max:-moz-system-metric(windows-theme-luna-silver),
#titlebar-max:-moz-system-metric(windows-theme-royale),
#titlebar-max:-moz-system-metric(windows-theme-zune),
#titlebar-min:-moz-system-metric(windows-default-theme),
#titlebar-min:-moz-system-metric(windows-theme-luna-blue),
#titlebar-min:-moz-system-metric(windows-theme-luna-olive),
#titlebar-min:-moz-system-metric(windows-theme-luna-silver),
#titlebar-min:-moz-system-metric(windows-theme-royale),
#titlebar-min:-moz-system-metric(windows-theme-zune),
#titlebar-close:-moz-system-metric(windows-default-theme),
#titlebar-close:-moz-system-metric(windows-theme-luna-blue),
#titlebar-close:-moz-system-metric(windows-theme-luna-olive),
#titlebar-close:-moz-system-metric(windows-theme-luna-silver),
#titlebar-close:-moz-system-metric(windows-theme-royale),
#titlebar-close:-moz-system-metric(windows-theme-zune) {
  margin-left: -0.3em !important;
  -moz-transform:  scale(.87,.81) !important;
}

/* Style and Reposition Firefox App Button when non-maximized */

#main-window[sizemode="normal"] #appmenu-button {
  margin-top: 7px !important;
  margin-left: 2px !important;
  padding: 3px 5px !important;
  border-radius: 4px !important;
  -moz-appearance: none !important;
  background-color: transparent !important;
  background: none !important;
}

#main-window[sizemode="normal"][privatebrowsingmode] #appmenu-button:hover,
#main-window[sizemode="normal"][privatebrowsingmode] #appmenu-button[open] {
  background-image: -moz-linear-gradient(rgba(153,38,211,1), rgba(105,19,163,1)) !important;
}

#main-window:not([privatebrowsingmode])[sizemode="normal"] #appmenu-button:hover,
#main-window:not([privatebrowsingmode])[sizemode="normal"] #appmenu-button[open] {
  background-image: -moz-linear-gradient(rgba(247,182,82,1), rgba(215,98,10,1))  !important;
}

#main-window:not([privatebrowsingmode])[sizemode="normal"][titlemodifier="Nightly"] #appmenu-button:hover,
#main-window:not([privatebrowsingmode])[sizemode="normal"][titlemodifier="Nightly"] #appmenu-button[open] {
  background-image: -moz-radial-gradient(center bottom, farthest-side, hsla(210,48%,90%,.5) 10%, hsla(210,48%,90%,0) 70%),
                    -moz-radial-gradient(center bottom, farthest-side, hsla(211,70%,83%,.5), hsla(211,70%,83%,0)),
                    -moz-linear-gradient(hsl(211,33%,32%), hsl(209,53%,10%) 95%) !important;
  border-color: hsla(210,59%,13%,.9) !important;
  box-shadow: 0 1px 0 hsla(210,48%,90%,.15) inset,
              0 0 2px 1px hsla(210,48%,90%,.4) inset,
              0 -1px 0 hsla(210,48%,90%,.2) inset !important;
}

#main-window:not([privatebrowsingmode])[sizemode="normal"][titlemodifier="Aurora"] #appmenu-button:hover,
#main-window:not([privatebrowsingmode])[sizemode="normal"][titlemodifier="Aurora"] #appmenu-button[open] {
  background-image: -moz-radial-gradient(center bottom, farthest-side, hsla(202,100%,85%,.5) 10%, hsla(202,100%,85%,0) 70%),
                    -moz-radial-gradient(center bottom, farthest-side, hsla(205,100%,72%,.7), hsla(205,100%,72%,0)),
                    -moz-linear-gradient(hsl(208,98%,34%), hsl(213,87%,20%) 95%) !important;
  border-color: hsla(214,89%,21%,.9) !important;
  box-shadow: 0 1px 0 hsla(205,100%,72%,.15) inset,
              0 0 2px 1px hsla(205,100%,72%,.5) inset,
              0 -1px 0 hsla(205,100%,72%,.2) inset !important;
}

/* Style and Reposition Firefox App Button when maximized */

window[sizemode="maximized"] #titlebar-content {
  margin-top: -3px !important;
}

#main-window[sizemode="maximized"][tabsontop="false"] #appmenu-button {
  margin-top: 4px !important;
  margin-left: 2px !important;
  padding: 3px 5px !important;
  border-radius: 4px !important;
  -moz-appearance: none !important;
  background-color: transparent !important;
  background: none !important;
}

#main-window[sizemode="maximized"][privatebrowsingmode] #appmenu-button:hover,
#main-window[sizemode="maximized"][privatebrowsingmode] #appmenu-button[open] {
  background-image: -moz-linear-gradient(rgba(153,38,211,1), rgba(105,19,163,1)) !important;
}

#main-window[tabsontop="true"][sizemode="maximized"][privatebrowsingmode][tabsintitlebar="true"] #appmenu-button:not(:-moz-window-inactive) {
  background-image: -moz-linear-gradient(rgba(153,38,211,.5), rgba(105,19,163,.2)) !important;
}

#main-window[tabsontop="true"][sizemode="maximized"][privatebrowsingmode]:not([tabsintitlebar="true"]) #appmenu-button:not(:-moz-window-inactive):hover,
#main-window[tabsontop="true"][sizemode="maximized"][privatebrowsingmode]:not([tabsintitlebar="true"]) #appmenu-button:not(:-moz-window-inactive)[open]{
  background-image: -moz-linear-gradient(rgba(153,38,211,1), rgba(105,19,163,1)) !important;
}

#main-window:not([privatebrowsingmode])[sizemode="maximized"]:not([tabsintitlebar="true"]) #appmenu-button:hover,
#main-window:not([privatebrowsingmode])[sizemode="maximized"]:not([tabsintitlebar="true"]) #appmenu-button[open] {
  background-image: -moz-linear-gradient(rgba(247,182,82,1), rgba(215,98,10,1))  !important;
}


#main-window:not([privatebrowsingmode])[sizemode="maximized"][titlemodifier="Nightly"]:not([tabsintitlebar="true"]) #appmenu-button:hover,
#main-window:not([privatebrowsingmode])[sizemode="maximized"][titlemodifier="Nightly"]:not([tabsintitlebar="true"]) #appmenu-button[open] {
  background-image: -moz-radial-gradient(center bottom, farthest-side, hsla(210,48%,90%,.5) 10%, hsla(210,48%,90%,0) 70%),
                    -moz-radial-gradient(center bottom, farthest-side, hsla(211,70%,83%,.5), hsla(211,70%,83%,0)),
                    -moz-linear-gradient(hsl(211,33%,32%), hsl(209,53%,10%) 95%) !important;
  border-color: hsla(210,59%,13%,.9) !important;
  box-shadow: 0 1px 0 hsla(210,48%,90%,.15) inset,
              0 0 2px 1px hsla(210,48%,90%,.4) inset,
              0 -1px 0 hsla(210,48%,90%,.2) inset !important;
}

#main-window:not([privatebrowsingmode])[sizemode="maximized"][titlemodifier="Aurora"]:not([tabsintitlebar="true"]) #appmenu-button:hover,
#main-window:not([privatebrowsingmode])[sizemode="maximized"][titlemodifier="Aurora"]:not([tabsintitlebar="true"]) #appmenu-button[open] {
  background-image: -moz-radial-gradient(center bottom, farthest-side, hsla(202,100%,85%,.5) 10%, hsla(202,100%,85%,0) 70%),
                    -moz-radial-gradient(center bottom, farthest-side, hsla(205,100%,72%,.7), hsla(205,100%,72%,0)),
                    -moz-linear-gradient(hsl(208,98%,34%), hsl(213,87%,20%) 95%) !important;
  border-color: hsla(214,89%,21%,.9) !important;
  box-shadow: 0 1px 0 hsla(205,100%,72%,.15) inset,
              0 0 2px 1px hsla(205,100%,72%,.5) inset,
              0 -1px 0 hsla(205,100%,72%,.2) inset !important;
}

#main-window[tabsontop="true"][sizemode="maximized"][tabsintitlebar="true"] #appmenu-button {
  padding: 7px 0 0 7px !important;
  min-width: 0 !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

#main-window[tabsontop="true"][sizemode="maximized"][tabsintitlebar="true"] #appmenu-button .button-icon {
  list-style-image: url("chrome://branding/content/icon16.png");
}

#main-window[tabsontop="true"][sizemode="maximized"]:not([tabsintitlebar="true"])
#appmenu-button {
  margin-top: 4px !important;
  margin-left: 2px !important;
  padding: 3px 5px !important;
  border-radius: 4px !important;
  -moz-appearance: none !important;
  background-color: transparent !important;
  background: none !important;
}

#main-window[tabsontop="true"][sizemode="maximized"][tabsintitlebar="true"] #appmenu-button:-moz-window-inactive {
  background: none !important;
}

#main-window[tabsontop="true"][sizemode="maximized"][tabsintitlebar="true"] #appmenu-button .button-text,
#main-window[tabsontop="true"][sizemode="maximized"][tabsintitlebar="true"] #appmenu-button .button-menu-dropmarker { 
  display:none !important;
}

#main-window[tabsontop="true"][sizemode="maximized"] #appmenu-button-container { 
     position: fixed !important;
     margin-top: 0 !important;
     width:32px !important;
}

/* Move the tab bar in the title bar when maximized */

#main-window[tabsontop="true"][sizemode="maximized"]:not([inFullscreen]) #TabsToolbar {
  margin-top: -7px !important;
  -moz-box-ordinal-group: 10 !important;
}

#main-window[tabsontop="false"][sizemode="maximized"]:not([inFullscreen]) #TabsToolbar {
  margin-top: -0px !important;
  -moz-box-ordinal-group: 100 !important;
}

#main-window[tabsontop="true"]:not([inFullscreen]) #appmenu-button-container { 
  position: fixed !important;
  z-index: 1;
}

#main-window[tabsontop="true"]:not([inFullscreen]) #titlebar-buttonbox { 
  position: relative !important;
  z-index: 1;
}

#main-window[tabsontop="true"]:not([inFullscreen]) #TabsToolbar { 
  position: relative !important;
  background-color: transparent !important;
}

#main-window[tabsontop="true"][sizemode="maximized"]:not([inFullscreen]) #toolbar-menubar {
  padding-bottom: 7px !important;
}

#toolbar-menubar toolbarbutton, #toolbar-menubar dropmarker {
  background: transparent none !important;
  border: none 0 transparent !important;
  -moz-appearance: none !important;
}

/* Fix tab styling for the dark background */

#main-window[chromemargin]:not([inFullscreen]) #alltabs-button[type="menu"] {
  list-style-image: url("chrome://browser/skin/appmenu-dropmarker.png") !important;
  -moz-image-region: rect(0, 9px, 7px, 0) !important;
}

#main-window[chromemargin]:not([inFullscreen]) #alltabs-button[type="menu"] image {
  opacity: 0.7 !important;
  margin-top: 4px !important;
}

#main-window[chromemargin]:not([inFullscreen]) .tabbrowser-tab:not([selected="true"]),
#main-window[chromemargin]:not([inFullscreen]) .tabs-newtab-button {  
  background-image: -moz-linear-gradient(hsla(0,0%,80%,.6), hsla(0,0%,75%,.4) 50%, hsla(0,0%,70%,.4) 51%) !important;
  text-shadow: white 0 0 1px;
}

#main-window[chromemargin]:not([inFullscreen]) .tabbrowser-tab:not([selected="true"]):hover,
#main-window[chromemargin]:not([inFullscreen]) .tabs-newtab-button:hover {  
  background-image: -moz-linear-gradient(hsla(0,0%,100%,.8), hsla(0,0%,90%,.6) 50%, hsla(0,0%,85%,.6) 51%) !important;
}

#main-window[chromemargin]:not([inFullscreen]) .tabbrowser-tab[pinned][titlechanged]:not([selected="true"]) {
  background-image: -moz-radial-gradient(40% 3px, circle cover, rgba(255,255,255,1) 2%, rgba(186,221,251,.75) 25%, rgba(127,179,255,.5) 50%, rgba(127,179,255,.25)) !important;
}
#main-window[chromemargin]:not([inFullscreen]) .tabbrowser-tab[pinned][titlechanged]:not([selected="true"]):hover {
  background-image: -moz-linear-gradient(hsla(0,0%,100%,.4), hsla(0,0%,75%,.4) 50%),
                    -moz-radial-gradient(40% 3px, circle cover, rgba(255,255,255,1) 2%, rgba(186,221,251,.75) 25%, rgba(127,179,255,.5) 50%, rgba(127,179,255,.25)) !important;
}

/* Fx branding logo as default favicon on New/Blank tabs and bookmarked sites that do not have a favicon */

tab .tab-icon-image:not([src]), #urlbar #page-proxy-favicon:not([src]), 
toolbarbutton[class="bookmark-item"][scheme="http"]:not([src]),
toolbarbutton[class="bookmark-item"][scheme="https"]:not([src]),
toolbarbutton[class="bookmark-item"][scheme="ftp"]:not([src]),
toolbarbutton[class="bookmark-item"][scheme="about"]:not([src]),
toolbarbutton[class="bookmark-item"][scheme="javascript"]:not([src]),
menuitem[class="menuitem-iconic bookmark-item menuitem-with-favicon"]:not([src]),
.sidebar-placesTreechildren::-moz-tree-image(leaf) {
list-style-image: url("chrome://branding/content/icon16.png") !important;
-moz-image-region: auto !important;
}

/* Fx branding logo favicon for sites that do not have a favicon listed in Urlbar Awesome Bar drop-down results */

#PopupAutoCompleteRichResult .ac-site-icon[src="chrome://mozapps/skin/places/defaultFavicon.png"]
{width: 0 !important;
padding-right: 16px !important;
background-image: url("chrome://branding/content/icon16.png") !important;
}

/* Applies the Default Livemark Icons to bookmarked RSS Feed sites - Bug 731459 */

.bookmark-item[container][livemark] .bookmark-item,
.sidebar-placesTreechildren::-moz-tree-image(title, livemarkItem) {
   list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAQCAYAAAB3AH1ZAAADJklEQVR42q1VW0hUURQNSQQRQSSLWyKEGUqBUp8SQuBP9BdEH/0E1k/1WV9RVFpkqaOmic80H+Uj0xBKEBKzByOkhEEQvlKbO0/PvO6MOqu1B4lqJjX0Y7HP3netOWvvczizA4NHdhK7iMNELpG3AcghVzSiBXZsBWIgBQMHr6Ev9SteaGpTIFc0ot0OAzno3bsYmutaXl3xYDMQrmhEux0GjqFbU0FDh2H4ELCPwwgurwvhika0v/9YRVN3LJHxvwby0Kkpw7eIgGUU6NfCWB09jeBMD/yGAX9g+Q8IVzSi/ctANmFew0Min4jZ2ECHpnzeBfjcOoKTxVj5eJ4mDgA9NPIqF37rBLxG8BeES000A4lEAVFU3tg1XN7QaTY1dHYzpq9voFVTXvc8PB4PfNYv8PgC8CobgmO3gHYNoZ4s+CwTUg9DuNREMxBLpMm6rO5pQmltx8WS2nYz4xDz9H8baNaU2/0d3vmRcNeh54cQ+HAD7iUH/BP1wGNOoudoOFdeA8KlJuoRmNh1aV3H4IOatsvFj57EF1e3nGI0M3/Jenx0A42aUmoOS85F+D/dx8rACaCBm7bnsqYjMHgpnPvHq+Hy+CFcaiIMcOyJ7PQcN2u4V9VsvlvZ1H2nojGB8brkrJ+JbqBOUy7XLBzKB6fTAYdrCZ7PnUCFBuP1VbgsMwjV7cdK7/EwR7jURBgQcNxx7DiWm+YXmurNt8tqrzAmM3/Lelt0AzWacjpn4dSnEOrKwmpHDhx2GwJ9BQhVZMHuciPQf1a6JmcGwqUmwgDHn8IzH+LYB9h5PDcvullSM8QYw7yEdTO/J0caqNKU3TEDu5WjfZaGUGs6bNYfcI+1ACYNjrlJeEeKwnfBNfUGwqUmwgBvexIn8I6dDrPjBHZ+kpubGVOZX2BdLmR25ENUqSmrfRoWpwdWyyys+nx4reuLsH97D91mY30e9mmuORnhUhPxEK3d/iSedaKsxQQ7z2SM4x1IZD2T3+Min+LKfQuu8dZl3TaFzUC4otmup3g3WjMKYeLbXqqpTYFc0Yh2OwzEEnukGxnpxn/H5JArGtFu1cBPC6/HN/27sdEAAAAASUVORK5CYII=")!important;
   -moz-image-region: rect(0px, 16px, 16px, 0px)!important;
}

.bookmark-item[container][livemark] .bookmark-item[visited="true"],
.sidebar-placesTreechildren::-moz-tree-image(title, livemarkItem, visited)  {
   list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAQCAYAAAB3AH1ZAAADJklEQVR42q1VW0hUURQNSQQRQSSLWyKEGUqBUp8SQuBP9BdEH/0E1k/1WV9RVFpkqaOmic80H+Uj0xBKEBKzByOkhEEQvlKbO0/PvO6MOqu1B4lqJjX0Y7HP3netOWvvczizA4NHdhK7iMNELpG3AcghVzSiBXZsBWIgBQMHr6Ev9SteaGpTIFc0ot0OAzno3bsYmutaXl3xYDMQrmhEux0GjqFbU0FDh2H4ELCPwwgurwvhika0v/9YRVN3LJHxvwby0Kkpw7eIgGUU6NfCWB09jeBMD/yGAX9g+Q8IVzSi/ctANmFew0Min4jZ2ECHpnzeBfjcOoKTxVj5eJ4mDgA9NPIqF37rBLxG8BeES000A4lEAVFU3tg1XN7QaTY1dHYzpq9voFVTXvc8PB4PfNYv8PgC8CobgmO3gHYNoZ4s+CwTUg9DuNREMxBLpMm6rO5pQmltx8WS2nYz4xDz9H8baNaU2/0d3vmRcNeh54cQ+HAD7iUH/BP1wGNOoudoOFdeA8KlJuoRmNh1aV3H4IOatsvFj57EF1e3nGI0M3/Jenx0A42aUmoOS85F+D/dx8rACaCBm7bnsqYjMHgpnPvHq+Hy+CFcaiIMcOyJ7PQcN2u4V9VsvlvZ1H2nojGB8brkrJ+JbqBOUy7XLBzKB6fTAYdrCZ7PnUCFBuP1VbgsMwjV7cdK7/EwR7jURBgQcNxx7DiWm+YXmurNt8tqrzAmM3/Lelt0AzWacjpn4dSnEOrKwmpHDhx2GwJ9BQhVZMHuciPQf1a6JmcGwqUmwgDHn8IzH+LYB9h5PDcvullSM8QYw7yEdTO/J0caqNKU3TEDu5WjfZaGUGs6bNYfcI+1ACYNjrlJeEeKwnfBNfUGwqUmwgBvexIn8I6dDrPjBHZ+kpubGVOZX2BdLmR25ENUqSmrfRoWpwdWyyys+nx4reuLsH97D91mY30e9mmuORnhUhPxEK3d/iSedaKsxQQ7z2SM4x1IZD2T3+Min+LKfQuu8dZl3TaFzUC4otmup3g3WjMKYeLbXqqpTYFc0Yh2OwzEEnukGxnpxn/H5JArGtFu1cBPC6/HN/27sdEAAAAASUVORK5CYII=")!important;
   -moz-image-region: rect(0px, 32px, 16px, 16px)!important;
}

/* Fix tab styling due to Bug 570279  */

    .tabbrowser-tab,
.tabs-newtab-button {
background-size: 100% -moz-calc(100% - 2px) !important;
-moz-border-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAXCAQAAACVbWY0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sCCgw7Ce0kW7AAAAACYktHRAAAqo0jMgAAAOVJREFUKJGdUMEKgkAQfc5ukZQoHoJAMaJL4LGP6Rbdo3N/0J/1A32Al055SKGUYtPGJEg2OzSPgdl5vLczQwAMCHRhoo8Bp8m1gEHclvzwEWL+Qsi1CUnM9jBzgp2KLuU1uuyUE2CGHqED37EOyTYbxziO4212SIY2fGKj0Sb1UqS4o+Tken3GqCKsZY6cm2/kqxwWgc0mCuqDUJ5Cp57qgaKBRzVVZVZokPRar9QgaqtWhU78UlRHyYzrJ5DVCgE9/iToC0H1518Voo2wpaH3JRtN3RPfphmlG5O8Lfa8aTOKxf4JITp52BrKXVUAAAAASUVORK5CYII=") 4 5 3 6 / 4px 5px 3px 6px stretch !important;
border-radius: 10px 8px 0 0!important;
padding: 0 !important;
}

.tabbrowser-tab[pinned] .tab-reload-icon,
.tabbrowser-tab[pinned] .tab-protect-icon,
.tabbrowser-tab[pinned] .tab-lock-icon,
.tabbrowser-tab[pinned] .tab-icon-image,
.tabbrowser-tab[pinned] .tab-throbber {
margin-right: 2px !important;
margin-left: 2px !important;
}

.tab-close-button[selected="true"] {
-moz-user-focus: normal !important;
}

.tabbrowser-tab[pinned],
.tabs-newtab-button {
max-width: 31px !important;
min-width: 31px !important;
}