/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is mozilla.org code.
 *
 * The Initial Developer of the Original Code is
 * Netscape Communications Corporation.
 * Portions created by the Initial Developer are Copyright (C) 1998-1999
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *   Joe Hewitt (hewitt@netscape.com)
 *   Jason Kersey (kerz@netscape.com)
 *   Pierre Chanial (chanial@noos.fr)
 *   Dean Tessman (dean_tessman@hotmail.com)
 *   Blake Ross (blake@cs.stanford.edu)
 *   Pamela Greene (pamg.bugs@gmail.com)
 *   Dão Gottwald (dao@mozilla.com)
 *   Jim Mathies (jmathies@mozilla.com)
 *   Drew Willcoxon (adw@mozilla.com)
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

@import url("chrome://global/skin/");

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");



#menubar-items {
  -moz-box-orient: vertical; /* for flex hack */
}

#main-menubar {
  -moz-box-flex: 1; /* make menu items expand to fill toolbar height */
}

#navigator-toolbox {
  -moz-appearance: none;
  background-color: transparent;
  border-top: none;
}

#navigator-toolbox::after {
  content: "";
  display: -moz-box;
  -moz-box-ordinal-group: 101; /* tabs toolbar is 100 */
  height: 1px;
  background-color: ThreeDShadow;
}
#navigator-toolbox[tabsontop=false]::after,
#main-window[disablechrome] #navigator-toolbox::after {
  visibility: collapse;
}

#navigator-toolbox > toolbar:not(:-moz-lwtheme) {
  -moz-appearance: none;
  border-style: none;
  background-color: -moz-Dialog;
}

@media not all and (-moz-windows-compositor) {
  #main-window[tabsintitlebar]:not([inFullscreen]) #toolbar-menubar[inactive] ~ #TabsToolbar:not(:-moz-lwtheme) {
    background: -moz-linear-gradient(bottom, rgba(10%,10%,10%,.4) 1px, transparent 1px),
                -moz-linear-gradient(rgba(50%,50%,50%,0), ActiveCaption 85%);
    color: CaptionText;
  }
  #main-window[tabsintitlebar]:not([inFullscreen]) #toolbar-menubar[inactive] ~ #TabsToolbar:not(:-moz-lwtheme):-moz-window-inactive {
    background: -moz-linear-gradient(bottom, rgba(10%,10%,10%,.4) 1px, transparent 1px),
                -moz-linear-gradient(rgba(50%,50%,50%,0), InactiveCaption 85%);
    color: InactiveCaptionText;
  }

  #main-window[tabsintitlebar] #titlebar:-moz-lwtheme {
    visibility: hidden;
  }
  #main-window[tabsintitlebar] #titlebar-content:-moz-lwtheme {
    -moz-binding: url("chrome://global/content/bindings/general.xml#windowdragbox");
    visibility: visible;
  }
}

#navigator-toolbox[tabsontop="true"] > #nav-bar,
#navigator-toolbox[tabsontop="true"]:not([customizing]) > #nav-bar[collapsed="true"] + toolbar,
#navigator-toolbox[tabsontop="true"]:not([customizing]) > #nav-bar[collapsed="true"] + #customToolbars + #PersonalToolbar {
  background-image: -moz-linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0));
}

#personal-bookmarks {
  min-height: 24px;
}

#print-preview-toolbar:not(:-moz-lwtheme) {
  -moz-appearance: toolbox;
}

/* ::::: app menu button ::::: */

#appmenu-button {
  -moz-appearance: none;
  background: -moz-linear-gradient(rgb(247,182,82), rgb(215,98,10) 95%);
  background-clip: padding-box;
  border-radius: 0 0 4px 4px;
  border: 1px solid rgba(83,42,6,.9);
  border-top: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset,
              0 0 0 1px rgba(255,255,255,.25) inset;
  color: white;
  text-shadow: 0 0 1px rgba(0,0,0,.7),
               0 1px 1.5px rgba(0,0,0,.5);
  font-weight: bold;
  padding: 0 1.5em .05em;
  margin: 0 0 2px;
}

@media all and (-moz-windows-classic) {
  #appmenu-button {
    margin-bottom: 1px;
  }
}


#main-window[privatebrowsingmode=temporary] #appmenu-button {
  background-image: -moz-linear-gradient(rgb(153,38,211), rgb(105,19,163) 95%);
  border-color: rgba(43,8,65,.9);
}

#appmenu-button:hover:not(:active):not([open]) {
  background-image: -moz-radial-gradient(center bottom, farthest-side, rgba(252,240,89,.5) 10%, rgba(252,240,89,0) 70%),
                    -moz-radial-gradient(center bottom, farthest-side, rgb(236,133,0), rgba(255,229,172,0)),
                    -moz-linear-gradient(rgb(246,170,69), rgb(209,74,0) 95%);
  border-color: rgba(83,42,6,.9);
  box-shadow: 0 1px 0 rgba(255,255,255,.1) inset,
              0 0 1.5px 1px rgba(250,234,169,.7) inset,
              0 -1px 0 rgba(250,234,169,.5) inset;
}

#main-window[privatebrowsingmode=temporary] #appmenu-button:hover:not(:active):not([open]) {
  background-image: -moz-radial-gradient(center bottom, farthest-side, rgba(240,193,255,.5) 10%, rgba(240,193,255,0) 70%),
                    -moz-radial-gradient(center bottom, farthest-side, rgb(192,81,247), rgba(236,172,255,0)),
                    -moz-linear-gradient(rgb(144,20,207), rgb(95,0,158) 95%);
  border-color: rgba(43,8,65,.9);
  box-shadow: 0 1px 0 rgba(255,255,255,.1) inset,
              0 0 2px 1px rgba(240,193,255,.7) inset,
              0 -1px 0 rgba(240,193,255,.5) inset;
}

#appmenu-button:hover:active,
#appmenu-button[open] {
  background-image: -moz-linear-gradient(rgb(246,170,69), rgb(209,74,0) 95%);
  border-radius: 0;
  box-shadow: 0 2px 3px rgba(0,0,0,.4) inset,
              0 1px 1px rgba(0,0,0,.2) inset;
}

#main-window[privatebrowsingmode=temporary] #appmenu-button:hover:active,
#main-window[privatebrowsingmode=temporary] #appmenu-button[open] {
  background-image: -moz-linear-gradient(rgb(144,20,207), rgb(95,0,158) 95%);
}

#appmenu-button > .button-box {
  border-style: none;
  padding: 0;
}

#appmenu-button > .button-box > .button-menu-dropmarker {
  list-style-image: url(appmenu-dropmarker.png);
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  -moz-margin-start: .5em;
}

.splitmenu-menuitem {
  -moz-margin-end: 1px;
  -moz-padding-end: 0.5em;
}

.splitmenu-menu {
  -moz-box-pack: end;
}

.appmenu-edit-button {
  -moz-appearance: none;
  border: 1px solid transparent;
  padding: 2px;
  background: transparent;
  border-radius: 3px;
}

.appmenu-edit-button[disabled="true"] {
  opacity: .3;
}

#appmenuPrimaryPane {
  -moz-border-end: 1px solid ThreeDShadow;
}

@media all and (-moz-windows-default-theme) {
  #appmenu-popup {
    -moz-appearance: none;
    background: white;
    border: 1px solid ThreeDShadow;
  }
  #appmenuPrimaryPane {
    background-color: rgba(255,255,255,0.5);
    padding: 2px;
    -moz-border-end: none;
  }
  #appmenuSecondaryPane {
    background-color: #f1f5fb;
    box-shadow: 1px 0 2px rgb(204,214,234) inset;
    -moz-padding-start: 3px;
    -moz-padding-end: 2px;
    padding-top: 2px;
    padding-bottom: 2px;
    font-family: "Segoe UI Semibold", "Segoe UI", sans-serif;
  }
  #appmenuSecondaryPane:-moz-locale-dir(rtl) {
    box-shadow: -1px 0 2px rgb(204,214,234) inset;
  }

  #appmenuPrimaryPane menupopup {
    -moz-appearance: none;
    background-image: -moz-linear-gradient(left, white 26px, ThreeDLightShadow 26px,
                                           ThreeDLightShadow 27px, ThreeDHighlight 27px,
                                           ThreeDHighlight 28px, white 28px);
    border: 3px solid;
    -moz-border-top-colors: ThreeDShadow white;
    -moz-border-bottom-colors: ThreeDShadow white;
    -moz-border-left-colors: ThreeDShadow white;
    -moz-border-right-colors: ThreeDShadow white;
  }

  #appmenuSecondaryPane menupopup {
    -moz-appearance: none;
    background-image: -moz-linear-gradient(left, #f1f5fb 26px, ThreeDLightShadow 26px,
                                           ThreeDLightShadow 27px, ThreeDHighlight 27px,
                                           ThreeDHighlight 28px, #f1f5fb 28px);
    border: 3px solid;
    -moz-border-top-colors: ThreeDShadow #f1f5fb;
    -moz-border-bottom-colors: ThreeDShadow #f1f5fb;
    -moz-border-left-colors: ThreeDShadow #f1f5fb;
    -moz-border-right-colors: ThreeDShadow #f1f5fb;
  }

  #appmenuPrimaryPane menupopup:-moz-locale-dir(rtl) {
    background-image: -moz-linear-gradient(right, white 26px, ThreeDLightShadow 26px,
                                           ThreeDLightShadow 27px, ThreeDHighlight 27px,
                                           ThreeDHighlight 28px, white 28px);
  }
  #appmenuSecondaryPane menupopup:-moz-locale-dir(rtl) {
    background-image: -moz-linear-gradient(right, #f1f5fb 26px, ThreeDLightShadow 26px,
                                           ThreeDLightShadow 27px, ThreeDHighlight 27px,
                                           ThreeDHighlight 28px, #f1f5fb 28px);
  }

  .appmenu-menuseparator {
    -moz-appearance: none;
    margin-top: 3px;
    margin-bottom: 3px;
    -moz-margin-start: 30px;
    padding: 0;
    border-top: 1px solid #d6e5f5;
    border-bottom: none;
  }

  .appmenu-edit-button:not([disabled]):hover {
    border: 1px solid #b8d6fb;
    box-shadow: inset 0 0 1px white;
    background: -moz-linear-gradient(#fafbfd, #ebf3fd);
    -moz-transition: .2s ease-in;
  }
}

#appmenuSecondaryPane-spacer {
  min-height: 1em;
}

#appmenu-editmenu {
  -moz-box-pack: end;
}

#appmenu_print,
#appmenu_print_popup,
.appmenu-edit-button,
#appmenu-editmenu-cut,
#appmenu-editmenu-copy,
#appmenu-editmenu-paste,
#appmenu-quit {
  list-style-image: url("appmenu-icons.png");
}

#appmenu-cut,
#appmenu-editmenu-cut {
  -moz-image-region: rect(0 16px 16px 0);
}

#appmenu-copy,
#appmenu-editmenu-copy {
  -moz-image-region: rect(0 32px 16px 16px);
}

#appmenu-paste,
#appmenu-editmenu-paste {
  -moz-image-region: rect(0 48px 16px 32px);
}

#appmenu_print,
#appmenu_print_popup {
  -moz-image-region: rect(0 64px 16px 48px);
}

#appmenu-quit {
  -moz-image-region: rect(0 80px 16px 64px);
}

#appmenu-edit-label {
  -moz-appearance: none;
  background: transparent;
  font-style: italic;
}

#appmenu_bookmarks {
  list-style-image: url("chrome://browser/skin/places/bookmark.png");
  -moz-image-region: rect(0px 48px 16px 32px);
}

#appmenu_privateBrowsing {
  list-style-image: url("chrome://browser/skin/Privacy-16.png");
}

#appmenu_addons {
  list-style-image: url("chrome://mozapps/skin/extensions/extensionGeneric-16.png");
}

#BMB_bookmarkThisPage,
#appmenu_bookmarkThisPage {
  list-style-image: url("chrome://browser/skin/places/bookmark.png");
  -moz-image-region: rect(0 16px 16px 0);
}

/* ::::: titlebar ::::: */

#main-window[sizemode="normal"] > #titlebar {
  -moz-appearance: -moz-window-titlebar;
}

#main-window[sizemode="maximized"] > #titlebar {
  -moz-appearance: -moz-window-titlebar-maximized;
}

@media all and (-moz-windows-classic) {
  #main-window[sizemode="normal"] > #titlebar > #titlebar-content > #appmenu-button-container {
    margin-top: 4px;
  }
}

#titlebar-buttonbox {
  -moz-appearance: -moz-window-button-box;
}

#main-window[sizemode="maximized"] #titlebar-buttonbox {
  -moz-appearance: -moz-window-button-box-maximized;
}

.titlebar-placeholder[type="appmenu-button"] {
  margin-left: 4px;
}

.titlebar-placeholder[type="caption-buttons"] {
  margin-left: 22px; /* additional space for Aero Snap */
}

/* titlebar command buttons */

#titlebar-min {
  -moz-appearance: -moz-window-button-minimize;
}

#titlebar-max {
  -moz-appearance: -moz-window-button-maximize;
}

#main-window[sizemode="maximized"] #titlebar-max {
  -moz-appearance: -moz-window-button-restore;
}

#titlebar-close {
  -moz-appearance: -moz-window-button-close;
}

@media not all and (-moz-windows-classic) {
  #titlebar-min {
    -moz-margin-end: 2px;
  }
}

/* ::::: bookmark buttons ::::: */

toolbarbutton.bookmark-item {
  margin: 0;
  padding: 2px 3px;
}

toolbarbutton.bookmark-item:hover:active:not([disabled="true"]),
toolbarbutton.bookmark-item[open="true"] {
  padding-top: 3px;
  padding-bottom: 1px;
  -moz-padding-start: 4px;
  -moz-padding-end: 2px;
}

.bookmark-item > .toolbarbutton-icon {
  width: 16px;
  height: 16px;
}

/* Prevent [mode="icons"] from hiding the label */
.bookmark-item > .toolbarbutton-text {
  display: -moz-box !important;
}

.bookmark-item > .toolbarbutton-menu-dropmarker {
  display: none;
}

#wrapper-personal-bookmarks[place="palette"] > .toolbarpaletteitem-box {
  width: 16px;
  height: 16px;
  background: url("chrome://browser/skin/places/bookmarksToolbar.png") no-repeat;
}

.bookmarks-toolbar-customize {
  max-width: 15em !important;
  list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png") !important;
}

/* ::::: bookmark menus ::::: */

menu.bookmark-item,
menuitem.bookmark-item {
  min-width: 0;
  max-width: 32em;
}

.bookmark-item > .menu-iconic-left {
  margin-top: 0;
  margin-bottom: 0;
}

.bookmark-item > .menu-iconic-left > .menu-iconic-icon {
  -moz-padding-start: 0px;
}

/* ::::: bookmark items ::::: */

.bookmark-item  {
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

.bookmark-item[container] {
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}

.bookmark-item[container][open] {
  -moz-image-region: rect(16px, 32px, 32px, 16px);
}

.bookmark-item[container][livemark] { 
  list-style-image: url("chrome://browser/skin/livemark-folder.png");
  -moz-image-region: auto;
}

.bookmark-item[container][livemark] .bookmark-item {
  list-style-image: url("chrome://browser/skin/livemark-item.png");
  -moz-image-region: auto;
}

.bookmark-item[container][query] {
  list-style-image: url("chrome://browser/skin/places/query.png");
  -moz-image-region: auto;
}

.bookmark-item[query][tagContainer] {
  list-style-image: url("chrome://mozapps/skin/places/tagContainerIcon.png");
  -moz-image-region: auto;
}

.bookmark-item[query][dayContainer] {
  list-style-image: url("chrome://browser/skin/places/calendar.png");
  -moz-image-region: auto;
}

.bookmark-item[query][hostContainer] {
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}

.bookmark-item[query][hostContainer][open] {
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(16px, 32px, 32px, 16px);
}

.bookmark-item[cutting] > .toolbarbutton-icon,
.bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-icon {
  opacity: 0.5;
}

.bookmark-item[cutting] > .toolbarbutton-text,
.bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-text {
  opacity: 0.7;
}

/* ::::: primary toolbar buttons ::::: */

.toolbarbutton-1 {
  list-style-image: url("chrome://browser/skin/Toolbar.png");
}

.toolbarbutton-1:not([type="menu-button"]) {
  -moz-box-orient: vertical;
}

.toolbarbutton-1[disabled="true"] > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
.toolbarbutton-1[disabled="true"] > .toolbarbutton-icon {
  opacity: .4;
}

#nav-bar {
  /* force iconsize="small" on this toolbar */
  counter-reset: smallicons;
}

#navigator-toolbox[iconsize=small] > #nav-bar {
  padding-top: 1px;
  padding-bottom: 1px;
}

#navigator-toolbox[iconsize=large][mode=icons] > #nav-bar {
  padding-left: 2px;
  padding-right: 2px;
}

#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button,
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
#nav-bar .toolbarbutton-1 {
  -moz-appearance: none;
  padding: 1px 5px;
  background: rgba(151,152,153,.05)
              -moz-linear-gradient(rgba(251,252,253,.95), rgba(246,247,248,.47) 49%, 
                                   rgba(231,232,233,.45) 51%, rgba(225,226,229,.3));
  background-clip: padding-box;
  border-radius: 3.5px;
  border: 1px solid;
  border-color: rgba(0,0,0,.12) rgba(0,0,0,.19) rgba(0,0,0,.38);
  box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
              0 0 0 2px rgba(255,255,255,.1) inset;
  color: black;
  text-shadow: 0 0 2px white;
}

#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button,
#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar .toolbarbutton-1 {
  padding-left: 3px;
  padding-right: 3px;
}

#nav-bar .toolbarbutton-1[type="menu-button"] {
  -moz-appearance: none;
  padding: 0;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

#nav-bar .toolbarbutton-1 {
  margin: 1px 3px;
}

#navigator-toolbox[iconsize="small"][mode="icons"] > #nav-bar .toolbarbutton-1 {
  margin-left: 2px;
  margin-right: 2px;
}

#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
  -moz-border-start-style: none;
}

#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(ltr),
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(rtl) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(rtl),
#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

#nav-bar .toolbarbutton-1[disabled="true"] {
  opacity: .8;
}

#nav-bar .toolbarbutton-1[disabled="true"] > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
#nav-bar .toolbarbutton-1[disabled="true"] > .toolbarbutton-icon {
  opacity: .5;
}

#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled="true"]):not(:active):hover,
#nav-bar .toolbarbutton-1:not([open="true"]):not(:active):hover > .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
#nav-bar .toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):not([checked="true"]):not([open="true"]):not(:active):hover {
  background-color: hsla(190,60%,70%,.5);
  border-color: hsla(190,50%,65%,.8) hsla(190,50%,50%,.8) hsla(190,50%,40%,.8);
  box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
              0 0 0 1.5px rgba(255,255,255,.1) inset,
              0 0 3.5px hsl(190,90%,80%);
  -moz-transition: background-color .4s ease-in,
                   border-color .3s ease-in,
                   box-shadow .3s ease-in;
}

#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled="true"]):hover:active,
#nav-bar .toolbarbutton-1:hover:active > .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
#nav-bar .toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker,
#nav-bar .toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):hover:active,
#nav-bar .toolbarbutton-1:not([type="menu-button"])[checked="true"],
#nav-bar .toolbarbutton-1[open="true"] {
  background-color: transparent;
  border-color: rgba(0,0,0,.65) rgba(0,0,0,.55) rgba(0,0,0,.5);
  box-shadow: 0 0 6.5px rgba(0,0,0,.4) inset,
              0 0 2px rgba(0,0,0,.4) inset,
              0 1px 0 rgba(255,255,255,.4);
  text-shadow: none;
}

#nav-bar .toolbarbutton-1[checked="true"]:not(:active):hover {
  background-color: rgba(90%,90%,90%,.4);
  -moz-transition: background-color .4s;
}

.toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
.toolbarbutton-1 > .toolbarbutton-icon {
  -moz-margin-end: 0;
}

#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
#nav-bar .toolbarbutton-1:not(:-moz-any(#back-button, #forward-button, #reload-button, #stop-button, #home-button, #print-button, #downloads-button, #history-button, #bookmarks-button, #bookmarks-menu-button, #new-tab-button, #new-window-button, #cut-button, #copy-button, #paste-button, #fullscreen-button, #zoom-out-button, #zoom-in-button, #sync-button, #feed-button, #alltabs-button, #tabview-button)) > .toolbarbutton-icon {
  margin: 1px;
}

toolbar[mode="full"] .toolbarbutton-1,
toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
  min-width: 57px;
}

:-moz-any(#TabsToolbar, #addon-bar) .toolbarbutton-1,
:-moz-any(#TabsToolbar, #addon-bar) .toolbarbutton-1 > .toolbarbutton-menubutton-button,
.tabbrowser-arrowscrollbox > .scrollbutton-up,
.tabbrowser-arrowscrollbox > .scrollbutton-down {
  -moz-appearance: none;
  border-style: none;
  padding: 0 3px;
}

#TabsToolbar .toolbarbutton-1:not([disabled]):hover,
#TabsToolbar .toolbarbutton-1[open],
#TabsToolbar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled]):hover,
.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled]):hover,
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled]):hover {
  background-image: -moz-linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.5)),
                    -moz-linear-gradient(transparent, rgba(0,0,0,.25) 30%),
                    -moz-linear-gradient(transparent, rgba(0,0,0,.25) 30%);
  background-position: 1px -1px, 0 -1px, 100% -1px;
  background-size: -moz-calc(100% - 2px) 100%, 1px 100%, 1px 100%;
  background-repeat: no-repeat;
}

#addon-bar .toolbarbutton-1:not([disabled]):hover,
#addon-bar .toolbarbutton-1[open],
#addon-bar .toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled]):hover {
  background-image: -moz-linear-gradient(bottom, transparent, rgba(0,0,0,.15)),
                    -moz-linear-gradient(bottom, transparent, rgba(0,0,0,.15) 30%),
                    -moz-linear-gradient(bottom, transparent, rgba(0,0,0,.15) 30%);
  background-position: left, left, right;
  background-size: auto, 1px 100%, 1px 100%;
  background-repeat: no-repeat;
}

/* unified back/forward button */

#back-button {
  -moz-image-region: rect(0, 18px, 18px, 0);
}

#forward-button {
  -moz-image-region: rect(0, 36px, 18px, 18px);
}

#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button {
  -moz-image-region: rect(18px, 20px, 38px, 0);
}

#back-button:-moz-locale-dir(rtl) > .toolbarbutton-icon,
#forward-button:-moz-locale-dir(rtl),
#forward-button:-moz-locale-dir(rtl) > .toolbarbutton-text {
  -moz-transform: scaleX(-1);
}

#nav-bar #back-button {
  -moz-margin-end: 0 !important;
}

#nav-bar #forward-button {
  border-left-style: none;
  -moz-margin-start: 0 !important;
}

#nav-bar #back-button:-moz-locale-dir(ltr) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

#nav-bar #back-button:-moz-locale-dir(rtl),
#nav-bar #forward-button {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button {
  border-radius: 10000px;
  padding: 0;
  width: 30px;
  height: 30px;
  position: relative;
  z-index: 1;
  margin-top: -2px;
  margin-bottom: -2px;
  border: none;
  background-image: -moz-linear-gradient(rgba(251,252,253,.97), rgba(246,247,248,.5) 49%, 
                                         rgba(231,232,233,.45) 51%, rgba(225,226,229,.2));
  box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
              0 0 0 2px rgba(255,255,255,.1) inset,
              0 0 0 1px rgba(0,0,0,.15),
              0 1px 0 rgba(0,0,0,.4),
              0 1px 1px rgba(0,0,0,.3);
}

#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not([disabled="true"]):not([open="true"]):not(:active):hover {
  box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
              0 0 0 2px rgba(255,255,255,.1) inset,
              0 0 0 1px hsla(190,50%,40%,.3),
              0 1px 0 rgba(0,0,0,.4),
              0 1px 1px rgba(0,0,0,.3),
              0 0 5px 1px hsl(190,90%,80%);
}

#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button:not([disabled="true"]):hover:active,
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #back-button[open="true"] {
  box-shadow: 0 0 6.5px rgba(0,0,0,.4) inset,
              0 0 2px rgba(0,0,0,.4) inset,
              0 0 0 1px rgba(0,0,0,.65),
              0 2px 0 rgba(255,255,255,.4);
}

#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar[currentset*="unified-back-forward-button"],
#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar:not([currentset]) {
  padding-top: 3px;
  padding-bottom: 5px;
}

#navigator-toolbox[iconsize="large"][mode="icons"][tabsontop="true"] > #nav-bar[currentset*="unified-back-forward-button"],
#navigator-toolbox[iconsize="large"][mode="icons"][tabsontop="true"] > #nav-bar:not([currentset]) {
  padding-top: 5px;
}

#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button {
  /*mask: url(keyhole-forward-mask.svg#mask); XXX: this regresses twinopen */
  mask: url(chrome://browser/content/browser.xul#winstripe-keyhole-forward-mask);
  -moz-margin-start: -6px !important;
  padding-left: 7px;
  padding-right: 3px;
}

#navigator-toolbox[iconsize="large"][mode="icons"] > #nav-bar #forward-button:not([disabled="true"]):not(:active):hover {
  /*mask: url(keyhole-forward-mask.svg#mask-hover);*/
  mask: url(chrome://browser/content/browser.xul#winstripe-keyhole-forward-mask-hover);
  /* Don't animate the box shadow, as the blur and spread radii affect the mask. */
  -moz-transition: background-color .4s ease-in;
}

.unified-nav-back[_moz-menuactive]:-moz-locale-dir(ltr),
.unified-nav-forward[_moz-menuactive]:-moz-locale-dir(rtl) {
  list-style-image: url("chrome://browser/skin/menu-back.png") !important;
}

.unified-nav-forward[_moz-menuactive]:-moz-locale-dir(ltr),
.unified-nav-back[_moz-menuactive]:-moz-locale-dir(rtl) {
  list-style-image: url("chrome://browser/skin/menu-forward.png") !important;
}

/* stop button */

#stop-button {
  -moz-image-region: rect(0, 54px, 18px, 36px);
}

/* reload button */

#reload-button {
  -moz-image-region: rect(0, 72px, 18px, 54px);
}

/* home button */

#home-button.bookmark-item {
  list-style-image: url("chrome://browser/skin/Toolbar.png");
}
#home-button {
  -moz-image-region: rect(0, 90px, 18px, 72px);
}

/* tabview button */

#tabview-button,
#menu_tabview {
  list-style-image: url(chrome://browser/skin/tabview/tabview.png);
}

#tabview-button {
  -moz-image-region: rect(0, 90px, 18px, 72px);
}

#tabview-button[groups="0"] {
  -moz-image-region: rect(0, 18px, 18px, 0);
}

#tabview-button[groups="1"] {
  -moz-image-region: rect(0, 36px, 18px, 18px);
}

#tabview-button[groups="2"] {
  -moz-image-region: rect(0, 54px, 18px, 36px);
}

#tabview-button[groups="3"] {
  -moz-image-region: rect(0, 72px, 18px, 54px);
}

#menu_tabview {
  -moz-image-region: rect(1px, 89px, 17px, 73px);
}

#menu_tabview[groups="0"] {
  -moz-image-region: rect(1px, 17px, 17px, 1px);
}

#menu_tabview[groups="1"] {
  -moz-image-region: rect(1px, 35px, 17px, 19px);
}

#menu_tabview[groups="2"] {
  -moz-image-region: rect(1px, 53px, 17px, 37px);
}

#menu_tabview[groups="3"] {
  -moz-image-region: rect(1px, 71px, 17px, 55px);
}

/* download manager button */

#downloads-button {
  -moz-image-region: rect(0, 108px, 18px, 90px);
}

/* history sidebar button */

#history-button {
  -moz-image-region: rect(0, 126px, 18px, 108px);
}

/* bookmark sidebar & menu buttons */

#bookmarks-button,
#bookmarks-menu-button {
  -moz-image-region: rect(0, 144px, 18px, 126px);
}

#bookmarks-menu-button.bookmark-item {
  list-style-image: url("chrome://browser/skin/Toolbar.png");
}

#bookmarks-menu-button.toolbarbutton-1 {
  -moz-box-orient: horizontal;
}

/* print button */

#print-button {
  -moz-image-region: rect(0, 162px, 18px, 144px);
}

/* toolbar new tab button */

#new-tab-button {
  -moz-image-region: rect(0, 180px, 18px, 162px);
}

/* new window button */

#new-window-button {
  -moz-image-region: rect(0, 198px, 18px, 180px);
}

/* cut button */

#cut-button {
  -moz-image-region: rect(0, 216px, 18px, 198px);
}

/* copy button */

#copy-button {
  -moz-image-region: rect(0, 234px, 18px, 216px);
}

/* paste button */

#paste-button {
  -moz-image-region: rect(0, 252px, 18px, 234px);
}

/* fullscreen button */

#fullscreen-button {
  -moz-image-region: rect(0, 270px, 18px, 252px);
}

/* zoom controls */

#zoom-out-button {
  -moz-image-region: rect(0, 288px, 18px, 270px);
}

#zoom-in-button {
  -moz-image-region: rect(0, 306px, 18px, 288px);
}

#nav-bar #zoom-out-button {
  -moz-margin-end: 0;
}

#nav-bar #zoom-in-button {
  -moz-border-start: none;
  -moz-margin-start: 0;
}

#nav-bar #zoom-out-button:-moz-locale-dir(ltr),
#nav-bar #zoom-in-button:-moz-locale-dir(rtl) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

#nav-bar #zoom-out-button:-moz-locale-dir(rtl),
#nav-bar #zoom-in-button:-moz-locale-dir(ltr) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* sync button */

#sync-button {
  -moz-image-region: rect(0, 324px, 18px, 306px);
}

#sync-button[status="active"] {
  list-style-image: url("chrome://browser/skin/sync-throbber.png");
  -moz-image-region: rect(0, 18px, 18px, 0);
}

/* feed button */

#feed-button {
  -moz-image-region: rect(0, 342px, 18px, 324px);
}

/* ::::: fullscreen window controls ::::: */

#TabsToolbar > #window-controls {
  -moz-margin-start: 4px;
}

#minimize-button,
#restore-button,
#close-button {
  list-style-image: url("chrome://global/skin/icons/windowControls.png");
  padding: 0;
}

#minimize-button {
  -moz-image-region: rect(0, 16px, 16px, 0);
}
#minimize-button:hover {
  -moz-image-region: rect(16px, 16px, 32px, 0);
}
#minimize-button:hover:active {
  -moz-image-region: rect(32px, 16px, 48px, 0);
}
#restore-button {
  -moz-image-region: rect(0, 32px, 16px, 16px);
}
#restore-button:hover {
  -moz-image-region: rect(16px, 32px, 32px, 16px);
}
#restore-button:hover:active {
  -moz-image-region: rect(32px, 32px, 48px, 16px);
}
#close-button {
  -moz-image-region: rect(0, 48px, 16px, 32px);
  -moz-appearance: none;
  border-style: none;
  margin: 2px;
}
#close-button:hover {
  -moz-image-region: rect(16px, 48px, 32px, 32px);
}
#close-button:hover:active {
  -moz-image-region: rect(32px, 48px, 48px, 32px);
}

/* ::::: Location Bar ::::: */

#urlbar {
  width: 7em;
  min-width: 7em;
}

#urlbar,
.searchbar-textbox {
  -moz-appearance: none;
  margin: 1px 3px;
  padding: 2px;
  background-clip: padding-box;
  border: 1px solid ThreeDShadow;
  border-radius: 3.5px;
}

@media all and (-moz-windows-default-theme) {
  #urlbar,
  .searchbar-textbox {
    border-color: rgba(0,0,0,.32);
  }
}

#urlbar:-moz-lwtheme,
.searchbar-textbox:-moz-lwtheme {
  background-color: rgba(255,255,255,.8);
  border-color: rgba(0,0,0,.32);
  color: black;
}

html|*.urlbar-input:-moz-lwtheme:-moz-placeholder,
.searchbar-textbox:-moz-lwtheme > .autocomplete-textbox-container > .textbox-input-box > html|*.textbox-input:-moz-placeholder {
  color: #777;
}

#urlbar:-moz-lwtheme[focused="true"],
.searchbar-textbox:-moz-lwtheme[focused="true"] {
  background-color: white;
}

#urlbar-container {
  -moz-box-orient: horizontal;
  -moz-box-align: stretch;
}

.urlbar-textbox-container {
  -moz-box-align: stretch;
}

#urlbar-icons {
  height: 18px;
  -moz-box-align: center;
}

.urlbar-icon {
  padding: 0 2px !important;
}

.urlbar-icon:-moz-system-metric(touch-enabled) {
  -moz-margin-end: 1px !important;
  padding: 0 3px !important;
}

#urlbar-search-splitter {
  min-width: 6px;
  -moz-margin-start: -3px;
  border: none;
  background: transparent;
}

#urlbar-search-splitter + #urlbar-container > #urlbar ,
#urlbar-search-splitter + #search-container > #searchbar > .searchbar-textbox {
  -moz-margin-start: 0;
}

#urlbar-display-box {
  margin-top: -2px;
  margin-bottom: -2px;
  -moz-border-end: 1px solid #AAA;
  -moz-margin-end: 3px;
}

#urlbar-display {
  margin-top: 0;
  margin-bottom: 0;
  color: GrayText;
}

/* identity box */

#identity-box {
  background-image: -moz-linear-gradient(hsl(0,0%,98%), hsl(0,0%,92%));
  box-shadow: 0 1px 0 hsla(0,0%,0%,.05) inset;
  -moz-border-end: 1px solid hsla(0,0%,0%,.1);
  padding: 2px;
  margin: -2px;
  -moz-margin-end: 0;
}

#identity-box:-moz-locale-dir(ltr) {
  border-top-left-radius: 2.5px;
  border-bottom-left-radius: 2.5px;
}

#identity-box:-moz-locale-dir(rtl) {
  border-top-right-radius: 2.5px;
  border-bottom-right-radius: 2.5px;
}

#identity-box:hover {
  background-image: -moz-linear-gradient(hsl(0,0%,95%), hsl(0,0%,87%));
}

#identity-box[open="true"],
#identity-box:hover:active {
  background-image: -moz-linear-gradient(hsl(0,0%,92%), hsl(0,0%,82%));
  box-shadow: 0 1px 1px hsla(0,0%,0%,.3) inset,
              0 1px 3px hsla(0,0%,0%,.3) inset;
}

#identity-box.verifiedDomain {
  background-image: -moz-linear-gradient(hsl(215,60%,92%), hsl(215,58%,88%));
  box-shadow: 0 1px 0 hsla(215,54%,33%,.05) inset;
  -moz-border-end-color: hsla(215,54%,33%,.2);
  color: hsl(215,54%,33%);
}

#identity-box.verifiedDomain:hover {
  background-image: -moz-linear-gradient(hsl(215,85%,85%), hsl(215,70%,68%));
}

#identity-box.verifiedDomain[open="true"],
#identity-box.verifiedDomain:hover:active {
  background-image: -moz-linear-gradient(hsl(215,80%,80%), hsl(215,67%,65%));
  box-shadow: 0 1px 1px hsla(215,54%,33%,.7) inset,
              0 1px 3px 1px hsla(215,54%,33%,.5) inset;
}

#identity-box.verifiedIdentity {
  background-image: -moz-linear-gradient(hsl(91,70%,90%), hsl(93,60%,81%));
  box-shadow: 0 1px 0 hsla(92,81%,16%,.05) inset;
  -moz-border-end-color: hsla(92,81%,16%,.2);
  color: hsl(92,100%,20%);
}

#identity-box.verifiedIdentity:hover {
  background-image: -moz-linear-gradient(hsl(92,69%,77%), hsl(92,44%,51%));
}

#identity-box.verifiedIdentity[open="true"],
#identity-box.verifiedIdentity:hover:active {
  background-image: -moz-linear-gradient(hsl(92,65%,70%), hsl(92,40%,48%));
  box-shadow: 0 1px 1px hsla(92,81%,16%,.6) inset,
              0 1px 3px 1px hsla(92,81%,16%,.5) inset;
}

#identity-box:-moz-focusring {
  outline: 1px dotted #000;
  outline-offset: -3px;
}

#identity-icon-labels {
  -moz-margin-start: 1px;
  -moz-margin-end: 3px;
}

/* Location bar dropmarker */

.urlbar-history-dropmarker {
  -moz-appearance: none;
  padding: 0 1px;
  background-color: transparent;
  border: none;
  width: auto;
  list-style-image: url(mainwindow-dropdown-arrow.png);
  -moz-image-region: rect(0, 13px, 11px, 0);
}

.urlbar-history-dropmarker:-moz-system-metric(touch-enabled) {
  min-width: 6.4mozmm;
}

.urlbar-history-dropmarker:hover:active,
.urlbar-history-dropmarker[open="true"] {
  -moz-image-region: rect(0, 26px, 11px, 13px);
}

/* page proxy icon */

#page-proxy-favicon,
#urlbar-throbber {
  width: 16px;
  height: 16px;
}

#page-proxy-stack {
  width: 24px;
  height: 18px;
  padding: 1px 4px;
}

#page-proxy-favicon:not([src]) {
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px)
}

#page-proxy-favicon[pageproxystate="invalid"] {
  -moz-image-region: rect(32px, 16px, 48px, 0px);
}

#urlbar-throbber {
  list-style-image: url("chrome://browser/skin/places/searching_16.png");
}

/* autocomplete */

#treecolAutoCompleteImage {
  max-width: 36px;
}

.ac-result-type-bookmark,
.autocomplete-treebody::-moz-tree-image(bookmark, treecolAutoCompleteImage) {
  list-style-image: url("chrome://browser/skin/places/editBookmark.png");
  -moz-image-region: rect(0px 16px 16px 0px);
  width: 16px; 
  height: 16px;
}

.ac-result-type-keyword,
.autocomplete-treebody::-moz-tree-image(keyword, treecolAutoCompleteImage) {
  list-style-image: url(chrome://global/skin/icons/Search-glass.png);
  -moz-image-region: rect(0px 32px 16px 16px);
  width: 16px;
  height: 16px;
}

.ac-result-type-tag,
.autocomplete-treebody::-moz-tree-image(tag, treecolAutoCompleteImage) {
  list-style-image: url("chrome://browser/skin/places/tag.png");
  width: 16px; 
  height: 16px;
}

.ac-comment {
  font-size: 1.15em;
}

.ac-extra > .ac-comment {
  font-size: inherit;
}

.ac-url-text,
.ac-action-text {
  color: -moz-nativehyperlinktext;
}


richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-icon {
  list-style-image: url("chrome://browser/skin/actionicon-tab.png");
}

.autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) {
  color: GrayText;
}

.ac-comment[selected="true"],
.ac-url-text[selected="true"],
.ac-action-text[selected="true"] {
  color: inherit !important;
}

.autocomplete-treebody::-moz-tree-cell-text(suggesthint, treecolAutoCompleteComment), 
.autocomplete-treebody::-moz-tree-cell-text(suggestfirst, treecolAutoCompleteComment) 
{
  color: GrayText;
  font-size: smaller;
}

.autocomplete-treebody::-moz-tree-cell(suggesthint) {
  border-top: 1px solid GrayText;
}

/* go button */

#go-button {
  list-style-image: url("chrome://browser/skin/Go-arrow.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

#go-button:-moz-locale-dir(rtl) > .toolbarbutton-icon {
  -moz-transform: scaleX(-1);
}

#go-button:hover {
  -moz-image-region: rect(16px, 16px, 32px, 0px);
}

/* combined go/reload/stop button in location bar */

#urlbar > toolbarbutton {
  -moz-appearance: none;
  list-style-image: url("chrome://browser/skin/reload-stop-go.png");
  margin: -2px;
  -moz-margin-start: 0;
  padding: 0 3px;
  background-origin: border-box;
  border: none;
  -moz-border-start: 1px solid rgba(0,0,0,.25);
}

#urlbar:-moz-locale-dir(ltr) > toolbarbutton {
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
}

#urlbar:-moz-locale-dir(rtl) > toolbarbutton {
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
}

#urlbar > toolbarbutton:not([disabled]):active:hover {
  -moz-padding-start: 4px;
  -moz-border-start: none;
  box-shadow: 0 0 6.5px rgba(0,0,0,.4) inset,
              0 0 2px rgba(0,0,0,.4) inset;
}

#urlbar-go-button {
  -moz-image-region: rect(0px, 56px, 14px, 42px);
  background-image: -moz-linear-gradient(rgb(115,213,115), rgb(96,190,96) 49%, rgb(82,174,82) 51%, rgb(79,155,79));
  box-shadow: 0 1px 0 rgba(0,0,0,.1) inset,
              -1px -1px 1px rgba(255,255,255,.25) inset;
}

#urlbar-go-button:-moz-locale-dir(rtl) > .toolbarbutton-icon {
  -moz-transform: scaleX(-1);
}

#urlbar-go-button:hover {
  background-image: -moz-linear-gradient(rgb(96,221,96), rgb(71,191,71) 49%, rgb(54,171,54) 51%, rgb(50,147,50));
}

#urlbar-reload-button {
  -moz-image-region: rect(0px, 14px, 14px, 0px);
}

#urlbar-reload-button:not([disabled]):hover {
  -moz-image-region: rect(0px, 28px, 14px, 14px);
  background-image: -moz-linear-gradient(rgb(162,207,241), rgb(111,178,225) 49%, rgb(91,159,217) 51%, rgb(62,138,200));
  box-shadow: 0 1px 0 rgba(0,0,0,.1) inset,
              -1px -1px 1px rgba(255,255,255,.25) inset;
}

#urlbar-stop-button {
  -moz-image-region: rect(0px, 42px, 14px, 28px);
  background-image: -moz-linear-gradient(rgb(231,162,140), rgb(209,119,100) 49%, rgb(193,92,78) 51%, rgb(173,72,58));
  box-shadow: 0 1px 0 rgba(0,0,0,.1) inset,
              -1px -1px 1px rgba(255,255,255,.25) inset;
}

#urlbar-stop-button:hover {
  background-image: -moz-linear-gradient(rgb(244,156,128), rgb(215,101,77) 49%, rgb(194,66,48) 51%, rgb(170,41,23));
}

/* popup blocker button */

#page-report-button {
  list-style-image: url("chrome://browser/skin/urlbar-popup-blocked.png");
  -moz-image-region: rect(0, 16px, 16px, 0);
}

#page-report-button:hover {
  -moz-image-region: rect(0, 32px, 16px, 16px);
}

#page-report-button:hover:active,
#page-report-button[open="true"] {
  -moz-image-region: rect(0, 48px, 16px, 32px);
}

/* star button */

#star-button {
  list-style-image: url("chrome://browser/skin/places/bookmark.png");
  -moz-image-region: rect(0px 16px 16px 0px);
}

#star-button:hover {
  -moz-image-region: rect(0px 32px 16px 16px);
}

#star-button:hover:active {
  -moz-image-region: rect(0px 48px 16px 32px);
}

#star-button[starred="true"] {
  list-style-image: url("chrome://browser/skin/places/editBookmark.png");
}

/* bookmarking panel */
#editBookmarkPanelStarIcon {
  list-style-image: url("chrome://browser/skin/places/starred48.png");
  width: 48px;
  height: 48px;
}

#editBookmarkPanelStarIcon[unstarred] {
  list-style-image: url("chrome://browser/skin/places/unstarred48.png");
}

#editBookmarkPanelTitle {
  font-size: 130%;
}

#editBookmarkPanelHeader,
#editBookmarkPanelContent {
  margin-bottom: .5em;
}

/* Implements editBookmarkPanel resizing on folderTree un-collapse. */
#editBMPanel_folderTree {
  min-width: 27em;
}

.panel-promo-box {
  margin: 8px -16px -16px -16px;
  padding: 8px 16px;
  background-color: #f1f5fb;
  color: GrayText;
  box-shadow: 0px 1px 2px rgb(204,214,234) inset;
}

.panel-promo-icon {
  list-style-image: url("chrome://browser/skin/sync-notification-24.png");
  -moz-margin-end: 10px;
  vertical-align: middle;
}

.panel-promo-closebutton {
  -moz-appearance: none;
  list-style-image: url("chrome://global/skin/icons/close.png");
  -moz-image-region: rect(0, 16px, 16px, 0);
  border: none;
  -moz-margin-end: -10px;
  margin-top: -5px;
}

.panel-promo-closebutton:hover {
  -moz-image-region: rect(0, 32px, 16px, 16px);
}

.panel-promo-closebutton:hover:active {
  -moz-image-region: rect(0, 48px, 16px, 32px);
}

.panel-promo-closebutton > .toolbarbutton-text {
  padding: 0;
  margin: 0;
}

/* ::::: content area ::::: */

#sidebar {
  background-color: Window;
}

#sidebar-title {
  -moz-padding-start: 0px;
}

/* ::::: throbber ::::: */

#navigator-throbber {
  width: 16px;
  min-height: 16px;
  margin: 0 3px;
}

#navigator-throbber[busy="true"] {
  list-style-image: url("chrome://global/skin/icons/loading_16.png");
}

#navigator-throbber,
#wrapper-navigator-throbber > #navigator-throbber {
  list-style-image: url("chrome://global/skin/icons/notloading_16.png");
}

/* Tabstrip */

#TabsToolbar {
  min-height: 0;
  padding: 0;
}

#TabsToolbar:not(:-moz-lwtheme),
#TabsToolbar[tabsontop=false] {
  background-image:
    -moz-linear-gradient(bottom, rgba(10%,10%,10%,.4) 1px, rgba(0,0,0,.05) 1px, transparent 50%);
}


.tabbrowser-tab,
.tabs-newtab-button {
  -moz-appearance: none;
  background: -moz-linear-gradient(bottom, rgba(10%,10%,10%,.4) 1px, transparent 1px), -moz-linear-gradient(transparent, hsla(0,0%,45%,.1) 1px, hsla(0,0%,32%,.2) 80%, hsla(0,0%,0%,.2)),
              -moz-linear-gradient(-moz-dialog, -moz-dialog);
  background-origin: border-box;
  background-position: 1px 2px;
  background-size: -moz-calc(100% - 2px) -moz-calc(100% - 2px);
  background-repeat: no-repeat;
  margin: 0;
  padding: 2px 0 4px;
  -moz-border-image: url(tabbrowser/tab.png) 4 3 0 / 4px 3px 0 repeat stretch;
  border-radius: 0;
}

.tabbrowser-tab:hover,
.tabs-newtab-button:hover {
  background-image: -moz-linear-gradient(bottom, rgba(10%,10%,10%,.4) 1px, transparent 1px), -moz-linear-gradient(hsla(0,0%,100%,.3) 1px, hsla(0,0%,75%,.2) 80%, hsla(0,0%,60%,.2)),
                    -moz-linear-gradient(-moz-dialog, -moz-dialog);
}


.tabbrowser-tab[selected="true"] {
  background-image: -moz-linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,.5) 50%),
                    -moz-linear-gradient(-moz-dialog, -moz-dialog);
}

#main-window[tabsontop=false]:not([disablechrome]) .tabbrowser-tab[selected=true]:not(:-moz-lwtheme) {
  background-image: -moz-linear-gradient(bottom, rgba(10%,10%,10%,.4) 1px, transparent 1px),
                    -moz-linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,.5) 50%),
                    -moz-linear-gradient(-moz-dialog, -moz-dialog);
}

.tabbrowser-tab:-moz-lwtheme {
  color: inherit;
}

.tabbrowser-tab[selected="true"]:-moz-lwtheme {
  background-image: -moz-linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,.5) 50%);
}

.tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]),
.tabs-newtab-button:-moz-lwtheme-brighttext {
  background-image: -moz-linear-gradient(hsla(0,0%,40%,.6), hsla(0,0%,30%,.6) 80%);
}

.tabbrowser-tab:-moz-lwtheme-brighttext:not([selected="true"]):hover,
.tabs-newtab-button:-moz-lwtheme-brighttext:hover {
  background-image: -moz-linear-gradient(hsla(0,0%,60%,.6), hsla(0,0%,45%,.6) 80%);
}

.tabbrowser-tab:-moz-lwtheme-darktext:not([selected="true"]),
.tabs-newtab-button:-moz-lwtheme-darktext {
  background-image: -moz-linear-gradient(hsla(0,0%,60%,.5), hsla(0,0%,45%,.5) 80%);
}

.tabbrowser-tab:-moz-lwtheme-darktext:not([selected="true"]):hover,
.tabs-newtab-button:-moz-lwtheme-darktext:hover {
  background-image: -moz-linear-gradient(hsla(0,0%,80%,.5), hsla(0,0%,60%,.5) 80%);
}

.tabbrowser-tab[pinned][titlechanged]:not([selected="true"]) {
  background-image: -moz-radial-gradient(center 3px, circle cover, rgba(255,255,255,1) 3%, rgba(186,221,251,.75) 40%, rgba(127,179,255,.5) 80%, rgba(127,179,255,.25));
}
.tabbrowser-tab[pinned][titlechanged]:not([selected="true"]):hover {
  background-image: -moz-linear-gradient(hsla(0,0%,100%,.4), hsla(0,0%,75%,.4) 80%),
                    -moz-radial-gradient(center 3px, circle cover, rgba(255,255,255,1) 3%, rgba(186,221,251,.75) 40%, rgba(127,179,255,.5) 80%, rgba(127,179,255,.25));
}

.tab-throbber,
.tab-icon-image {
  width: 16px;
  height: 16px;
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
  -moz-margin-start: 2px;
  -moz-margin-end: 3px;
}

.tab-throbber {
  list-style-image: url("chrome://browser/skin/tabbrowser/connecting.png");
}

.tab-throbber[progress] {
  list-style-image: url("chrome://browser/skin/tabbrowser/loading.png");
}

#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-tab[pinned] {
  min-height: 16px; /* corresponds to the max. height of non-textual tab contents, i.e. the favicon */
}

.tab-throbber[pinned],
.tab-icon-image[pinned] {
  -moz-margin-start: 5px;
  -moz-margin-end: 5px;
}

/* tabbrowser-tab focus ring */
.tabbrowser-tab:focus > .tab-stack {
  outline: 1px dotted;
}

/* Tab DnD indicator */
.tab-drop-indicator {
  list-style-image: url(chrome://browser/skin/tabbrowser/tabDragIndicator.png);
  margin-bottom: -11px;
}

/* Tab close button */
.tab-close-button {
  -moz-appearance: none;
  -moz-image-region: rect(0, 64px, 16px, 48px);
  border: none;
  padding: 0px;
  list-style-image: url("chrome://global/skin/icons/close.png");
}

.tab-close-button:-moz-system-metric(touch-enabled) {
  -moz-transform: scale(1.2);
}

.tab-close-button:hover,
.tab-close-button:hover[selected="true"] {
  -moz-image-region: rect(0, 32px, 16px, 16px);
}

.tab-close-button:hover:active,
.tab-close-button:hover:active[selected="true"] {
  -moz-image-region: rect(0, 48px, 16px, 32px);
}

.tab-close-button[selected="true"] {
  -moz-image-region: rect(0, 16px, 16px, 0);
}

.tab-close-button:focus {
  outline: none !important;
}

/* Tab scrollbox arrow, tabstrip new tab and all-tabs buttons */

@media all and (-moz-touch-enabled) {
  .tabbrowser-arrowscrollbox > .scrollbutton-up,
  .tabbrowser-arrowscrollbox > .scrollbutton-down,
  #TabsToolbar .toolbarbutton-1 {
    min-width: 8.1mozmm;
  }

  .tabs-newtab-button {
    min-width: 10mozmm;
  }

  .tab-content {
    min-height: -moz-calc(6.8mozmm - 7px); /* subtract borders from the desired height */
  }
}

.tabbrowser-arrowscrollbox > .scrollbutton-up,
.tabbrowser-arrowscrollbox > .scrollbutton-down {
  list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-left.png");
  -moz-image-region: rect(0, 15px, 17px, 0);
  margin: 0;
  padding-right: 2px;
  border-right: 2px solid transparent;
  background-origin: border-box;
}

.tabbrowser-arrowscrollbox > .scrollbutton-up[disabled],
.tabbrowser-arrowscrollbox > .scrollbutton-down[disabled] {
  opacity: .4;
}

.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled]):hover:active,
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled]):hover:active {
  -moz-image-region: rect(0, 30px, 17px, 15px);
}

.tabbrowser-arrowscrollbox > .scrollbutton-up:-moz-locale-dir(rtl),
.tabbrowser-arrowscrollbox > .scrollbutton-down:-moz-locale-dir(ltr) {
  -moz-transform: scaleX(-1);
}

.tabbrowser-arrowscrollbox > .scrollbutton-down {
  -moz-transition: 1s background-color ease-out;
}

.tabbrowser-arrowscrollbox > .scrollbutton-down[notifybgtab] {
  background-color: Highlight;
  -moz-transition: none;
}

.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled]),
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled]) {
  -moz-border-image: url("chrome://browser/skin/tabbrowser/tab-overflow-border.png") 0 2 0 2 / 0 2px 0 0;
}

.tabs-newtab-button > .toolbarbutton-icon {
  margin-top: -1px;
  margin-bottom: -1px;
}

.tabs-newtab-button,
#TabsToolbar > #new-tab-button,
#TabsToolbar > toolbarpaletteitem > #new-tab-button {
  list-style-image: url(chrome://browser/skin/tabbrowser/newtab.png);
  -moz-image-region: rect(0, 16px, 18px, 0);
}

.tabs-newtab-button {
  width: 28px;
}

#TabsToolbar > #new-tab-button {
  width: 26px;
}

.tabs-newtab-button:hover:active,
#TabsToolbar > #new-tab-button:hover:active {
  -moz-image-region: rect(0, 32px, 18px, 16px);
}

#alltabs-button {
  list-style-image: url("chrome://browser/skin/tabbrowser/alltabs.png");
  -moz-image-region: rect(0, 14px, 16px, 0);
}

#alltabs-button:hover:active {
  -moz-image-region: rect(0, 28px, 16px, 14px);
}

#alltabs-button[type="menu"] {
  list-style-image: url("chrome://browser/skin/mainwindow-dropdown-arrow.png");
  -moz-image-region: rect(0, 13px, 11px, 0);
}

#alltabs-button[type="menu"] > .toolbarbutton-icon {
  margin: 3px 0;
}

#alltabs-button[type="menu"] > .toolbarbutton-menu-dropmarker {
  display: none;
}

#alltabs-button[type="menu"]:hover:active,
#alltabs-button[type="menu"][open="true"] {
  -moz-image-region: rect(0, 26px, 11px, 13px);
}

/* All tabs menupopup */
.alltabs-item > .menu-iconic-left > .menu-iconic-icon {
  list-style-image: url("chrome://global/skin/icons/folder-item.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

.alltabs-item[selected="true"] {
  font-weight: bold;
}

.alltabs-item[busy] > .menu-iconic-left > .menu-iconic-icon {
  list-style-image: url("chrome://global/skin/icons/loading_16.png");
}

.alltabs-item[tabIsVisible] {
  /* box-shadow instead of background-color to work around native styling */
  box-shadow: inset 0 0 0 2em hsla(0,0%,50%,.15);
}

/* Tabstrip close button */
.tabs-closebutton {
  -moz-appearance: none;
  list-style-image: url("chrome://global/skin/icons/close.png");
  -moz-image-region: rect(0, 16px, 16px, 0);
  padding: 4px 2px;
  margin: 0px;
  border: none;
}

.tabs-closebutton > .toolbarbutton-icon {
  -moz-margin-end: 0px !important;
  -moz-padding-end: 2px !important;
  -moz-padding-start: 2px !important;
}

.tabs-closebutton:hover {
  -moz-image-region: rect(0, 32px, 16px, 16px);
}

.tabs-closebutton:hover:active {
  -moz-image-region: rect(0, 48px, 16px, 32px);
}

toolbarbutton.chevron {
  list-style-image: url("chrome://global/skin/toolbar/chevron.gif") !important;
}

toolbarbutton.chevron:-moz-locale-dir(rtl) > .toolbarbutton-icon {
  -moz-transform: scaleX(-1);
}

toolbarbutton.chevron > .toolbarbutton-text,
toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
  display: none;
}

toolbarbutton.chevron > .toolbarbutton-icon {
  margin: 0;
}

toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
  display: -moz-box; /* display chevron icon in text mode */
}

#sidebar-throbber[loading="true"] {
  list-style-image: url("chrome://global/skin/icons/loading_16.png");
  -moz-margin-end: 4px;
}

/* Bookmarks toolbar */
#PlacesToolbarDropIndicator {
  list-style-image: url(chrome://browser/skin/places/toolbarDropMarker.png);
}

toolbarbutton.bookmark-item[dragover="true"][open="true"] {
  -moz-appearance: none;
  background: Highlight !important;
  color: HighlightText !important;
}

/* rules for menupopup drop indicators */
.menupopup-drop-indicator-bar {
  position: relative;
  /* these two margins must together compensate the indicator's height */
  margin-top: -1px;
  margin-bottom: -1px;
}

.menupopup-drop-indicator {
  list-style-image: none;
  height: 2px;
  -moz-margin-end: -4em;
  background-color: Highlight;
}

/* ::::: Identity Indicator Styling ::::: */

/* Popup Icons */
#identity-popup-icon {
  height: 64px;
  width: 64px;
  padding: 0;
  list-style-image: url("chrome://browser/skin/identity.png");
  -moz-image-region: rect(0px, 64px, 64px, 0px);
}

#identity-popup.verifiedDomain > #identity-popup-container > #identity-popup-icon {
  -moz-image-region: rect(64px, 64px, 128px, 0px);
}

#identity-popup.verifiedIdentity > #identity-popup-container > #identity-popup-icon {
  -moz-image-region: rect(128px, 64px, 192px, 0px);
}

/* Popup Body Text */
.identity-popup-description {
  white-space: pre-wrap;
  -moz-padding-start: 15px;
  margin: 2px 0 4px;
}

.identity-popup-label {
  white-space: pre-wrap;
  -moz-padding-start: 15px;
  margin: 0;
}

#identity-popup-content-host ,
#identity-popup-content-box.verifiedIdentity > #identity-popup-content-owner {
  font-size: 1.2em;
}

#identity-popup-content-host {
  margin-top: 3px;
  margin-bottom: 5px;
  font-weight: bold;
  max-width: 300px;
}

#identity-popup-content-owner {
  margin-top: 4px;
  margin-bottom: 0 !important;
  font-weight: bold;
  max-width: 300px;
}

.verifiedDomain > #identity-popup-content-owner {
  font-weight: normal;
}

#identity-popup-content-verifier {
  margin: 4px 0 2px;
}

#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption {
  margin-top: 10px;
  -moz-margin-start: -24px;
}

#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption > vbox > #identity-popup-encryption-icon ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption > vbox > #identity-popup-encryption-icon {
  list-style-image: url("chrome://browser/skin/Secure24.png");
}

#identity-popup-more-info-button {
  margin-top: 6px;
  margin-bottom: 0;
  -moz-margin-end: 0;
}

.popup-notification-icon {
  width: 64px;
  height: 64px;
  -moz-margin-end: 10px;
}

.popup-notification-icon[popupid="geolocation"] {
  list-style-image: url(chrome://browser/skin/Geolocation-64.png);
}

.popup-notification-icon[popupid="xpinstall-disabled"],
.popup-notification-icon[popupid="addon-progress"],
.popup-notification-icon[popupid="addon-install-cancelled"],
.popup-notification-icon[popupid="addon-install-blocked"],
.popup-notification-icon[popupid="addon-install-failed"],
.popup-notification-icon[popupid="addon-install-complete"] {
  list-style-image: url(chrome://mozapps/skin/extensions/extensionGeneric.png);
  width: 32px;
  height: 32px;
}

.addon-progress-description {
  width: 350px;
  max-width: 350px;
}

.popup-progress-label,
.popup-progress-meter {
  -moz-margin-start: 0;
  -moz-margin-end: 0;
}

.popup-progress-cancel {
  -moz-appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  min-height: 0;
  min-width: 0;
  list-style-image: url(chrome://mozapps/skin/downloads/downloadButtons.png);
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}

.popup-progress-cancel:hover {
  -moz-image-region: rect(16px, 32px, 32px, 16px);
}

.popup-progress-cancel:active {
  -moz-image-region: rect(32px, 32px, 48px, 16px);
}

.popup-notification-icon[popupid="indexedDB-permissions-prompt"],
.popup-notification-icon[popupid="indexedDB-quota-prompt"] {
  list-style-image: url(chrome://global/skin/icons/question-64.png);
}

.popup-notification-icon[popupid="password-save"],
.popup-notification-icon[popupid="password-change"] {
  list-style-image: url(chrome://mozapps/skin/passwordmgr/key-64.png);
}

/* Notification icon box */
#notification-popup-box {
  position: relative;
  background-color: #fff;
  background-clip: padding-box;
  padding-left: 3px;
  border-radius: 2.5px 0 0 2.5px;
  -moz-border-image: url("chrome://browser/skin/urlbar-arrow.png") 0 8 0 0 / 0 8px 0 0;
  -moz-margin-end: -8px;
  margin-top: -2px;
  margin-bottom: -2px;
}

#notification-popup-box:not([hidden]) + #identity-box {
  -moz-padding-start: 10px;
  border-radius: 0;
}

#notification-popup-box:-moz-locale-dir(rtl),
.notification-anchor-icon:-moz-locale-dir(rtl) {
  -moz-transform: scaleX(-1);
}

.notification-anchor-icon {
  width: 16px;
  height: 16px;
}

.notification-anchor-icon:-moz-focusring {
  outline: 1px dotted -moz-DialogText;
  outline-offset: -3px;
}

#default-notification-icon {
  list-style-image: url(chrome://global/skin/icons/information-16.png);
}

#geo-notification-icon {
  list-style-image: url(chrome://browser/skin/Geolocation-16.png);
}

#addons-notification-icon {
  list-style-image: url(chrome://mozapps/skin/extensions/extensionGeneric-16.png);
}

#indexedDB-notification-icon {
  list-style-image: url(chrome://global/skin/icons/question-16.png);
}

#password-notification-icon {
  list-style-image: url(chrome://mozapps/skin/passwordmgr/key-16.png);
}

#identity-popup-container {
  min-width: 280px;
}

#download-monitor {
  list-style-image: url("chrome://browser/skin/Toolbar.png");
  -moz-image-region: rect(0, 108px, 18px, 90px);
}

/* Bookmarks roots menu-items */
#appmenu_subscribeToPage:not([disabled]),
#appmenu_subscribeToPageMenu,
#subscribeToPageMenuitem:not([disabled]),
#subscribeToPageMenupopup,
#BMB_subscribeToPageMenuitem:not([disabled]),
#BMB_subscribeToPageMenupopup {
  list-style-image: url("chrome://browser/skin/feeds/feedIcon16.png");
}

#bookmarksToolbarFolderMenu,
#appmenu_bookmarksToolbar,
#BMB_bookmarksToolbar {
  list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png");
  -moz-image-region: auto;
}

#appmenu_unsortedBookmarks,
#BMB_unsortedBookmarks {
  list-style-image: url("chrome://browser/skin/places/unsortedBookmarks.png");
  -moz-image-region: auto;
}

/* ::::: Keyboard UI Panel ::::: */

.KUI-panel {
  -moz-appearance: none;
  background: rgba(27%,27%,27%,.9) url(KUI-background.png) repeat-x;
  color: white;
  border-style: none;
  border-radius: 20px;
}

.KUI-panel[level="top"] {
  background-color: rgba(27%,27%,27%,.65);
}

.KUI-panel-closebutton {
  list-style-image: url(KUI-close.png);
  -moz-appearance: none;
  border: none;
  padding: 0;
  width: 24px;
  height: 24px;
}

.KUI-panel-closebutton:not(:hover) {
  opacity: .6;
}

.KUI-panel-closebutton > .toolbarbutton-icon {
  margin: 0;
}

/* ::::: Ctrl-Tab and All Tabs Panels ::::: */

/* Ctrl-Tab */

#ctrlTab-panel {
  padding: 20px 10px 10px;
  font-weight: bold;
  text-shadow: 0 0 1px rgb(27%,27%,27%), 0 0 2px rgb(27%,27%,27%);
}

.ctrlTab-favicon[src] {
  background-color: white;
  width: 20px;
  height: 20px;
  padding: 2px;
}

.ctrlTab-preview-inner > .tabPreview-canvas {
  box-shadow: 1px 1px 2px rgb(12%,12%,12%);
}

.ctrlTab-preview:not(#ctrlTab-showAll) > * > .ctrlTab-preview-inner > .tabPreview-canvas {
  margin-bottom: 2px;
}

.ctrlTab-preview-inner {
  padding-bottom: 10px;
}

#ctrlTab-showAll:not(:focus) > * > .ctrlTab-preview-inner {
  padding: 10px;
  background-color: rgba(255,255,255,.2);
  border-radius: .5em;
}

.ctrlTab-preview:focus > * > .ctrlTab-preview-inner {
  color: white;
  background-color: rgba(0,0,0,.6);
  text-shadow: none;
  padding: 8px;
  border: 2px solid white;
  border-radius: .5em;
}

.ctrlTab-preview:not(#ctrlTab-showAll):focus > * > .ctrlTab-preview-inner {
  margin: -10px -10px 0;
}

#ctrlTab-showAll {
  margin-top: .5em;
}

/* All Tabs */

#allTabs-panel {
  padding-bottom: 10px;
  -moz-appearance: none;
  border: none;
  background: -moz-dialog;
  color: -moz-dialogText;
}

#allTabs-meta {
  margin: 10px;
}

#allTabs-filter {
  -moz-margin-start: 24px;
  -moz-margin-end: 0;
}

#allTabs-tab-close-button > .toolbarbutton-icon {
  margin: 0;
}

.allTabs-favicon[src] {
  background-color: -moz-dialog;
  width: 22px;
  height: 22px;
  padding-top: 1px;
  padding-bottom: 5px;
  -moz-padding-start: 1px;
  -moz-padding-end: 5px;
  margin-top: -2px;
  -moz-margin-start: -2px;
  border-bottom-right-radius: 4px;
}

.allTabs-favicon[src]:-moz-locale-dir(rtl) {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 4px;
}

.allTabs-preview-inner > .tabPreview-canvas {
  background-color: rgb(60%,60%,60%);
  box-shadow: 0 0 1.5px ThreeDShadow;
}

.allTabs-preview:not(:hover):not([closebuttonhover]) > html|canvas {
  opacity: .8;
}

.allTabs-preview:focus > * > .allTabs-preview-inner {
  outline: 1px dotted -moz-dialogText;
}

/* Inspector / Highlighter */

#highlighter-panel {
  -moz-appearance: none;
  -moz-window-shadow: none;
  background: -moz-linear-gradient(top -1deg, #ffdd88, #ffeeaa);
  border: none;
  opacity: 0.35;
}

listitem.style-selector {
  background-color: DarkGray;
  color: white;
}

listitem.style-section {
  background-color: LightGray;
  color: black;
  font-weight: bold;
}

panel[dimmed="true"] {
  opacity: 0.5;
}

/* Add-on bar */

#addon-bar {
  min-height: 20px;
  border-top: 1px solid ThreeDShadow !important;
}

#addon-bar:not(:-moz-lwtheme) {
  -moz-appearance: statusbar;
}

#status-bar {
  -moz-appearance: none;
  background-color: transparent;
  border: none;
  min-height: 0;
}

#status-bar > statusbarpanel {
  border-width: 0;
  -moz-appearance: none;
}

#addonbar-closebutton {
  border: none;
  padding: 0 5px;
  list-style-image: url("chrome://global/skin/icons/close.png");
  -moz-appearance: none;
  -moz-image-region: rect(0, 16px, 16px, 0);
}

#addonbar-closebutton:hover {
  -moz-image-region: rect(0, 32px, 16px, 16px);
}

#addonbar-closebutton:hover:active {
  -moz-image-region: rect(0, 48px, 16px, 32px);
}

/* Status panel */

.statuspanel-label {
  margin: 0;
  padding: 2px 4px;
  background: -moz-linear-gradient(white, #ddd);
  border: 1px none #ccc;
  border-top-style: solid;
  color: #333;
  text-shadow: none;
}

.statuspanel-label:-moz-locale-dir(ltr):not([mirror]),
.statuspanel-label:-moz-locale-dir(rtl)[mirror] {
  border-right-style: solid;
  border-top-right-radius: .3em;
  margin-right: 1em;
}

.statuspanel-label:-moz-locale-dir(rtl):not([mirror]),
.statuspanel-label:-moz-locale-dir(ltr)[mirror] {
  border-left-style: solid;
  border-top-left-radius: .3em;
  margin-left: 1em;
}


@media not all and (-moz-windows-classic) {
  #main-window[sizemode="normal"] > #titlebar > #titlebar-content > #appmenu-button-container {
    margin-top: 1px;
  }

  #appmenu-button {
    border-width: 2px;
    -moz-border-left-colors: rgba(255,255,255,.5) rgba(83,42,6,.9);
    -moz-border-bottom-colors: rgba(255,255,255,.5) rgba(83,42,6,.9);
    -moz-border-right-colors: rgba(255,255,255,.5) rgba(83,42,6,.9);
    margin-bottom: 1px; /* compensate white outer border */
    box-shadow: 0 1px 0 rgba(255,255,255,.25) inset,
                0 0 2px 1px rgba(255,255,255,.25) inset;
  }

  #main-window[privatebrowsingmode=temporary] #appmenu-button {
    -moz-border-left-colors: rgba(255,255,255,.5) rgba(43,8,65,.9);
    -moz-border-bottom-colors: rgba(255,255,255,.5) rgba(43,8,65,.9);
    -moz-border-right-colors: rgba(255,255,255,.5) rgba(43,8,65,.9);
  }

  #appmenu-popup {
    margin-top: -1px;
    -moz-margin-start: 1px;
  }

  .panel-promo-message {
    font-style: italic;
  }
}

@media all and (-moz-windows-default-theme) {
  #navigator-toolbox > toolbar:not(:-moz-lwtheme),
  #addon-bar:not(:-moz-lwtheme) {
    background-color: hsl(214,44%,87%);
  }

  .tabbrowser-tab:not(:-moz-lwtheme),
  .tabs-newtab-button:not(:-moz-lwtheme) {
    background-image: -moz-linear-gradient(bottom, rgba(10%,10%,10%,.4) 1px, transparent 1px), -moz-linear-gradient(transparent, hsla(0,0%,45%,.1) 1px, hsla(0,0%,32%,.2) 80%, hsla(0,0%,0%,.2)),
                      -moz-linear-gradient(hsl(214,44%,87%), hsl(214,44%,87%));
  }

  .tabbrowser-tab:not(:-moz-lwtheme):hover,
  .tabs-newtab-button:not(:-moz-lwtheme):hover {
    background-image: -moz-linear-gradient(bottom, rgba(10%,10%,10%,.4) 1px, transparent 1px), -moz-linear-gradient(hsla(0,0%,100%,.3) 1px, hsla(0,0%,75%,.2) 80%, hsla(0,0%,60%,.2)),
                      -moz-linear-gradient(hsl(214,44%,87%), hsl(214,44%,87%));
  }

  .tabbrowser-tab[selected="true"]:not(:-moz-lwtheme) {
    background-image: -moz-linear-gradient(white, rgba(255,255,255,.5) 50%),
                      -moz-linear-gradient(hsl(214,44%,87%), hsl(214,44%,87%));
  }

  #main-window[tabsontop=false]:not([disablechrome]) .tabbrowser-tab[selected=true]:not(:-moz-lwtheme) {
    background-image: -moz-linear-gradient(bottom, rgba(10%,10%,10%,.4) 1px, transparent 1px),
                      -moz-linear-gradient(white, rgba(255,255,255,.5) 50%),
                      -moz-linear-gradient(hsl(214,44%,87%), hsl(214,44%,87%));
  }

  #sidebar-splitter {
    border: 0;
    -moz-border-end: 1px solid #A9B7C9;
    min-width: 0;
    width: 3px;
    background-color: transparent;
    -moz-margin-start: -3px;
    position: relative;
  }
}

@media all and (-moz-windows-compositor) {
  /* These should be hidden w/ glass enabled. Windows draws its own buttons. */
  .titlebar-button {
    display: none;
  }

  #main-window[sizemode="maximized"] #titlebar-buttonbox {
    -moz-margin-end: 3px;
  }

  #main-window {
    -moz-appearance: -moz-win-borderless-glass;
    background: transparent;
  }

  #appcontent {
    -moz-appearance: -moz-win-exclude-glass;
  }

  #main-window[chromemargin^="0,"][sizemode=normal] #navigator-toolbox {
    margin-top: -7px;
  }

  /* Artificially draw window borders that are covered by lwtheme, see bug 591930. */
  #main-window[sizemode="normal"] > #titlebar > #titlebar-content:-moz-lwtheme {
    border-top: 2px solid;
    -moz-border-top-colors: rgb(37, 44, 51) rgba(255,255,255,.6);
  }

  #main-window[sizemode="normal"] > #titlebar > #titlebar-content:-moz-lwtheme:-moz-window-inactive {
    -moz-border-top-colors: rgb(102, 102, 102) rgba(255,255,255,.6);
  }

  #main-window[sizemode="normal"] > #titlebar > #titlebar-content > #appmenu-button-container:-moz-lwtheme {
    margin-top: -1px;
  }

  #main-window[sizemode="normal"] #titlebar-buttonbox:-moz-lwtheme {
    margin-top: -2px;
  }

  #appmenu-button {
    margin-bottom: -1px; /* compensate white outer border */
  }

  #main-window[sizemode=fullscreen]:not(:-moz-lwtheme) {
    -moz-appearance: none;
    background-color: #556;
  }

  #toolbar-menubar:not(:-moz-lwtheme),
  #TabsToolbar[tabsontop=true]:not(:-moz-lwtheme),
  #navigator-toolbox[tabsontop=false] > #nav-bar:not(:-moz-lwtheme),
  #nav-bar + #customToolbars + #PersonalToolbar[collapsed=true] + #TabsToolbar[tabsontop=false]:last-child:not(:-moz-lwtheme) {
    background-color: transparent !important;
    color: black;
    text-shadow: 0 0 .5em white, 0 0 .5em white, 0 1px 0 rgba(255,255,255,.4);
    border-left-style: none !important;
    border-right-style: none !important;
  }

  /* Vertical toolbar border */
  #main-window[sizemode=normal] #navigator-toolbox::after,
  #main-window[sizemode=normal] #navigator-toolbox[tabsontop=true] > toolbar:not(#toolbar-menubar):not(#TabsToolbar),
  #main-window[sizemode=normal] #navigator-toolbox[tabsontop=false] > toolbar:not(#toolbar-menubar):not(#nav-bar) {
    border-left: 1px solid rgba(10%,10%,10%,.4);
    border-right: 1px solid rgba(10%,10%,10%,.4);
    background-clip: padding-box;
  }
  #main-window[sizemode=normal] #navigator-toolbox > toolbar:-moz-lwtheme {
    border-color: transparent !important;
  }
  #main-window[sizemode=normal] #browser-border-start,
  #main-window[sizemode=normal] #browser-border-end {
    display: -moz-box;
    background-color: rgba(10%,10%,10%,.4);
    width: 1px;
  }
  #main-window[sizemode=normal] #browser-bottombox {
    border: 1px solid rgba(10%,10%,10%,.4);
    border-top-style: none;
  }

  #main-window[sizemode=normal][tabsontop=false] #PersonalToolbar:not(:-moz-lwtheme) {
    border-top-left-radius: 3.5px;
    border-top-right-radius: 3.5px;
  }

  /* Toolbar shadow behind tabs */
  /* This code is only needed for restored windows (i.e. sizemode=normal)
     because of the border radius on the toolbar below the tab bar. */
  #main-window[sizemode=normal][tabsontop=true] #nav-bar:not(:-moz-lwtheme),
  #main-window[sizemode=normal][tabsontop=true] > #nav-bar[collapsed=true]:not([customizing]) + toolbar:not(:-moz-lwtheme),
  #main-window[sizemode=normal][tabsontop=true] > #nav-bar[collapsed=true]:not([customizing]) + #customToolbars + #PersonalToolbar:not(:-moz-lwtheme) {
    border-top: 1px solid rgba(10%,10%,10%,.4);
    border-top-left-radius: 3.5px;
    border-top-right-radius: 3.5px;
    background-clip: padding-box;
  }
  #main-window[sizemode=normal]:not([disablechrome]) #TabsToolbar[tabsontop=true]:not(:-moz-lwtheme) {
    margin-bottom: -1px;
    background-image: none !important;
  }
  #main-window[sizemode=normal]:not([disablechrome]) #tabbrowser-tabs[tabsontop=true] > .tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox > .scrollbox-innerbox:not(:-moz-lwtheme) {
    position: relative;
  }

  #navigator-toolbox[tabsontop=false] > #PersonalToolbar {
    margin-top: 3px;
  }
  #navigator-toolbox[tabsontop=false] > #PersonalToolbar:not(:-moz-lwtheme) {
    margin-top: 2px;
    border-top: 1px solid rgba(10%,10%,10%,.4);
    background-image: -moz-linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0));
  }

  #main-window[sizemode=normal] #TabsToolbar[tabsontop=true] {
    padding-left: 4px;
    padding-right: 4px;
  }

  #main-window[sizemode=normal] #TabsToolbar[tabsontop=false] {
    padding-left: 2px;
    padding-right: 2px;
  }

  /* Make the window draggable by glassed toolbars (bug 555081) */
  #toolbar-menubar:not([autohide="true"]),
  #TabsToolbar[tabsontop="true"],
  #navigator-toolbox[tabsontop="false"] > #nav-bar,
  #nav-bar + #customToolbars + #PersonalToolbar[collapsed="true"] + #TabsToolbar[tabsontop="false"]:last-child,
  #navigator-toolbox > toolbar:not(#toolbar-menubar):-moz-lwtheme {
    -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-drag");
  }

  #appcontent:not(:-moz-lwtheme) {
    background-color: -moz-dialog;
  }

  #browser-bottombox:not(:-moz-lwtheme) {
    background-color: -moz-dialog;
    background-clip: padding-box;
  }

  #main-window[sizemode=normal] #browser-bottombox:not(:-moz-lwtheme),
  #main-window[sizemode=normal] #addon-bar:not(:-moz-lwtheme) {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
  }

  #addon-bar:not(:-moz-lwtheme) {
    -moz-appearance: none;
    border-bottom-style: none;
    background-image: -moz-linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0));
  }

  #main-menubar:not(:-moz-lwtheme):not(:-moz-window-inactive) {
    background-color: rgba(255,255,255,.5);
    border-radius: 4px;
  }

  #urlbar,
  .searchbar-textbox {
    background-color: rgba(255,255,255,.725);
    border-color: rgba(0,0,0,.32);
    color: black;
  }

  html|*.urlbar-input:-moz-placeholder,
  .searchbar-textbox > .autocomplete-textbox-container > .textbox-input-box > html|*.textbox-input:-moz-placeholder {
    color: #777;
  }

  #urlbar:hover,
  .searchbar-textbox:hover {
    background-color: rgba(255,255,255,.898);
  }

  #urlbar[focused="true"],
  .searchbar-textbox[focused="true"] {
    background-color: white;
  }

  .tabbrowser-tab:not(:-moz-lwtheme) {
    text-shadow: none;
  }

  #main-window[sizemode=normal] .statuspanel-inner {
    /* align with the browser's side borders */
    padding-left: 1px;
    padding-right: 1px;
  }

  #allTabs-panel,
  #ctrlTab-panel {
    background: transparent;
    -moz-appearance: -moz-win-glass;
    border-radius: 0;
    border: none;
    font: normal 1.2em "Segoe UI";
    color: black;
    text-shadow: white -1px -1px .35em, white -1px 1px .35em, white 1px 1px .35em, white 1px -1px .35em;
  }

  #tab-view:-moz-lwtheme {
    background-image: url("chrome://browser/skin/tabview/grain.png"),
                      -moz-linear-gradient(rgba(255,255,255,0), #CCD9EA 200px, #C7D5E7);
    background-attachment: fixed;
  }
}

@media not all and (-moz-windows-compositor) {
  #main-window:-moz-system-metric(windows-default-theme) {
    background-color: rgb(185,209,234);
  }
  #main-window:-moz-system-metric(windows-default-theme):-moz-window-inactive {
    background-color: rgb(215,228,242);
  }

  #toolbar-menubar:not([autohide=true]):not(:-moz-lwtheme):-moz-system-metric(windows-default-theme),
  #TabsToolbar[tabsontop=true]:not(:-moz-lwtheme):-moz-system-metric(windows-default-theme),
  #navigator-toolbox[tabsontop=false] > toolbar:not(#toolbar-menubar):not(:-moz-lwtheme):-moz-system-metric(windows-default-theme) {
    -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar-drag");
    background-color: transparent;
  }
  #toolbar-menubar[autohide=true]:-moz-system-metric(windows-default-theme) {
    background-color: transparent;
  }

  #print-preview-toolbar:not(:-moz-lwtheme) {
    -moz-appearance: -moz-win-browsertabbar-toolbox;
  }
}

/* ::::: fullscreen window controls ::::: */

#window-controls {
  -moz-box-align: start;
}

#minimize-button,
#restore-button,
#close-button {
  -moz-appearance: none;
  border-style: none;
  margin: 0;
}
#close-button {
  -moz-image-region: rect(0, 49px, 16px, 32px);
}
#close-button:hover {
  -moz-image-region: rect(16px, 49px, 32px, 32px);
}
#close-button:hover:active {
  -moz-image-region: rect(32px, 49px, 48px, 32px);
}

#minimize-button:-moz-locale-dir(rtl),
#restore-button:-moz-locale-dir(rtl),
#close-button:-moz-locale-dir(rtl) {
  -moz-transform: scaleX(-1);
}

/* ::::: splitmenu highlight style that imitates Windows 7 start menu ::::: */
@media all and (-moz-windows-default-theme) {
  .splitmenu-menuitem,
  .splitmenu-menu {
    -moz-appearance: none;
    padding-top: 2px;
    padding-bottom: 2px;
    border: 1px solid transparent;
  }
  .splitmenu-menuitem {
    -moz-margin-end: 0;
  }
  .splitmenu-menu {
    -moz-margin-start: -1px;
  }
  .splitmenu-menuitem:-moz-locale-dir(ltr),
  .splitmenu-menu:-moz-locale-dir(rtl) {
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
  }
  .splitmenu-menu:-moz-locale-dir(ltr),
  .splitmenu-menuitem:-moz-locale-dir(rtl) {
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
  }

  .splitmenu-menuitem > .menu-text {
    -moz-margin-start: 1px !important;
    -moz-margin-end: 3px !important;
  }
  .splitmenu-menu > .menu-right {
    -moz-margin-end: -3px;
  }

  .splitmenu-menuitem[iconic],
  .splitmenu-menu[iconic] {
    padding-bottom: 1px;
  }
  .splitmenu-menuitem[iconic] > .menu-iconic-left {
    margin-top: -3px;
    margin-bottom: -2px;
    -moz-margin-start: -1px;
  }
  .splitmenu-menuitem[iconic] > .menu-iconic-text {
    -moz-margin-start: 2px !important;
    -moz-margin-end: 3px !important;
  }
  .splitmenu-menu[iconic] > .menu-right {
    margin-top: -1px;
  }

  .splitmenu-menuitem[_moz-menuactive],
  .splitmenu-menu[_moz-menuactive] {
    background-color: transparent;
    background-image: -moz-linear-gradient(#fafbfd, #ebf3fd);
    border-color: #aeccf1;
  }

  .splitmenu-menuitem[disabled][_moz-menuactive],
  .splitmenu-menu[disabled][_moz-menuactive] {
    background-image: -moz-linear-gradient(#f8f9f9, #eaeaea);
    border-color: #d8d7d7;
  }

  .splitmenu-menu[_moz-menuactive]:not(:hover):not([open]) {
    background-image: none;
  }
}
