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

/* ===== messengercompose.css ===========================================
  == Styles for the main Messenger Compose window.
  ======================================================================= */

@import url("chrome://messenger/skin/");

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

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

#button-send {
  list-style-image: url("chrome://messenger/skin/icons/messengericons.png");
  -moz-image-region: rect(330px 29px 359px 0);
}

#button-send:hover:active {
  -moz-image-region: rect(330px 59px 359px 30px);
}

#button-send[disabled="true"] {
  -moz-image-region: rect(330px 89px 359px 60px) !important;
}

#button-address {
  list-style-image: url("chrome://messenger/skin/icons/messengericons.png");
  -moz-image-region: rect(270px 29px 299px 0);
}

#button-address:hover:active {
  -moz-image-region: rect(270px 59px 299px 30px);
}

#button-address[disabled="true"] {
  -moz-image-region: rect(270px 89px 299px 60px) !important;
}

#button-attach {
  list-style-image: url("chrome://messenger/skin/icons/messengericons.png");
  -moz-image-region: rect(300px 29px 329px 0);
}

#button-attach:hover:active,
#button-attach[open] {
  -moz-image-region: rect(300px 59px 329px 30px);
}

#button-attach[disabled="true"] {
  -moz-image-region: rect(300px 89px 329px 60px) !important;
}

#spellingButton {
  list-style-image: url("chrome://editor/skin/icons/editoricons.png");
  -moz-image-region: rect(240px 29px 269px 0);
}

#spellingButton:hover:active,
#spellingButton[open] {
  -moz-image-region: rect(240px 59px 269px 30px);
}

#spellingButton[disabled="true"] {
  -moz-image-region: rect(240px 89px 269px 60px) !important;
}

#button-save {
  list-style-image: url("chrome://editor/skin/icons/editoricons.png");
  -moz-image-region: rect(210px 29px 239px 0);
}

#button-save:hover:active,
#button-save[open] {
  -moz-image-region: rect(210px 59px 239px 30px);
}

#button-save[disabled="true"] {
  -moz-image-region: rect(210px 89px 239px 60px) !important;
}

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

toolbar[iconsize="small"] > #button-send,
toolbar[iconsize="small"] > toolbarpaletteitem > #button-send {
  list-style-image: url("chrome://messenger/skin/icons/messengericons-small.png");
  -moz-image-region: rect(220px 19px 239px 0);
}

toolbar[iconsize="small"] > #button-send:hover:active {
  -moz-image-region: rect(220px 39px 239px 20px);
}

toolbar[iconsize="small"] > #button-send[disabled="true"] {
  -moz-image-region: rect(220px 59px 239px 40px) !important;
}

toolbar[iconsize="small"] > #button-address,
toolbar[iconsize="small"] > toolbarpaletteitem > #button-address {
  list-style-image: url("chrome://messenger/skin/icons/messengericons-small.png");
  -moz-image-region: rect(180px 19px 199px 0);
}

toolbar[iconsize="small"] > #button-address:hover:active {
  -moz-image-region: rect(180px 39px 199px 20px);
}

toolbar[iconsize="small"] > #button-address[disabled="true"] {
  -moz-image-region: rect(180px 59px 199px 40px) !important;
}

toolbar[iconsize="small"] > #button-attach,
toolbar[iconsize="small"] > toolbarpaletteitem > #button-attach {
  list-style-image: url("chrome://messenger/skin/icons/messengericons-small.png");
  -moz-image-region: rect(200px 19px 219px 0);
}

toolbar[iconsize="small"] > #button-attach:hover:active,
toolbar[iconsize="small"] > #button-attach[open] {
  -moz-image-region: rect(200px 39px 219px 20px);
}

toolbar[iconsize="small"] > #button-attach[disabled="true"] {
  -moz-image-region: rect(200px 59px 219px 40px) !important;
}

toolbar[iconsize="small"] > #spellingButton,
toolbar[iconsize="small"] > toolbarpaletteitem > #spellingButton {
  list-style-image: url("chrome://editor/skin/icons/editoricons-small.png");
  -moz-image-region: rect(160px 19px 179px 0);
}

toolbar[iconsize="small"] > #spellingButton:hover:active,
toolbar[iconsize="small"] > #spellingButton[open] {
  -moz-image-region: rect(160px 39px 179px 20px);
}

toolbar[iconsize="small"] > #spellingButton[disabled="true"] {
  -moz-image-region: rect(160px 59px 179px 40px) !important;
}

toolbar[iconsize="small"] > #button-save,
toolbar[iconsize="small"] > toolbarpaletteitem > #button-save {
  list-style-image: url("chrome://editor/skin/icons/editoricons-small.png");
  -moz-image-region: rect(140px 19px 159px 0);
}

toolbar[iconsize="small"] > #button-save:hover:active,
toolbar[iconsize="small"] > #button-save[open] {
  -moz-image-region: rect(140px 39px 159px 20px);
}

toolbar[iconsize="small"] > #button-save[disabled="true"] {
  -moz-image-region: rect(140px 59px 159px 40px) !important;
}

#attachmentbucket-sizer {
  border-top: none;
  border-bottom: none;
}

#compose-toolbar-sizer {
  height: 10px;
  background-color: -moz-dialog;
  border-top: 1px solid #A5A5A5;
  border-bottom: 1px solid #A5A5A5;
}

#msgSubject {
  margin-top: 0px;
  margin-bottom: 4px;
}

#MsgHeadersToolbar {
  min-height: 0px; /* this undoes the min-height in toolbar.css */
  -moz-appearance: none;
}

#FormatToolbar {
  border-bottom: none !important;
}

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

treechildren::-moz-tree-cell-text(default-match) {
  margin-top: 2px;
  margin-bottom: 2px;
  margin-inline-start: 15px;
  margin-inline-end: -3px;
  border: none;
}

treechildren::-moz-tree-image(local-abook) {
  margin-top: 2px;
  margin-bottom: 2px;
  margin-inline-start: 4px;
  margin-inline-end: -1px;
  list-style-image: url("chrome://messenger/skin/addressbook/icons/addrbook.gif");
}

treechildren::-moz-tree-image(remote-abook) {
  margin-top: 2px;
  margin-bottom: 2px;
  margin-inline-start: 2px;
  margin-inline-end: -3px;
  list-style-image: url("chrome://messenger/skin/addressbook/icons/remote-addrbook.gif");
}

treechildren::-moz-tree-image(remote-err) {
  margin-top: 2px;
  margin-bottom: 2px;
  margin-inline-start: 2px;
  margin-inline-end: -3px;
  list-style-image: url("chrome://messenger/skin/addressbook/icons/remote-addrbook-error.gif");
}

treechildren::-moz-tree-image(subscribed-news) {
  margin-inline-start: 2px;
  margin-inline-end: -3px;
  list-style-image: url("chrome://messenger/skin/icons/folder-newsgroup.png");
}

/* ::::: compact menulists ::::: */

.menulist-compact {
  -moz-binding: url("chrome://messenger/content/messengercompose/menulistCompactBindings.xml#menulist-compact");
  -moz-box-align: center;
  -moz-box-pack: center;
  margin: 0;
}

.menulist-compact  > .menulist-label-box > .menulist-label {
  text-align: end;
}

/* ::::: lightweight themes ::::: */

#MsgHeadersToolbar:-moz-lwtheme,
#FormatToolbar:-moz-lwtheme,
#compose-toolbar-sizer:-moz-lwtheme {
  text-shadow: none;
  color: -moz-dialogtext;
  background-color: -moz-dialog;
}

#MsgHeadersToolbar textbox:-moz-lwtheme {
  opacity: 1;
}
