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

@import url("chrome://navigator/content/navigator.css");
@import url("chrome://communicator/skin/");
@import url("chrome://communicator/skin/bookmarks/bookmarksToolbar.css");

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

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

/* Hover */
:-moz-any(#back-button, #forward-button, #reload-button, #stop-button, #home-button, #print-button, toolbarbutton.bookmark-item):hover {
  filter: saturate(120%) brightness(110%);
}

/* Pressed */
:-moz-any(#back-button, #forward-button, #reload-button, #stop-button, #home-button, #print-button, toolbarbutton.bookmark-item):not([disabled="true"]):hover:active,
toolbarbutton.bookmark-item[open="true"] {
  filter: brightness(75%);
}

/* Disabled */
:-moz-any(#back-button, #forward-button, #reload-button, #stop-button, #home-button, #print-button)[disabled="true"] {
  filter: grayscale(100%) opacity(40%);
}

/* Large Icons */
:-moz-any(#back-button, #forward-button, #reload-button, #stop-button, #home-button, #print-button) {
  list-style-image: url("chrome://navigator/skin/icons/navigatoricons.png");
}

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

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

#stop-button {
  -moz-image-region: rect(0px, 87px, 29px, 58px);
}

#reload-button {
  -moz-image-region: rect(0px, 116px, 29px, 87px);
}

#home-button {
  -moz-image-region: rect(0px, 145px, 29px, 116px);
}

#print-button {
  -moz-image-region: rect(0px, 174px, 29px, 145px);
}

#sync-button {
  list-style-image: url("chrome://communicator/skin/sync/sync-32.png");
}

#sync-button[status=active] {
  list-style-image: url("chrome://communicator/skin/sync/sync-32-throbber.png");
}

/* Small Icons */
toolbar[iconsize="small"] > toolbarpaletteitem > :-moz-any(#back-button, #forward-button, #reload-button, #stop-button, #home-button, #print-button),
toolbar[iconsize="small"] > :-moz-any(#back-button, #forward-button, #reload-button, #stop-button, #home-button, #print-button) {
  list-style-image: url("chrome://navigator/skin/icons/navigatoricons-small.png");
}

toolbar[iconsize="small"] > toolbarpaletteitem > #back-button,
toolbar[iconsize="small"] > #back-button {
  -moz-image-region: rect(0px, 19px, 19px, 0px);
}

toolbar[iconsize="small"] > toolbarpaletteitem > #forward-button,
toolbar[iconsize="small"] > #forward-button {
  -moz-image-region: rect(0px, 38px, 19px, 19px);
}

toolbar[iconsize="small"] > toolbarpaletteitem > #stop-button,
toolbar[iconsize="small"] > #stop-button {
  -moz-image-region: rect(0px, 57px, 19px, 38px);
}

toolbar[iconsize="small"] > toolbarpaletteitem > #reload-button,
toolbar[iconsize="small"] > #reload-button {
  -moz-image-region: rect(0px, 76px, 19px, 57px);
}

toolbar[iconsize="small"] > toolbarpaletteitem > #home-button,
toolbar[iconsize="small"] > #home-button {
  -moz-image-region: rect(0px, 95px, 19px, 76px);
}

toolbar[iconsize="small"] > toolbarpaletteitem > #print-button,
toolbar[iconsize="small"] > #print-button {
  -moz-image-region: rect(0px, 114px, 19px, 95px);
}

toolbar[iconsize="small"] > toolbarpaletteitem > #sync-button,
toolbar[iconsize="small"] > #sync-button {
  list-style-image: url("chrome://communicator/skin/sync/sync-16.png");
}

toolbar[iconsize="small"] > toolbarpaletteitem > #sync-button[status=active],
toolbar[iconsize="small"] > #sync-button[status=active] {
  list-style-image: url("chrome://communicator/skin/sync/sync-16-throbber.png");
}

/* ::::: Find Toolbar ::::: */

#FindToolbar {
  transition: unset;
}

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

#window-controls {
  -moz-box-align: center;
  padding-top: 0px;
  padding-bottom: 0px;
  padding-inline-start: 4px;
  padding-inline-end: 2px;
  border-left: 2px solid;
  -moz-border-left-colors: ThreeDHighlight ThreeDShadow;
  background-color: -moz-Dialog;
}

toolbar[mode="text"] > #window-controls > toolbarbutton > .toolbarbutton-icon {
  display: -moz-box;
}

#minimize-button {
  list-style-image: url("chrome://navigator/skin/icons/minimize.gif");
} 

#restore-button {
  list-style-image: url("chrome://navigator/skin/icons/restore.gif");
} 

#close-button {
  list-style-image: url("chrome://navigator/skin/icons/close.gif");
} 
  
/* ::::: nav-bar-inner ::::: */
  
.nav-bar-class {
  -moz-box-align: center;
  min-width: 0px;
}

.urlbar-security-level[level="high"],
.urlbar-security-level[level="ultra"],
.urlbar-security-level[level="broken"] {
  box-shadow: none;
    color: #000000;
}

.urlbar-security-level[level="high"] {
  background-color: #FFFFC7;
}

.urlbar-security-level[level="ultra"] {
  background-color: #d2ffc7;
}

.urlbar-security-level[level="broken"] {
  background-color: #ffc7c7;
}

@media (-moz-os-version: windows-win7) and (-moz-windows-theme: aero),
       (-moz-os-version: windows-win8),
       (-moz-os-version: windows-win10) {
  #urlbar { padding: 1px; }
}

#wrapper-nav-bar-inner[place="palette"] > #nav-bar-inner
  > .button-toolbar,
#wrapper-nav-bar-inner[place="palette"] > #nav-bar-inner
  > #urlbar > .urlbar-icons {
  display: none;
}

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

/* ::::: notification popups ::::: */

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

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

.popup-notification-icon[popupid="web-notifications"] {
  list-style-image: url("chrome://communicator/skin/icons/notification-64.png");
}

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

.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"] {
  list-style-image: url("chrome://communicator/skin/icons/key-64.png");
}

.popup-notification-icon[popupid="click-to-play-plugins"] {
  list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric.png");
  margin: 0px;
  width: 32px;
  height: 32px;
}

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

/* Notification icon box */
#notification-popup-box {
  margin: 0 3px;
}

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

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

#geo-notification-icon {
  list-style-image: url("chrome://communicator/skin/icons/geolocation-16.png");
  width: 16px;
  height: 16px;
}

#web-notifications-notification-icon {
  list-style-image: url("chrome://communicator/skin/icons/notification-16.png");
  width: 16px;
  height: 16px;
}

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

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

#password-notification-icon {
  list-style-image: url("chrome://communicator/skin/icons/key-16.png");
  width: 16px;
  height: 16px;
}

#plugins-notification-icon {
  list-style-image: url("chrome://mozapps/skin/plugins/pluginGeneric-16.png");
  width: 16px;
  height: 16px;
}

.click-to-play-plugins-notification-content {
  margin: -10px;
  border-radius: 4px;
}

.click-to-play-plugins-notification-icon-box {
  background-color: rgba(255, 255, 255, .4);
  border-inline-end: 1px solid rgba(255, 255, 255, .2);
  padding: 24px;
}

.click-to-play-plugins-notification-icon-box:-moz-locale-dir(ltr) {
  border-bottom-left-radius: 4px;
  border-top-left-radius: 4px;
}

.click-to-play-plugins-notification-icon-box:-moz-locale-dir(rtl) {
  border-bottom-right-radius: 4px;
  border-top-right-radius: 4px;
}

.click-to-play-plugins-notification-separator {
  border-inline-start: 1px solid rgba(3, 14, 27, .1);
  border-top: 1px solid rgba(3, 14, 27, .1);
}

.click-to-play-plugins-notification-description-box {
  border-bottom: 1px solid rgba(255, 255, 255, .2);
  border-inline-start: 1px solid rgba(255, 255, 255, .2);
  padding-top: 12px;
  padding-inline-end: 11px;
   padding-bottom: 9px;
  padding-inline-start: 10px;
}

.click-to-play-plugins-notification-center-box {
  border-top: 1px solid rgba(255, 255, 255, .2);
  border-bottom: 1px solid rgba(255, 255, 255, .2);
  border-inline-start: 1px solid rgba(255, 255, 255, .2);
  background-color: rgba(3, 14, 27, .05);
}

.click-to-play-plugins-notification-button-container {
  border-top: 1px solid rgba(255, 255, 255, .2);
  border-inline-start: 1px solid rgba(255, 255, 255, .2);
  margin: 0px;
  padding: 16px;
}

.center-item-box {
  padding: 12px 16px 0px 16px;
}

.center-item-box[padbottom="true"] {
  padding-bottom: 12px;
}

.center-item-icon {
  background-image: url("chrome://mozapps/skin/plugins/pluginGeneric-16.png");
  background-repeat: no-repeat;
  height: 16px;
  width: 16px;
  margin-bottom: 4px;
}

.center-item-box[warn="true"] {
  background-image: url("chrome://navigator/skin/click-to-play-warning-stripes.png");
  background-repeat: repeat-x;
  padding: 8px 16px 6px 16px;
}

.center-item-box[padbottom="true"][warn="true"] {
  padding-bottom: 4px;
}

.center-item-box[showseparator="true"] {
  border-top: 1px solid rgba(3, 14, 27, .1);
}

.center-item-box[warn="false"] > .center-item-warning {
  display: none;
}

.center-item-warning > .text-link[href=""] {
  display: none;
}

.center-item-warning-icon {
  background-image: url("chrome://mozapps/skin/extensions/alerticon-info-negative.png");
  background-repeat: no-repeat;
  width: 16px;
  height: 15px;
  margin-bottom: 4px;
}

.center-item-warning-description {
  color: #828282;
}

.center-item-button {
  min-width: 0px;
}

/* ::::: page proxy icon ::::: */

#page-proxy-deck,
#page-proxy-favicon,
#page-proxy-button {
  width: 16px;
  height: 16px;
}

#page-proxy-deck {
  cursor: grab;
  margin: 3px;
}

#page-proxy-button {
  list-style-image: url("chrome://communicator/skin/bookmarks/bookmark-item.png"); 
}

#page-proxy-favicon {
  list-style-image: none;
}

#page-proxy-button[pageproxystate="invalid"] {
  cursor: default;
  list-style-image: url("chrome://communicator/skin/bookmarks/bookmark-item-dis.png");
}

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

#PopupAutoComplete > richlistbox > richlistitem {
  height: 20px;
  min-height: 20px;
  border: 0;
  border-radius: 0;
  padding: 0px 1px 0px 1px;
}

#PopupAutoComplete > richlistbox > richlistitem > .ac-title {
  font: icon;
  margin-inline-start: 6px;
}

#PopupAutoComplete > richlistbox {
  padding: 0;
}

.autocomplete-history-dropmarker {
  border-right-width: 1px;
  border-bottom-width: 1px;
  -moz-border-right-colors: ThreeDShadow;
  -moz-border-bottom-colors: ThreeDShadow;
}

.autocomplete-treebody::-moz-tree-cell-text(value) {
  padding-inline-start: 15px;
}

.autocomplete-search-box {
  border-top: 2px groove -moz-Dialog;
  background-color: -moz-Dialog;
  color: ButtonText;
}

panel[nomatch="true"] > .autocomplete-search-box {
  border-top: 1px solid ThreeDHighlight;
}

.autocomplete-search-engine {
  padding: 2px;
}

.autocomplete-search-engine[menuactive="true"] {
  background-color: Highlight;
  color: HighlightText;
}

.autocomplete-search-engine-img {
  margin-inline-end: 4px;
  width: 16px;
  height: 16px;
}

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

/* ::::: searchbar ::::: */
#searchbar {
  min-height: 28px;
}

/* ::::: go and searchbuttons ::::: */

#search-button, 
#go-button {
  margin-top: 0px;
  margin-bottom: 0px;
  margin-inline-start: 0px;
  margin-inline-end: 4px;
  min-height: 25px;
  font: message-box;
  font-weight: bold;
}

#search-button {
  list-style-image: url("chrome://communicator/skin/icons/search.png");
  -moz-image-region: rect(0 17px 17px 0);
}

#search-button:hover {
  -moz-image-region: rect(0 35px 17px 18px);
}

#search-button:hover:active {
  -moz-image-region: rect(0 53px 17px 36px);
}

#search-button > .button-box > .button-icon {
  display: -moz-box;
}

toolbar[mode="text"] #search-button > .button-box > .button-icon,
toolbar[mode="icons"] #search-button > .button-box > .button-text {
  display: none;
}

/* ::::: sidebar splitter ::::: */

#sidebar-splitter {
  border-left: none;
  border-right: none;
  min-width: 5px;
}

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

#status-bar {
  border-top: none;
  min-width: 1px;
}

#security-button {
  list-style-image: url("chrome://communicator/skin/icons/lock-insecure.png");
  margin-top: 2px;
}

#security-button[level="high"] > .statusbarpanel-contentbox,
#security-button[level="ultra"] > .statusbarpanel-contentbox {
  list-style-image: url("chrome://communicator/skin/icons/lock-secure.png");
}

#security-button[level="high"] > .statusbarpanel-contentbox {
  background-color: #FFFFC7;
}

#security-button[level="ultra"] > .statusbarpanel-contentbox {
  background-color: #d2ffc7;
}

#security-button[level="broken"] > .statusbarpanel-contentbox {
  list-style-image: url("chrome://communicator/skin/icons/lock-broken.png");
  background-color: #ffc7c7;
}

#security-button > .statusbarpanel-contentbox > .statusbarpanel-text {
  margin: 0px;
}

#security-button > .statusbarpanel-contentbox > .statusbarpanel-text[value] {
  padding-left: 2px;
  padding-right: 4px;
  font-weight: bold;
}

#ev-button {
  list-style-image: url("chrome://communicator/skin/icons/identity.png");
}

#popupIcon {
  list-style-image: url("chrome://navigator/skin/icons/popup-blocked.png");
}

#invalid-form-popup {
  -moz-appearance: tooltip;
  border: 1px solid InfoText;
  padding: 2px 3px 0px 3px;
  max-width: 40em;
  background-color: InfoBackground;
  color: InfoText;
  font: message-box;
  font-weight: bold;
}

/* ::::: personal toolbar ::::: */

#bookmarks-button {
  list-style-image: url("chrome://communicator/skin/bookmarks/bookmark-folder-closed.png");
}

#bookmarks-button[open="true"] {
  list-style-image: url("chrome://communicator/skin/bookmarks/bookmark-folder-open.png");
}

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

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

toolbarbutton.chevron > .toolbarbutton-text {
  display: none; /* hide chevron label which has a width even if blank */
}

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

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

#PersonalToolbar[iconsize="small"] > toolbarpaletteitem > #home-button > .toolbarbutton-icon,
#PersonalToolbar[iconsize="small"] > #home-button > .toolbarbutton-icon {
  width: 16px;
  height: 16px;
}

#PersonalToolbar > #home-button {
  cursor: pointer;
}

#PersonalToolbar > #home-button:hover {
  text-decoration: underline;
}

#PersonalToolbar > #home-button[disabled="true"] {
  cursor: default !important;
  text-decoration: none !important;
}

/*
  In customize mode we hide the normal bookmark items and show a placeholder
  for the drag/drop UI.
*/
.bookmarks-toolbar-customize {
  list-style-image: url("chrome://communicator/skin/bookmarks/bookmarksToolbar.png");
  display: none;
  max-width: 15em !important;
}

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

/* ::::: star button ::::: */

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

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

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

#star-button[starred="true"] {
  -moz-image-region: rect(0px 16px 16px 0px);
}

#star-button[starred="true"]:hover {
  -moz-image-region: rect(0px 32px 16px 16px);
}

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

#editBookmarkPanelStarIcon {
  list-style-image: url("chrome://communicator/skin/bookmarks/bookmark.png");
  -moz-image-region: rect(0px 16px 16px 0px);
}

/* ::::: feeds ::::: */

.feedsMenu {
  list-style-image: url("chrome://navigator/skin/btn1/feeds.png");
  -moz-image-region: rect(0px 16px 16px 0px);
}

.feedsMenu[_moz-menuactive="true"] {
  -moz-image-region: rect(16px 16px 32px 0px);
}

.feedsMenu[disabled="true"] {
  -moz-image-region: rect(32px 16px 48px 0px);
}

.feedsMenu[open="true"] {
  -moz-image-region: rect(48px 16px 64px 0px);
}

#feedsButton {
  list-style-image: url("chrome://navigator/skin/btn1/feeds.png");
  -moz-image-region: rect(0px 32px 16px 16px);
}

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

/* ::::: component bar ::::: */

#component-bar {
  -moz-box-align: stretch;
  -moz-appearance: statusbarpanel;
  max-height: 25px;
}

#component-bar > toolbarbutton {
  padding-top: 0px;
  padding-bottom: 0px;
  padding-inline-start: 2px;
  padding-inline-end: 2px;
}
