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

notification {
  background: #f57900;
  color: white;
  font-weight: bold;
  text-shadow: 0px 1px hsla(0,0%,0%,.2);
/*
  color: -moz-gtk-info-bar-text;
  background-color: InfoBackground;
  -moz-appearance: -moz-gtk-info-bar;
  text-shadow: none;
*/
}

notification[type="info"] {
  background-color: #4a90d9;
/*
  color: -moz-DialogText;
  background-color: -moz-Dialog;
  -moz-appearance: none;
*/
}

notification[type="critical"] {
  background-color: #ef2929;
}

.notification-inner {
  border: 0 !important;
  padding: 7px 9px 6px;
}

.messageText {
  margin: 0 8px !important;
}

.messageText > .text-link {
  color: inherit !important;
  text-decoration: underline;
}

.messageImage {
  width: 16px;
  height: 16px;
  -moz-margin-start: 5px;
  -moz-margin-end: 1px;
  margin-bottom: 4px;
}

/* Default icons for notifications */

.messageImage[type="info"] {
  list-style-image: url("chrome://symbolic-icons/skin/information.svg");
}

.messageImage[type="warning"] {
  list-style-image: url("chrome://symbolic-icons/skin/important.svg");
}

.messageImage[type="critical"] {
  list-style-image: url("chrome://symbolic-icons/skin/critical.svg");
}

.messageImage:not([image]) {
  filter: url(chrome://global/skin/filters.svg#notification-icon);
}

/* Replace custom icons */

notification:-moz-any([value="popup-blocked"], [value="refresh-blocked"], [value="offline-app-usage"], [value*="offline-app-requested-"], [value="missing-plugins"], [value="plugin-hidden"], [value="plugin-crashed"]) .messageImage {
  background: no-repeat center !important;
  filter: url(chrome://global/skin/filters.svg#notification-icon);
  min-width: 16px !important;
  max-width: 16px !important;
  min-height: 16px !important;
  -moz-padding-start: 16px !important;
  overflow: hidden !important;
}

notification:-moz-any([value="popup-blocked"], [value="refresh-blocked"], [value="offline-app-usage"], [value*="offline-app-requested-"]) .messageImage {
  background-image: url(chrome://symbolic-icons/skin/info.svg) !important;
}

notification:-moz-any([value="missing-plugins"], [value="plugin-hidden"], [value="plugin-crashed"]) .messageImage {
  background-image: url(chrome://symbolic-icons/skin/plugin.svg) !important;
}

/* Close button */

notification .messageCloseButton {
  list-style-image: url(chrome://symbolic-icons/skin/close.svg);
  /* Override style from notificationButton.inc.css */
  -moz-margin-end: 0px !important;
  padding: 1px 3px 1px 4px !important;
  /* Override style for .close-icon from global.css */
  background-image: none !important;
}

notification .messageCloseButton > .toolbarbutton-icon {
  filter: url(chrome://browser/skin/symbolic-icons-colors.svg#white);
  min-width: 16px;
  min-height: 16px;
}

notification .messageCloseButton:hover > .toolbarbutton-icon {
  filter: url(chrome://global/skin/filters.svg#notification-icon);
}

:not(notification) .messageCloseButton {
  padding-left: 11px;
  padding-right: 11px;
}

/* Popup notification */

.popup-notification-body {
  max-width: 25em;
}

.popup-notification-origin:not([value]),
.popup-notification-learnmore-link:not([href]) {
  display: none;
}

.popup-notification-origin {
  margin-bottom: .3em !important;
}

.popup-notification-learnmore-link {
  margin-top: .5em !important;
}

.popup-notification-button-container {
  margin-top: 17px;
}

.popup-notification-closebutton {
  -moz-margin-end: -10px;
  margin-top: -6px;
}

.popup-notification-menubutton > .button-menubutton-button[disabled] {
  opacity: 0.5;
}
