/* ***** 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)
 *
 * 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 */
}

#nav-bar {
  -moz-appearance: none;
  border-style: none;
}

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

#navigator-toolbox[inFullscreen="true"] {
  border-top: none;
}

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

statusbarpanel#statusbar-display {
  -moz-padding-start: 0;
}

/* ::::: 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: 26em;
}

.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);
}

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

.toolbarbutton-menubutton-button,
.toolbarbutton-menubutton-dropmarker,
.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));
  -moz-background-clip: padding;
  -moz-border-radius: 4.5px;
  border: 1px solid;
  border-color: rgba(0,0,0,.12) rgba(0,0,0,.19) rgba(0,0,0,.38);
  -moz-box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
                   0 0 0 2px rgba(255,255,255,.1) inset,
                   0 1px 0 rgba(0,0,0,.15);
  color: black;
  text-shadow: 0 0 3px white;
}

.toolbarbutton-menubutton-dropmarker,
toolbar[iconsize="small"][mode="icons"] .toolbarbutton-menubutton-button,
toolbar[iconsize="small"][mode="icons"] .toolbarbutton-1 {
  padding-left: 3px;
  padding-right: 3px;
}

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

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

.toolbarbutton-1,
toolbarbutton[type="menu-button"] {
  margin: 1px 3px;
}

toolbar[iconsize="small"][mode="icons"] .toolbarbutton-1,
toolbar[iconsize="small"][mode="icons"] toolbarbutton[type="menu-button"] {
  margin-left: 2px;
  margin-right: 2px;
}

.toolbarbutton-menubutton-dropmarker {
  -moz-border-start-style: none;
}

.toolbarbutton-menubutton-button:-moz-locale-dir(ltr),
.toolbarbutton-menubutton-dropmarker:-moz-locale-dir(rtl) {
  -moz-border-radius-topright: 0;
  -moz-border-radius-bottomright: 0;
}

.toolbarbutton-menubutton-button:-moz-locale-dir(rtl),
.toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) {
  -moz-border-radius-topleft: 0;
  -moz-border-radius-bottomleft: 0;
}

.toolbarbutton-menubutton-button[disabled="true"],
.toolbarbutton-menubutton-dropmarker[disabled="true"],
.toolbarbutton-1[disabled="true"] {
  opacity: .8;
}

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

.toolbarbutton-menubutton-button:not([disabled="true"]):not(:active):hover,
toolbarbutton[type="menu-button"]:not([open="true"]):not(:active):hover > .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
.toolbarbutton-1:not([disabled="true"]):not([checked="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);
  -moz-box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
                   0 0 0 2px rgba(255,255,255,.1) inset,
                   0 1px 0 rgba(0,0,0,.1),
                   0 0 5px hsl(190,90%,80%);
  -moz-transition: background-color .4s ease-in,
                   border-color .3s ease-in,
                   -moz-box-shadow .3s ease-in;
}

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

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

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

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

/* unified back/forward button */

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

#forward-button {
  -moz-image-region: rect(0, 36px, 18px, 18px);
  border-left: none;
  -moz-margin-start: 0;
}

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

#back-button:-moz-locale-dir(ltr) {
  -moz-border-radius-topright: 0;
  -moz-border-radius-bottomright: 0;
}

#back-button:-moz-locale-dir(rtl),
#forward-button {
  -moz-border-radius-topleft: 0;
  -moz-border-radius-bottomleft: 0;
}

toolbar:not([iconsize="small"])[mode="icons"] #back-button {
  -moz-border-radius: 100%;
  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));
  -moz-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),
                   1px 2px 1px rgba(0,0,0,.2);
  -moz-image-region: rect(18px, 20px, 38px, 0);
}

toolbar:not([iconsize="small"])[mode="icons"] #back-button:not([disabled="true"]):not([checked="true"]):not(:active):hover {
  -moz-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),
                   1px 2px 1px rgba(0,0,0,.2),
                   0 0 5px 1px hsl(190,90%,80%);
}

toolbar:not([iconsize="small"])[mode="icons"] #back-button:not([disabled="true"]):hover:active {
  -moz-box-shadow: 0 0 9px rgba(0,0,0,.4) inset,
                   0 0 3px rgba(0,0,0,.4) inset,
                   0 0 0 1px rgba(0,0,0,.65),
                   0 2px 0 rgba(255,255,255,.4);
}

toolbar:not([iconsize="small"])[mode="icons"] #back-button > .toolbarbutton-icon {
  width: auto;
  height: auto;
}

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

toolbar:not([iconsize="small"])[mode="icons"] #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;
  padding-left: 7px;
  padding-right: 3px;
}

toolbar:not([iconsize="small"])[mode="icons"] #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;
}

#back-forward-dropmarker {
  -moz-appearance: none;
  padding: 0;
  -moz-padding-end: 2px;
  -moz-margin-start: -3px;
  border: none;
  list-style-image: url(mainwindow-dropdown-arrow.png);
  -moz-image-region: rect(0, 13px, 11px, 0);
}

#back-forward-dropmarker:not([disabled="true"]):hover:active,
#back-forward-dropmarker[open="true"] {
  -moz-image-region: rect(0, 26px, 11px, 13px);
}

#back-forward-dropmarker[disabled="true"] {
  opacity: .6;
}

#back-forward-dropmarker > .toolbarbutton-icon {
  display: -moz-box;
  margin: 0;
}

#back-forward-dropmarker > .toolbarbutton-menu-dropmarker {
  display: none;
}

.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);
}

/* 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 button */

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

/* 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);
}

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

#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;
  -moz-background-clip: padding;
  border: 1px solid;
  border-color: rgba(0,0,0,.25) rgba(0,0,0,.32) rgba(0,0,0,.37);
  -moz-border-radius: 4px;
  -moz-box-shadow: 0 1px 0 rgba(0,0,0,.1) inset,
                   0 1px 0 rgba(255,255,255,.4);
}

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

/*
#urlbar:-moz-lwtheme > .autocomplete-textbox-container > .textbox-input-box > html|*.textbox-input:-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-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;
}

#wrapper-urlbar-container > #urlbar-container > #urlbar > .autocomplete-history-dropmarker {
  display: none;
}

#urlbar > .autocomplete-textbox-container {
  direction: ltr;
  -moz-box-align: stretch;
}

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

/* identity box */

#identity-box {
  background-color: -moz-dialog;
  background-image: -moz-linear-gradient(rgba(255,255,255,.25), rgba(0,0,0,.15));
  color: -moz-dialogText;
  -moz-border-radius: 2px;
}

#identity-box:hover {
  background-image: -moz-linear-gradient(rgba(255,255,255,.5), rgba(50%,50%,50%,.2), rgba(0,0,0,.15));
}

#identity-box[open="true"],
#identity-box:hover:active {
  background-image: -moz-linear-gradient(rgba(0,0,0,.4), rgba(0,0,0,.1));
}

#identity-box.verifiedDomain,
#identity-box.verifiedIdentity {
  color: white;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
  -moz-box-shadow: 0 0 0 1px rgba(0,0,0,.2) inset;
}

#identity-box.verifiedDomain {
  background-color: hsl(219,45%,60%);
}

#identity-box.verifiedIdentity {
  background-color: hsl(92,45%,52%);
}

#identity-box:focus {
  outline: 1px dotted -moz-DialogText;
  outline-offset: -3px;
}

#identity-box.verifiedDomain:focus ,
#identity-box.verifiedIdentity:focus {
  outline-color: white;
}

#identity-icon-labels {
  -moz-margin-start: 1px;
  -moz-margin-end: 3px;
  -moz-transform: translate(0, -1px);
}

/* Location bar dropmarker */

#urlbar > .autocomplete-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 > .autocomplete-history-dropmarker:-moz-system-metric(touch-enabled) {
  min-width: .64cm;
}

#urlbar > .autocomplete-history-dropmarker:hover:active,
#urlbar > .autocomplete-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;
  background: url(urlbar-favicon-glow.png) center center no-repeat;
}

#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 */

#PopupAutoComplete,
#PopupAutoCompleteRichResult {
  direction: ltr !important;
}

#PopupAutoComplete:-moz-locale-dir(rtl) > tree > treerows {
  direction: rtl;
}

#PopupAutoComplete .autocomplete-treebody {
  direction: ltr;
}

#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 {
  color: -moz-nativehyperlinktext;
}

%ifndef WINSTRIPE_AERO
.ac-url-text:-moz-system-metric(windows-default-theme) {
  color: #006600;
}
%endif

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"] {
  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:hover {
  -moz-image-region: rect(16px 16px 32px 0px);
}

/* 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 */

#editBookmarkPanel {
  -moz-appearance: menupopup;
  color: MenuText;
  padding: 4px;
}

#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;
}

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

#sidebar {
  background-color: Window;
}

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

#status-bar {
  border-top: none;
}

#security-button[level="high"],
#security-button[level="low"] {
  list-style-image: url("chrome://browser/skin/Secure.png");
}

#security-button[level="broken"] {
  list-style-image: url("chrome://browser/skin/Security-broken.png");
}

#page-report-button {
  width: 20px;
  list-style-image: url("chrome://browser/skin/Info.png");
}

/* ::::: 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 {
  -moz-appearance: none;
  min-height: 0;
  padding: 0;
  border-style: none;
  margin-bottom: 2px;
  -moz-box-shadow: ThreeDShadow 0 -1px inset, -moz-dialog 0 2px;
}

.tabbrowser-tabs:-moz-system-metric(touch-enabled) {
  min-height: .81cm;
}

.tabbrowser-tabs:not([overflow="true"]) {
  -moz-margin-start: 3px;
}

/* Tabs */
.tabbrowser-tab,
.tabbrowser-arrowscrollbox > .scrollbutton-up,
.tabbrowser-arrowscrollbox > .scrollbutton-down,
.tabs-newtab-button,
.tabs-alltabs-button {
  -moz-appearance: none;
  background: url("chrome://browser/skin/tabbrowser/tab-bkgnd.png") repeat-x;
  margin: 3px 0 1px;
  border: 2px solid;
  border-right-width: 1px;
  border-bottom: none;
  -moz-border-top-colors: ThreeDShadow rgba(255,255,255,.3);
  -moz-border-left-colors: ThreeDShadow rgba(255,255,255,.3);
}

.tabbrowser-tab:-moz-lwtheme-brighttext,
.tabbrowser-arrowscrollbox > .scrollbutton-up:-moz-lwtheme-brighttext,
.tabbrowser-arrowscrollbox > .scrollbutton-down:-moz-lwtheme-brighttext,
.tabs-newtab-button:-moz-lwtheme-brighttext,
.tabs-alltabs-button:-moz-lwtheme-brighttext {
  background-color: rgba(0,0,0,.5);
}

.tabbrowser-tab:-moz-lwtheme-darktext,
.tabbrowser-arrowscrollbox > .scrollbutton-up:-moz-lwtheme-darktext,
.tabbrowser-arrowscrollbox > .scrollbutton-down:-moz-lwtheme-darktext,
.tabs-newtab-button:-moz-lwtheme-darktext,
.tabs-alltabs-button:-moz-lwtheme-darktext {
  background-color: rgba(255,255,255,.5);
}

.tabbrowser-tab {
  padding: 0 1px 1px 0;
  -moz-border-radius-topleft: 2px;
  -moz-border-radius-topright: 2px;
  -moz-border-right-colors: rgba(0,0,0,.1);
}

.tabbrowser-tab:hover,
.tabbrowser-tab[selected="true"] {
  border-width: 1px;
  -moz-border-radius-topleft: 4px;
  -moz-border-radius-topright: 4px;
  -moz-border-top-colors: ThreeDShadow;
  -moz-border-right-colors: ThreeDShadow;
  -moz-border-left-colors: ThreeDShadow;
}

.tabbrowser-tab:not([selected="true"]):hover {
  margin: 2px 0 1px;
  padding: 2px 1px 1px;
  background-image: url("chrome://browser/skin/tabbrowser/tab-hover-bkgnd.png");
}

.tabbrowser-tab[selected="true"] {
  margin: 2px 0 0;
  padding: 1px;
  background-image: url("chrome://browser/skin/tabbrowser/tab-active-bkgnd.png");
  background-color: -moz-dialog;
  font-weight: bold;
}

.tabbrowser-tab:-moz-lwtheme[selected="true"] {
  text-shadow: none;
}

.tabbrowser-tab:-moz-lwtheme:not([selected="true"]) {
  color: inherit;
}

.tabbrowser-tab[busy] > .tab-icon-image {
  list-style-image: url("chrome://browser/skin/tabbrowser/progress.png") !important;
  -moz-image-region: rect(0, 16px, 16px, 0);
}
.tabbrowser-tab[busy][stalled] > .tab-icon-image {
  list-style-image: url("chrome://browser/skin/tabbrowser/progress-pulsing.png") !important;
}
.tabbrowser-tab[busy][progress="1"] > .tab-icon-image {
  -moz-image-region: rect(0, 32px, 16px, 16px);
}
.tabbrowser-tab[busy][progress="2"] > .tab-icon-image {
  -moz-image-region: rect(0, 48px, 16px, 32px);
}
.tabbrowser-tab[busy][progress="3"] > .tab-icon-image {
  -moz-image-region: rect(0, 64px, 16px, 48px);
}
.tabbrowser-tab[busy][progress="4"] > .tab-icon-image {
  -moz-image-region: rect(0, 80px, 16px, 64px);
}
.tabbrowser-tab[busy][progress="5"] > .tab-icon-image {
  -moz-image-region: rect(0, 96px, 16px, 80px);
}
.tabbrowser-tab[busy][progress="6"] > .tab-icon-image {
  -moz-image-region: rect(0, 112px, 16px, 96px);
}
.tabbrowser-tab[busy][progress="7"] > .tab-icon-image {
  -moz-image-region: rect(0, 128px, 16px, 112px);
}
.tabbrowser-tab[busy][progress="8"] > .tab-icon-image {
  -moz-image-region: rect(0, 144px, 16px, 128px);
}

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

/* tabbrowser-tab focus ring */
.tabbrowser-tab > .tab-text {
  border: 1px dotted transparent;
}

.tabbrowser-tab:focus > .tab-text {
  border: 1px dotted -moz-DialogText;
}

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

/* Tab close button */
.tab-close-button > .toolbarbutton-icon {
  -moz-margin-end: 0px !important;
  margin-top: 1px;
}

.tab-close-button {
  -moz-appearance: none;
  -moz-image-region: rect(0px, 56px, 14px, 42px);
  -moz-margin-end: 6px;
  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.3);
}

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

.tab-close-button:hover:active,
.tabbrowser-tab[selected="true"] > .tab-close-button:hover:active {
  -moz-image-region: rect(0px, 42px, 14px, 28px);
}

.tabbrowser-tab[selected="true"] > .tab-close-button {
  -moz-image-region: rect(0px, 14px, 14px, 0px);
  /* Make this button focusable so clicking on it will not focus the tab while
     it's getting closed */
  -moz-user-focus: normal;
}

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

/* Tab scrollbox arrow, tabstrip new tab and all-tabs buttons */
.tabbrowser-arrowscrollbox > .scrollbutton-up,
.tabbrowser-arrowscrollbox > .scrollbutton-down,
.tabs-newtab-button,
.tabs-alltabs-button {
  width: 18px;
  padding: 0;
  -moz-border-right-colors: ThreeDShadow;
  -moz-image-region: rect(0, 11px, 14px, 0);
}

.tabbrowser-arrowscrollbox > .scrollbutton-up:-moz-system-metric(touch-enabled),
.tabbrowser-arrowscrollbox > .scrollbutton-down:-moz-system-metric(touch-enabled),
.tabs-alltabs-button:-moz-system-metric(touch-enabled) {
  min-width: .81cm;
}

.tabs-newtab-button:-moz-system-metric(touch-enabled) {
  min-width: 1cm;
}

.tabbrowser-arrowscrollbox > .scrollbutton-up:not([disabled="true"]):hover,
.tabbrowser-arrowscrollbox > .scrollbutton-down:not([disabled="true"]):hover,
.tabs-newtab-button:hover,
.tabs-alltabs-button:hover {
  border-top-width: 1px;
  padding-top: 1px;
  -moz-border-top-colors: ThreeDShadow;
  -moz-border-right-colors: ThreeDShadow;
  -moz-border-left-colors: ThreeDShadow transparent;
  background-image: url("chrome://browser/skin/tabbrowser/tab-hover-bkgnd.png");
}

.tabbrowser-arrowscrollbox > .scrollbutton-up,
.tabbrowser-arrowscrollbox > .scrollbutton-down {
  -moz-image-region: rect(0, 15px, 17px, 0);
}

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

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

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

.tabbrowser-arrowscrollbox > .scrollbutton-up:-moz-locale-dir(ltr) {
  border-left-style: none;
  -moz-border-radius-topright: 2px;
  list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-left.png");
}

.tabbrowser-arrowscrollbox > .scrollbutton-up:-moz-locale-dir(rtl) {
  border-right-style: none;
  -moz-border-radius-topleft: 2px;
  list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-right.png");
}

.tabbrowser-arrowscrollbox > .scrollbutton-down:-moz-locale-dir(ltr),
.tabbrowser-tabs > .tabs-newtab-button:-moz-locale-dir(ltr),
.tabs-alltabs-button:-moz-locale-dir(ltr) {
  border-right-style: none;
  -moz-border-radius-topleft: 2px;
}

.tabbrowser-arrowscrollbox > .scrollbutton-down {
  list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-right.png");
  -moz-transition: 1s background-color ease-out;
}

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

.tabbrowser-arrowscrollbox > .scrollbutton-down:-moz-locale-dir(rtl),
.tabbrowser-tabs > .tabs-newtab-button:-moz-locale-dir(rtl),
.tabs-alltabs-button:-moz-locale-dir(rtl) {
  border-left-style: none;
  -moz-border-radius-topright: 2px;
}

.tabbrowser-arrowscrollbox > .scrollbutton-down:-moz-locale-dir(rtl) {
  list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-left.png");
}

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

.tabs-newtab-button:hover:active {
  -moz-image-region: rect(0, 36px, 18px, 18px);
}

.tabbrowser-arrowscrollbox > .tabs-newtab-button {
  width: 31px;
  -moz-border-radius-topright: 2px;
  -moz-border-radius-topleft: 2px;
}

.tabs-alltabs-button > .toolbarbutton-text {
  display: none;
}

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

.tabs-alltabs-button:hover:active > .toolbarbutton-icon {
  -moz-image-region: rect(0, 28px, 20px, 14px);
}

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

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

.tabs-alltabs-button[type="menu"]:hover:active > .toolbarbutton-icon,
.tabs-alltabs-button[type="menu"][open="true"] > .toolbarbutton-icon {
  -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");
}

/* Tabstrip close button */
.tabs-closebutton {
  -moz-appearance: none;
  list-style-image: url("chrome://global/skin/icons/close.png");
  -moz-image-region: rect(0px, 14px, 14px, 0px);
  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(0px, 28px, 14px, 14px);
}

.tabs-closebutton:hover:active {
  -moz-image-region: rect(0px, 42px, 14px, 28px);
}

.tabbrowser-tabs > .tabs-closebutton {
  margin: 3px 0px 3px;
  padding: 4px 2px 2px;
  background: -moz-dialog url("chrome://browser/skin/tabbrowser/tab-active-bkgnd.png") repeat-x;
  border-left: 1px solid threedshadow;
  border-top: 1px solid threedshadow;
  -moz-border-radius-topleft: 2px;
}

.tabbrowser-tabs > .tabs-closebutton:-moz-locale-dir(rtl) {
  border-left: none;
  border-right: 1px solid threedshadow;
  -moz-border-radius-topleft: 0px;
  -moz-border-radius-topright: 2px;
}

#sidebar-box .tabs-closebutton {
  list-style-image: url("chrome://global/skin/icons/closeSidebar.png");
  margin-bottom: 0px !important;
  padding: 0px 2px 0px 2px !important;
}

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;
}

/* Feed icon */
#feed-button,
#feed-button > .button-box,
#feed-button:hover:active > .button-box {
  padding: 0px;
  margin: 0px;
  border: 0px; 
  background-color: transparent;
}

#feed-button {
  -moz-appearance: none; 
  min-width: 0px; 
  list-style-image: url("chrome://browser/skin/feeds/feed-icons-16.png");
  -moz-image-region: rect(0px 16px 16px 0px);
}

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

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

/* ::::: About Popup Blocking dialog ::::: */
#pageReportFirstTime statusbarpanel.statusbar-resizerpanel {
  visibility: collapse;
}

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

/* Bookmarks toolbar */
.toolbar-drop-indicator {
  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 Bounding Box */
#identity-popup {
  -moz-appearance: menupopup;
  color: MenuText;
}

/* Bug 413060, comment 14: Match #identity-box's -moz-margin-start, less 1px */
#identity-popup:-moz-locale-dir(ltr):-moz-system-metric(windows-default-theme) {
  -moz-margin-start: 3px;
}

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

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

/* Bookmarks Toolbar menu-item */
#bookmarksToolbarFolderMenu {
  list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.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;
  -moz-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 3px rgb(27%,27%,27%);
}

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

.ctrlTab-preview-inner > .tabPreview-canvas {
  -moz-box-shadow: 1px 1px 3px 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);
  -moz-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;
  -moz-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 {
  margin-top: 1px;
  -moz-margin-start: 1px;
}

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

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

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