
/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is Mozilla Communicator client code, released
 * March 31, 1998.
 *
 * The Initial Developer of the Original Code is
 * Netscape Communications Corporation.
 * Portions created by the Initial Developer are Copyright (C) 1998-2001
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *   Joe Hewitt (hewitt@netscape.com)
 *   Richard Marti (mozilla@paenglab.ch)
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

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

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

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

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

#compose-toolbox {
  -moz-appearance: none;
  border-top: none;
  background-color: transparent;
}

toolbar:not(:-moz-lwtheme) {
  -moz-appearance: none;
  border: none;
  background-color: -moz-Dialog;
}

@media all and (-moz-windows-default-theme) {
  toolbar:not(:-moz-lwtheme) {
    background-color: rgb(227, 237, 246);
  }
}

#compose-toolbox > toolbar:first-child:not(:-moz-lwtheme) {
  background-image: -moz-linear-gradient(rgba(255, 255, 255, .5),
                    rgba(255, 255, 255, .0));
}

#compose-toolbox > toolbar:last-of-type:not(:-moz-lwtheme) {
  background-image: -moz-linear-gradient(transparent, transparent 10%,
                    rgba(0, 0, 0, .03) 50%, rgba(0, 0, 0, .1) 90%,
                    rgba(0, 0, 0, .2));
}

#MsgHeadersToolbar {
  min-height: 132px;
}

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

.toolbarbutton-menubutton-button,
.toolbarbutton-menubutton-dropmarker,
.toolbarbutton-1 {
  -moz-appearance: none;
  padding: 1px 5px !important;
  background: rgba(151, 152, 153, .05)
              -moz-linear-gradient(rgba(251, 252, 253, .95),
              rgba(246, 247, 248, .47) 49%, rgba(231, 232, 233, .45) 51%,
              rgba(225,226,229,.3));
  border-radius: 4.5px;
  border: 1px solid;
  border-color: rgba(0,0,0,.12) rgba(0,0,0,.19) rgba(0,0,0,.38);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .3) inset,
              0 0 0 2px rgba(255, 255, 255, .1) inset,
              0 1px 0 rgba(0, 0, 0, .15);
  color: black;
  text-shadow: 0 0 3px white;
}

.toolbarbutton-menubutton-dropmarker,
toolbar[iconsize="small"][mode="icons"] .toolbarbutton-menubutton-button,
toolbar[iconsize="small"][mode="icons"] .toolbarbutton-1 {
  padding-left: 3px !important;
  padding-right: 3px !important;
}

.toolbarbutton-1 {
  -moz-box-orient: vertical;
}

toolbarbutton[type="menu-button"] {
  -moz-appearance: none !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.toolbarbutton-1,
toolbarbutton[type="menu-button"] {
  margin: 1px 3px;
}

toolbox[labelalign="end"] .toolbarbutton-1,
toolbox[labelalign="end"] .toolbarbutton-menubutton-button {
  -moz-box-orient: horizontal;
}

toolbar[iconsize="small"][mode="icons"] .toolbarbutton-1,
toolbar[iconsize="small"][mode="icons"] toolbarbutton[type="menu-button"] {
  margin-left: 2px;
  margin-right: 2px;
}

.toolbarbutton-menubutton-dropmarker {
  -moz-border-start-style: none;
}

.toolbarbutton-menubutton-button:-moz-locale-dir(ltr),
.toolbarbutton-menubutton-dropmarker:-moz-locale-dir(rtl) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.toolbarbutton-menubutton-button:-moz-locale-dir(rtl),
.toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.toolbarbutton-menubutton-button[disabled="true"],
.toolbarbutton-menubutton-dropmarker[disabled="true"],
.toolbarbutton-1[disabled="true"] {
  opacity: .8;
}

.toolbarbutton-menubutton-button[disabled="true"] > .toolbarbutton-icon,
.toolbarbutton-1[disabled="true"] > .toolbarbutton-icon {
  opacity: .5;
}

.toolbarbutton-menubutton-button:not([disabled="true"]):not(:active):hover,
toolbarbutton[type="menu-button"]:not([open="true"]):not(:active):hover >
                  .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
.toolbarbutton-1:not([disabled="true"]):not([checked="true"]):not(:active):hover {
  background-color: hsla(190, 60%, 70%, .5);
  border-color: hsla(190, 50%, 65%, .8) hsla(190, 50%, 50%, .8)
                hsla(190, 50%, 40%, .8);
  box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
              0 0 0 2px rgba(255,255,255,.1) inset,
              0 1px 0 rgba(0,0,0,.1),
              0 0 5px hsl(190,90%,80%);
  -moz-transition: background-color .4s ease-in,
                   border-color .3s ease-in,
                   box-shadow .3s ease-in;
}

.toolbarbutton-menubutton-button:not([disabled="true"]):hover:active,
toolbarbutton[type="menu-button"]:hover:active >
                   .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
toolbarbutton[type="menu-button"][open="true"] >
                                          .toolbarbutton-menubutton-dropmarker,
.toolbarbutton-1:not([disabled="true"]):hover:active,
.toolbarbutton-1[checked="true"],
.toolbarbutton-1[open="true"] {
  background-color: transparent;
  border-color: rgba(0, 0, 0, .65) rgba(0, 0, 0, .55) rgba(0, 0, 0, .5);
  box-shadow: 0 0 9px rgba(0, 0, 0, .4) inset,
                   0 0 3px rgba(0, 0, 0, .4) inset,
                   0 1px 0 rgba(255, 255, 255, .4);
  text-shadow: none;
}

.toolbarbutton-1[checked="true"]:not(:active):hover {
  background-color: rgba(90%, 90%, 90%, .4);
  -moz-transition: background-color .4s;
}

.toolbarbutton-menubutton-button > .toolbarbutton-icon,
.toolbarbutton-1 > .toolbarbutton-icon {
  -moz-margin-end: 0;
  width: 18px;
  height: 18px;
}

toolbar[iconsize="small"] .toolbarbutton-menubutton-button > .toolbarbutton-icon,
toolbar[iconsize="small"] .toolbarbutton-1 > .toolbarbutton-icon {
  margin: 1px;
  width: 16px;
  height: 16px;
}

/* Default icons have a built-in glow, so they are 18*18px even in small mode,
   except for the large back icon, which is why the code below uses 'auto'
   rather than 18px. This will pick the correct size based on the image
   region. */
:-moz-any(
    #button-send, #button-contacts, #spellingButton, #button-attach,
    #button-security, #button-save, #quoteButton, #cut-button,
    #copy-button, #paste-button) .toolbarbutton-icon {
  margin: 0 !important;
  width: auto !important;
  height: auto !important;
}

toolbar[iconsize="small"] .toolbarbutton-menubutton-button > .toolbarbutton-text,
toolbar[iconsize="small"] .toolbarbutton-1 > .toolbarbutton-text {
  margin: 0 !important;
}

toolbox[labelalign="end"] > toolbar[mode="full"] .toolbarbutton-1 .toolbarbutton-text {
  -moz-padding-start: 2px;
}

toolbox[labelalign="end"] > toolbar[mode="full"] deck .toolbarbutton-text {
  text-align: start;
}

@media all and (-moz-windows-compositor) {
  #msgcomposeWindow {
    -moz-appearance: -moz-win-borderless-glass;
    background: transparent;
  }

  #compose-toolbox:not(:-moz-lwtheme),
  #compose-toolbox > #composeToolbar2,
  #compose-toolbox > toolbar {
    background: transparent !important;
    border-style: none;
  }

  #compose-toolbox:not(:-moz-lwtheme) {
    color: black;
    text-shadow: 0 0 .7em white, 0 0 .7em white, 0 1px 0 rgba(255, 255, 255, .4);
  }

  #headers-box,
  #MsgHeadersToolbar {
    -moz-appearance: none;
    border-radius: 3.5px 3.5px 0 0;
  }

  #menubar-items:not(:-moz-lwtheme):not(:-moz-window-inactive) {
    background-color: rgba(255, 255, 255, .3);
    border-radius: 4px;
  }

  .toolbarbutton-menubutton-button[disabled="true"],
  .toolbarbutton-menubutton-dropmarker[disabled="true"] {
    opacity: 1 !important;
  }
}

#button-send {
  list-style-image: url("chrome://messenger/skin/messengercompose/compose-toolbar.png");
  -moz-image-region: rect(0px 18px 18px 0px);
}

#button-contacts {
  list-style-image: url("chrome://messenger/skin/messengercompose/compose-toolbar.png");
  -moz-image-region: rect(0px 36px 18px 18px) !important;
}

#spellingButton {
  list-style-image: url("chrome://messenger/skin/messengercompose/compose-toolbar.png");
  -moz-image-region: rect(0px 54px 18px 36px);
}

#button-attach {
  list-style-image: url("chrome://messenger/skin/messengercompose/compose-toolbar.png");
  -moz-image-region: rect(0px 72px 18px 54px);
}

#button-security {
  list-style-image: url("chrome://messenger/skin/messengercompose/compose-toolbar.png") !important;
  -moz-image-region: rect(0px 90px 18px 72px) !important;
}

#button-save {
  list-style-image: url("chrome://messenger/skin/messengercompose/compose-toolbar.png");
  -moz-image-region: rect(0px 108px 18px 90px);
}

#quoteButton {
  list-style-image: url("chrome://messenger/skin/messengercompose/compose-toolbar.png");
  -moz-image-region: rect(0px 126px 18px 108px);
}
#cut-button {
  list-style-image: url("chrome://messenger/skin/messengercompose/compose-toolbar.png");
  -moz-image-region: rect(0px 144px 18px 126px);
}
#copy-button {
  list-style-image: url("chrome://messenger/skin/messengercompose/compose-toolbar.png");
  -moz-image-region: rect(0px 162px 18px 144px);
}
#paste-button {
  list-style-image: url("chrome://messenger/skin/messengercompose/compose-toolbar.png");
  -moz-image-region: rect(0px 180px 18px 162px);
}

/* ::::: special toolbar colors ::::: */

#appcontent {
  border-top: 1px solid ThreeDShadow;
  border-left: 1px solid ThreeDShadow;
  border-right: 1px solid ThreeDHighlight;
}

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

/* ::::: attachment reminder ::::: */

#attachmentNotificationBox > notification .messageImage {
  width: 18px;
  height: 18px;
  background-image: url(chrome://messenger/skin/messengercompose/compose-toolbar.png);
  background-position: -54px top;
}

#attachmentReminderText {
  -moz-margin-start: 0px;
  cursor: pointer;
}

#attachmentKeywords {
  font-weight: bold;
  -moz-margin-start: 0px;
  text-decoration: underline;
  cursor: pointer;
}

/* XXX I should really have a selector rule here to select just .listcell-icon
   objects underneath the attachmentList listbox */

.listcell-icon {
  -moz-margin-start: 2px;
  margin-top: 2px;
}

#compose-toolbar-sizer {
  border-top-width: 1px;
  border-left: none;
  border-right: none;
  -moz-border-top-colors: ThreeDHighlight;
}

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

/* ::::: addressing widget ::::: */

.autocomplete-treebody::-moz-tree-cell-text(comment) {
  color: #555566;
}

@media all and (-moz-windows-default-theme) {
  treechildren.autocomplete-treebody::-moz-tree-cell-text(selected) {
    color: -moz-DialogText !important;
  }
}

#addressingWidget {
  -moz-user-focus: none;
  width: 0;
}

#typecol-addressingWidget {
  min-width: 9em;
  border-right: 1px solid #CACAFF;
}

.addressingWidgetItem,
.dummy-row {
  border: none !important;
  background-color: inherit !important;
  color: inherit !important;
}

.addressingWidgetCell {
  border-bottom: 1px solid #CACAFF;
  padding: 0px;
}

.addressingWidgetCell:first-child {
  border-top: none;
}

.dummy-row-cell:first-child {
  border-top: none;
  border-bottom: 1px solid #CACAFF;
}

.person-icon {
  margin: 0 3px;
  list-style-image: url("chrome://messenger/skin/addressbook/icons/abcard.png");
}

.aw-menulist {
  -moz-appearance: menulist;
  margin: 1px;
}

.aw-menulist > .menulist-label-box {
  margin: -1px 1px;
}

.aw-menulist > dropmarker {
  height: 11px;
}

/* ::::: format toolbar ::::: */

#FormatToolbar > toolbarbutton {
  list-style-image: url("chrome://messenger/skin/messengercompose/format-buttons.png");
}

#FormatToolbar > toolbarbutton > .toolbarbutton-text {
  display: none;
}

#DecreaseFontSizeButton {
  -moz-image-region: rect(0px 16px 16px 0px);
}

#DecreaseFontSizeButton[disabled="true"] {
  -moz-image-region: rect(16px 16px 32px 0px) !important;
}

#IncreaseFontSizeButton {
  -moz-image-region: rect(0px 32px 16px 16px);
}

#IncreaseFontSizeButton[disabled="true"] {
  -moz-image-region: rect(16px 32px 32px 16px) !important;
}

#boldButton {
  -moz-image-region: rect(0px 48px 16px 32px);
}
#boldButton[disabled="true"] {
  -moz-image-region: rect(16px 48px 32px 32px) !important;
}

#italicButton {
  -moz-image-region: rect(0px 64px 16px 48px);
}
#italicButton[disabled="true"] {
  -moz-image-region: rect(16px 64px 32px 48px) !important;
}

#underlineButton {
  -moz-image-region: rect(0px 80px 16px 64px);
}
#underlineButton[disabled="true"] {
  -moz-image-region: rect(16px 80px 32px 64px) !important;
}

#ulButton {
  -moz-image-region: rect(0px 96px 16px 80px);
}
#ulButton[disabled="true"] {
  -moz-image-region: rect(16px 96px 32px 80px) !important;
}

#olButton {
  -moz-image-region: rect(0px 112px 16px 96px);
}
#olButton[disabled="true"] {
  -moz-image-region: rect(16px 112px 32px 96px) !important;
}

#outdentButton {
  -moz-image-region: rect(0px 128px 16px 112px);
}
#outdentButton[disabled="true"] {
  -moz-image-region: rect(16px 128px 32px 112px) !important;
}

#indentButton {
  -moz-image-region: rect(0px 144px 16px 128px);
}
#indentButton[disabled="true"] {
  -moz-image-region: rect(16px 144px 32px 128px) !important;
}

#AlignPopupButton {
  -moz-image-region: rect(0px 176px 16px 160px);
}
#AlignPopupButton[disabled="true"] {
  -moz-image-region: rect(16px 176px 32px 160px) !important;
}

#InsertPopupButton {
  -moz-image-region: rect(0px 224px 16px 208px);
}
#InsertPopupButton[disabled="true"] {
  -moz-image-region: rect(16px 224px 32px 208px) !important;
}

#smileButtonMenu {
  -moz-image-region: rect(0px 240px 16px 224px);
}
#smileButtonMenu[disabled="true"] {
  -moz-image-region: rect(16px 240px 32px 224px) !important;
}

/* ..... align menu ..... */

#AlignPopup > menuitem {
  list-style-image: url("chrome://messenger/skin/messengercompose/format-buttons.png");
}

#AlignLeftItem {
  -moz-image-region: rect(0px 160px 16px 144px);
}

#AlignCenterItem {
  -moz-image-region: rect(0px 176px 16px 160px);
}

#AlignRightItem {
  -moz-image-region: rect(0px 192px 16px 176px);
}

#AlignJustifyItem {
  -moz-image-region: rect(0px 208px 16px 192px);
}

/* ..... smiley menu ..... */

#smileySmile > .menu-iconic-left {
  list-style-image: url("chrome://communicator/skin/icons/smileys/smiley-smile.png");
  -moz-image-region: auto; /* cut off inheritance */
}

#smileyFrown > .menu-iconic-left {
  list-style-image: url("chrome://communicator/skin/icons/smileys/smiley-frown.png");
  -moz-image-region: auto; /* cut off inheritance */
}

#smileyWink > .menu-iconic-left {
  list-style-image: url("chrome://communicator/skin/icons/smileys/smiley-wink.png");
  -moz-image-region: auto; /* cut off inheritance */
}

#smileyTongue > .menu-iconic-left {
  list-style-image: url("chrome://communicator/skin/icons/smileys/smiley-tongue-out.png");
  -moz-image-region: auto; /* cut off inheritance */
}

#smileyLaughing > .menu-iconic-left {
  list-style-image: url("chrome://communicator/skin/icons/smileys/smiley-laughing.png");
  -moz-image-region: auto; /* cut off inheritance */
}

#smileyEmbarassed > .menu-iconic-left {
  list-style-image: url("chrome://communicator/skin/icons/smileys/smiley-embarassed.png");
  -moz-image-region: auto; /* cut off inheritance */
}

#smileyUndecided > .menu-iconic-left {
  list-style-image: url("chrome://communicator/skin/icons/smileys/smiley-undecided.png");
  -moz-image-region: auto; /* cut off inheritance */
}

#smileySurprise > .menu-iconic-left {
  list-style-image: url("chrome://communicator/skin/icons/smileys/smiley-surprised.png");
  -moz-image-region: auto; /* cut off inheritance */
}

#smileyKiss > .menu-iconic-left {
  list-style-image: url("chrome://communicator/skin/icons/smileys/smiley-kiss.png");
  -moz-image-region: auto; /* cut off inheritance */
}

#smileyYell > .menu-iconic-left {
  list-style-image: url("chrome://communicator/skin/icons/smileys/smiley-yell.png");
  -moz-image-region: auto; /* cut off inheritance */
}

#smileyCool > .menu-iconic-left {
  list-style-image: url("chrome://communicator/skin/icons/smileys/smiley-cool.png");
  -moz-image-region: auto; /* cut off inheritance */
}

#smileyMoney > .menu-iconic-left {
  list-style-image: url("chrome://communicator/skin/icons/smileys/smiley-money-mouth.png");
  -moz-image-region: auto; /* cut off inheritance */
}

#smileyFoot > .menu-iconic-left {
  list-style-image: url("chrome://communicator/skin/icons/smileys/smiley-foot-in-mouth.png");
  -moz-image-region: auto; /* cut off inheritance */
}

#smileyInnocent > .menu-iconic-left {
  list-style-image: url("chrome://communicator/skin/icons/smileys/smiley-innocent.png");
  -moz-image-region: auto; /* cut off inheritance */
}

#smileyCry > .menu-iconic-left {
  list-style-image: url("chrome://communicator/skin/icons/smileys/smiley-cry.png");
  -moz-image-region: auto; /* cut off inheritance */
}

#smileySealed > .menu-iconic-left {
  list-style-image: url("chrome://communicator/skin/icons/smileys/smiley-sealed.png");
  -moz-image-region: auto; /* cut off inheritance */
}

/* ..... fg/bg color picker ..... */

.ColorPickerLabel {
  border: 1px inset ThreeDFace;
  margin: 0px;
  padding: 2px;
}

.color-button {
  border: 1px inset ThreeDFace;
  padding: 0px;
  width: 14px;
  height: 12px;
  margin: 2px;
}

.color-button:hover {
  border: 1px solid ThreeDDarkShadow;
}

#TextColorButton {
  margin-top: 2px;
  margin-bottom: 9px;
  -moz-margin-start: 2px;
  -moz-margin-end: 9px;
}

#BackgroundColorButton {
  margin-top: 9px;
  margin-bottom: 2px;
  -moz-margin-start: 9px;
  -moz-margin-end: 2px;
}

#HighlightColorButton {
  -moz-image-region: rect(260px 16px 272px 0px);
  background-color: transparent;
}

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

#HighlightColorButton:hover:active {
  -moz-image-region: rect(260px 48px 272px 32px);
}

#HighlightColorButton[disabled="true"],
#HighlightColorButton[disabled="true"]:hover,
#HighlightColorButton[disabled="true"]:hover:active {
  -moz-image-region: rect(260px 64px 272px 48px);
}

/* ::::: address book sidebar ::::: */
.ab-closebutton {
  list-style-image: url("chrome://messenger/skin/icons/close-button.png");
  -moz-image-region: rect(0 16px 16px 0);
  -moz-appearance: none;
  border: none !important;
  padding: 2px;
}

.ab-closebutton:hover {
  -moz-image-region: rect(0 32px 16px 16px);
}

.ab-closebutton:hover:active {
  -moz-image-region: rect(0 48px 16px 32px);
}

.ab-closebutton > .toolbarbutton-icon {
  -moz-margin-end: 0px; /* override toolkit's default value */
}

#sidebar {
  background-color: Window;
}
