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

/* ===== messenger.css ==================================================
  == Styles shared throughout the Messenger application.
  ======================================================================= */

@import url("chrome://global/skin/");
@import url("chrome://messenger/content/messenger.css");

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

#titlebar {
  -moz-binding: url("chrome://global/content/bindings/general.xml#windowdragbox");
  height: 22px;
  
  /* Until we draw tabs in the titlebar on OS X we must 
   * force margin-bottom to be 0px.
   */
  margin-bottom: 0px !important;
}

#titlebar-buttonbox-container,
#messengerWindow:not([drawintitlebar=true]) > #titlebar {
  display: none;
}

description.error {
  color: #FF0000;
}

.toolbar-primary {
  -moz-binding: url("chrome://global/content/bindings/toolbar.xml#toolbar");
}

toolbar[printpreview="true"] {
  -moz-binding: url("chrome://global/content/printPreviewBindings.xml#printpreviewtoolbar");
}

#tabbar-toolbar {
  -moz-appearance: none;
  padding: 0;
}

#tabbar-toolbar[customizing="true"] {
  min-width: 16px;
  min-height: 10px;
}

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

#throbber-box {
  width: 17px;
  min-height: 16px;
  margin: 0 4px;
}

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

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

/* ::::: online/offline icons ::::: */

#offline-status[offline="true"] {
  list-style-image: url("chrome://messenger/skin/icons/offline.png");
}

#offline-status {
  -moz-padding-start: 3px;
  list-style-image: url("chrome://messenger/skin/icons/online.png");
}

@media (min-resolution: 2dppx) {
  #offline-status[offline="true"] {
    list-style-image: url("chrome://messenger/skin/icons/offline@2x.png");
  }

  #offline-status {
    list-style-image: url("chrome://messenger/skin/icons/online@2x.png");
  }

  #offline-status > .statusbarpanel-icon {
    width: 16px;
    height: 16px;
  }
}

/* ::::: directional button icons ::::: */

.up {
  min-width: 0px;
  list-style-image: url("chrome://global/skin/arrow/arrow-up.gif");
}

.up[disabled="true"] {
  list-style-image: url("chrome://global/skin/arrow/arrow-up-dis.gif");
}

.down {
  min-width: 0px;
  list-style-image: url("chrome://global/skin/arrow/arrow-dn.gif");
}

.down[disabled="true"] {
  list-style-image: url("chrome://global/skin/arrow/arrow-dn-dis.gif");
}

/* ::::: Tabs ::::: */

tabmail > tabbox {
  margin: 0;
}

#status-bar:-moz-lwtheme  {
  padding-top: 1px;
}

treechildren::-moz-tree-cell-text {
  -moz-padding-start: 2px;
}

notification[value="addon-install-blocked"],
notification[value="addon-install-complete"] {
  background-image: url("chrome://mozapps/skin/extensions/stripes-info-negative.png"),
                    linear-gradient(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0));
  background-repeat: repeat-x;
  border-top: none;
  border-bottom: none;
}

notification[value="addon-install-failed"] {
  background-image: linear-gradient(rgb(255, 100, 100), rgb(204, 85, 85));
}

notification[value="addon-install-complete"] {
  color: black;
  background-color: #ADB5C3;
}

notification[value="addon-install-blocked"] .notification-inner,
notification[value="addon-install-failed"] .notification-inner,
notification[value="addon-install-complete"] .notification-inner {
  border: none;
}

notification[value="addon-install-blocked"] > button,
notification[value="addon-install-failed"] > button,
notification[value="addon-install-complete"] > button {
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid rgba(60, 73, 97, 0.5);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.25),
              0 1px rgba(255, 255, 255, 0.25);
  background-image: linear-gradient(rgba(255, 255, 255, 0.45),
                                    rgba(255, 255, 255, 0.2));
  background-clip: padding-box;
  color: #252F3B;
}

notification[value="addon-install-blocked"] > button:active:hover,
notification[value="addon-install-failed"] > button:active:hover,
notification[value="addon-install-complete"] > button:active:hover {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2),
              0 1px rgba(255, 255, 255, 0.25);
  background-color: transparent;
  background-image: linear-gradient(rgba(45, 54, 71, 0.3),
                                    rgba(45, 54, 71, 0.1));
  border-color: rgba(60, 73, 97, 0.7);
}

notification[value="addon-install-failed"] .messageCloseButton {
  list-style-image: url("chrome://messenger/skin/icons/close-inverted.png");
}

@media (min-resolution: 2dppx) {
  notification[value="addon-install-failed"] .messageCloseButton {
    list-style-image: url("chrome://messenger/skin/icons/close-inverted@2x.png");
  }
}
