/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

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

/* ::::: Hide the link toolbar if it is set to autohide and has no items. ::::: */

#linktoolbar[hidden="maybe"][hasitems="false"] {
  display: none;
}

/* ::::: tabbed browser ::::: */

tabbrowser {
  -moz-binding: url("chrome://navigator/content/tabbrowser.xml#tabbrowser");
}

.tabbrowser-tabs {
  -moz-binding: url("chrome://navigator/content/tabbrowser.xml#tabbrowser-tabs");
}

.tabbrowser-arrowscrollbox {
  -moz-binding: url("chrome://navigator/content/tabbrowser.xml#tabbrowser-arrowscrollbox");
}

.tabs-alltabs-popup {
  -moz-binding: url("chrome://navigator/content/tabbrowser.xml#tabbrowser-alltabs-popup");
}

.tabs-closebutton-box > .tabs-closebutton {
  -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton");
}

/* ::::: urlbar autocomplete ::::: */

#urlbar {
  -moz-binding: url("chrome://navigator/content/urlbarBindings.xml#urlbar");
}

.paste-and-go {
  -moz-binding: url("chrome://navigator/content/urlbarBindings.xml#input-box-paste");
}

panel[for="urlbar"] {
  -moz-binding: url("chrome://navigator/content/urlbarBindings.xml#autocomplete-result-popup") !important;
}

.autocomplete-search-box {
  -moz-binding: url("chrome://navigator/content/urlbarBindings.xml#autocomplete-search-box");
}

.autocomplete-search-engine {
  -moz-binding: url("chrome://navigator/content/urlbarBindings.xml#autocomplete-search-engine");
  -moz-box-align: center;
}

/* ::::: search bar ::::: */
searchbar {
  -moz-binding: url("chrome://communicator/content/search/search.xml#searchbar");
}

#wrapper-search-container > #search-container > #searchbar > .searchbar-textbox > .autocomplete-textbox-container > .textbox-input-box > html|*.textbox-input {
  visibility: hidden;
}

/* ::::: bookmarks menu ::::: */

.isempty:not(:last-child) {
  display: none;
}

/* ::::: bookmarks toolbar ::::: */

#wrapper-personal-bookmarks[place="palette"] > toolbaritem > #PlacesToolbar {
  display: none;
}

/* notification anchors should only be visible when their associated
   notifications are */
.notification-anchor-icon {
  -moz-user-focus: normal;
}

.notification-anchor-icon:not([showing]) {
  display: none;
}

#click-to-play-plugins-notification {
  -moz-binding: url("chrome://communicator/content/bindings/notification.xml#click-to-play-plugins-notification");
}

popupnotification-centeritem {
  -moz-binding: url("chrome://communicator/content/bindings/notification.xml#center-item");
}

#geolocation-notification {
  -moz-binding: url("chrome://communicator/content/bindings/notification.xml#geolocation-popup-notification");
}

#addon-install-started-notification {
  -moz-binding: url("chrome://communicator/content/bindings/notification.xml#addon-progress-popup-notification");
}

/* ::::: Wallpaper fix for Bug 435652. Remove when Bug 204743 is fixed ::::: */

.textbox-input-box {
  overflow-x: hidden;
}

/* Developer Tools: Error counter */

#developer-toolbar-toolbox-button[error-count]:before {
  content: attr(error-count);
  display: -moz-box;
  -moz-box-pack: center;
}
