/* ***** 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-1999
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 * Joachim Herb <herb@leo.org>
 *
 * 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 ***** */

/* ===== messageHeader.css ==============================================
  == Styles for the header toolbars of a mail message.
  ======================================================================= */

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

/* ::::: for the entire area ::::: */
.main-header-area {
  color: #2E3436; /* Aluminium 6 */
  background: -moz-linear-gradient(top, #909090, #FFFFFF 5px);
  border-bottom:1px solid #BFBFBF;
  padding: 0.6ex;
}

.main-header-area:-moz-window-inactive {
  background: -moz-linear-gradient(top, #CDCDCD, #FFFFFF 5px);
}

#displayDeck:not([collapsed="true"]) + #threadpane-splitter + #messagepanebox .main-header-area {
  background: -moz-linear-gradient(top, #E4E4E4, #FFFFFF 5px);
}

/* ::::: msg header toolbars ::::: */
#expandedHeaderView[show_header_mode="all"] {
  overflow-x: hidden;
  overflow-y: visible;
  max-height: 14em;
}

/* ::::: msg header buttons ::::: */
.headerContainer
{
  min-width: 1px;
}

.inline-toolbox {
  -moz-padding-end: 6px;
}

.inline-toolbar {
  -moz-appearance: none;
}

#expandedHeaderRows > row,
#expandedHeader2Rows > row {
/* Ensure that the header names and values are aligned with each other. */
  -moz-box-align: baseline;
}

#expandedHeadersTopBox {
  /* Use the HTML layout model to allow the message header toolbar to float to
     the right of the From field. */
  display: block;
}

#expandedBoxSpacer {
  display: block;
  height: 10px;
}

#otherActionsButton {
  margin-bottom: 0.1em;
  background: none;
  font-weight: normal;
  color: #41413F; /* higher contrast */
  border: 1px solid transparent;
  font-size: 100%;
  padding-top: 0px;
  box-shadow: none;
}

#otherActionsButton:hover {
  color: black;
  border: 1px solid rgb(145,145,145);
  background-color: rgb(210,210,210);
  box-shadow: 0 4px 3px 0 rgb(255,255,255) inset;
}


.msgHeaderView-flat-button[type="menu"] > .button-box > .button-menu-dropmarker,
.msgHeaderView-flat-button[type="menu-button"] > .button-menubutton-dropmarker {
  -moz-appearance: none !important;
}

.msgHeaderView-flat-button[type="menu"] > .button-box > .button-menu-dropmarker > .dropmarker-icon,
.msgHeaderView-flat-button[type="menu-button"] > .button-menubutton-dropmarker > .dropmarker-icon {
  list-style-image: url("chrome://messenger/skin/icons/arrow-dn-grey.png");
}

.msgHeaderView-flat-button[type="menu"]:hover > .button-box > .button-menu-dropmarker > .dropmarker-icon,
.msgHeaderView-flat-button[type="menu-button"]:hover > .button-menubutton-dropmarker > .dropmarker-icon {
  list-style-image: url("chrome://messenger/skin/icons/arrow-dn-black.png");
}

/* ::::: expanded header pane ::::: */

#expandedsubjectBox > .headerValue {
  font-weight: bold;
}

/* ::::: edit message bar ::::: */

#editMessageBox {
  min-width: 1px;
  border-bottom-left-radius: 0.2em;
  border-bottom-right-radius: 0.2em;
}

#editMessageDescription {
  font-style: italic;
  font-weight: bolder;
}

/* ::::: attachment view ::::: */

#attachmentList {
  margin: 0px;
  background-color: -moz-Field;
  color: -moz-FieldText;
}

#attachmentToggle {
  -moz-appearance: treetwisty;
  -moz-user-focus: normal;
}

#attachmentToggle[checked="true"] {
  -moz-appearance: treetwistyopen;
}

#attachmentToggle:focus {
  outline: 1px dotted Highlight;
}

#attachmentIcon {
  list-style-image: url("chrome://messenger/skin/icons/attachment.png");
  -moz-margin-start: 5px;
}

#attachmentCount {
  margin: 0;
  padding: 2px 0;
  -moz-margin-start: 2px;
  -moz-margin-end: 1px;
}

#attachmentName {
  -moz-user-focus: normal;
  margin: 0;
  -moz-margin-end: -3px;
  padding: 1px 2px;
  border-radius: 2px;
  border: 1px dotted transparent;
}

#attachmentName:hover,
#attachmentName[selected="true"] {
  cursor: pointer;
  background: -moz-linear-gradient(top, #F9CE90, #F6A942); /* orange gradient */
}

#attachmentName:focus {
  border-color: Highlight;
}

#attachmentSize {
  margin: 0;
  -moz-margin-start: 8px;
  color: #888a85; /* the same color as .headerName */
}

#attachmentSaveAllSingle,
#attachmentSaveAllMultiple {
  list-style-image: url("chrome://messenger/skin/icons/download.png");
}

#attachmentSaveAllSingle > .toolbarbutton-menubutton-button,
#attachmentSaveAllMultiple > .toolbarbutton-menubutton-button {
  /* Make sure that the icon is vertically centered */
  padding-bottom: 0px !important;
}

#attachmentView {
  border-top: 1px solid ThreeDShadow;
}

#attachment-splitter {
  min-height: 7px;
  border-top: 1px solid #C8C8C8;
  background-color: #E6E6E6;
}

/* ::::: attachment list ::::: */

.attachmentcell-icon {
  padding: 1px;
}

.attachmentcell-name,
.attachmentcell-size {
  padding-top: 1px;
}

.attachmentcell-size {
  color: GrayText;
}

attachmentlist:focus > attachmentitem[selected="true"][current="true"] {
  outline: 1px dotted #F3D982;
}

attachmentlist:focus > attachmentitem[current="true"] {
  outline: 1px dotted;
  outline-offset: -1px;
}

attachmentitem[selected="true"] {
  background-color: -moz-CellHighlight;
  color: -moz-CellHighlightText;
}

attachmentlist:focus > attachmentitem[selected="true"] {
  background-color: Highlight;
  color: HighlightText;
}

attachmentitem[selected="true"] .attachmentcell-size {
  color: -moz-CellHighlightText;
}

attachmentlist:focus >attachmentitem[selected="true"] .attachmentcell-size {
  color: HighlightText;
}

/* ::::: msg header captions ::::: */

#msgHeaderView {
  font-size: 100%;
  padding: 0;
  margin: 0;
}

#header-view-toolbar .msgHeaderView-button[disabled="true"] {
  display: none;
}

#dateLabel {
  -moz-padding-end: 3px;
  -moz-user-select: text;
  -moz-user-focus: normal;
  cursor: text;
}

#msgHeaderViewDeck {
  margin: 0;
  padding: 0;
}

/* Setting min & max-values here to make sure the buttons are the same size */

.msgHeaderView-button {
  -moz-appearance: none;
  border-radius: 4px;
  min-height: 22px;
  min-width: 22px;
  max-height: 22px;
  padding: 1px 2px;
  margin: 0px;
  -moz-margin-start: 0.4em;
  vertical-align: middle;
  list-style-image: none; /* overrides the rule from primaryToolbar.css */
  background-color: rgb(210,210,210);
  border: 1px solid rgb(145,145,145);
  box-shadow: 0 20px 11.5px -10px rgb(255,255,255) inset, 0 1px rgba(255,255,255, 0.4);
}

.msgHeaderView-button:active,
.msgHeaderView-button[type="menu-button"][open] {
  background-color: rgb(186,186,186);
  box-shadow: 0 4px 3px 0 rgb(140,140,140) inset;
}

.msgHeaderView-button[type="menu-button"] > .toolbarbutton-menubutton-button {
  -moz-appearance: none;
  padding: 0;
  margin: 0;
  -moz-padding-start: 0px;
  -moz-padding-end: 0px;
  -moz-margin-start: 0px;
  -moz-margin-end: 0px;
  padding-bottom: 2px !important;
  min-width: 1em;
  min-height: 1ex;
}

/* The default toolbarbutton CSS makes the dropmarker really tiny in icon mode;
 * make the click target easier to hit.
 */
.msgHeaderView-button[type="menu-button"] > .toolbarbutton-menubutton-dropmarker {
  -moz-margin-start: 3px;
  -moz-margin-end: 4px;
}

.msgHeaderView-flat-button {
  min-width: 1px;
  -moz-appearance: none;
  font-size: 90%;
  color: black;
  margin-top: 1px;
  margin-bottom: 2px;
  -moz-margin-start: 0px;
  -moz-margin-end: 5px;
  padding: 0 3px;
  background-color: rgb(211,215,207);
  border: 2px solid #C0C3C6;
  border-radius: 4px;
  -moz-border-top-colors: none;
  -moz-border-right-colors: none;
  -moz-border-bottom-colors: none;
  -moz-border-left-colors: none;
  min-height: 1ex;
}

.msgHeaderView-flat-button[type="menu-button"] > .button-menubutton-button {
  -moz-appearance: none;
  background-color: rgb(211,215,207);
  border-radius: 0px;
  border: 0;
  border-right: 2px solid transparent;
  -moz-padding-end: 0.2em;
  margin: 0;
  -moz-border-top-colors: none;
  -moz-border-right-colors: none;
  -moz-border-bottom-colors: none;
  -moz-border-left-colors: none;
}

.msgHeaderView-button > .toolbarbutton-text,
.msgHeaderView-button[type="menu-button"] > .toolbarbutton-menubutton-button {
  /* Needed to make the buttons at least the same height as the trash icon */
  min-height: 16px;
}

.msgHeaderView-flat-button[type="menu-button"]:hover > .button-menubutton-button {
  background-color: rgb(230,231,227);
}

.msgHeaderView-flat-button[type="menu-button"] > .button-menubutton-button:hover {
  border-right: 2px solid #B0B3B6;
} 

.msgHeaderView-flat-button[secondary="true"] {
  background: none;
}

toolbar[mode="text"] .msgHeaderView-button .toolbarbutton-text {
  margin: 0;
  padding: 0;
}

toolbarpaletteitem > #hdrReplyToSenderButton {
  display: -moz-box;
}

.hdrReplyToSenderButton,
.hdrDummyReplyButton,
.hdrReplyOnlyButton,
.hdrReplyButton {
  /* large icons are only needed for customization dialog, so use here also small icons */
  list-style-image: url("chrome://messenger/skin/icons/message-header-toolbar.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

.hdrReplyListButton {
  /* large icons are only needed for customization dialog, so use here also small icons */
  list-style-image: url("chrome://messenger/skin/icons/message-header-toolbar.png");
  -moz-image-region: rect(0px, 48px, 16px, 32px);
}

.hdrReplyAllButton {
  /* large icons are only needed for customization dialog, so use here also small icons */
  list-style-image: url("chrome://messenger/skin/icons/message-header-toolbar.png");
  -moz-image-region: rect(0px, 32px, 16px, 16px);
}

.hdrForwardButton {
  /* large icons are only needed for customization dialog, so use here also small icons */
  list-style-image: url("chrome://messenger/skin/icons/message-header-toolbar.png");
  -moz-image-region: rect(0px, 64px, 16px, 48px);
}

.hdrArchiveButton {
  /* large icons are only needed for customization dialog, so use here also small icons */
  list-style-image: url("chrome://messenger/skin/icons/message-header-toolbar.png");
  -moz-image-region: rect(0px, 112px, 16px, 96px);
}

.hdrJunkButton {
  /* large icons are only needed for customization dialog, so use here also small icons */
  list-style-image: url("chrome://messenger/skin/icons/message-header-toolbar.png");
  -moz-image-region: rect(0px, 96px, 16px, 80px);
}

.hdrTrashButton {
  /* large icons are only needed for customization dialog, so use here also small icons */
  list-style-image: url("chrome://messenger/skin/icons/message-header-toolbar.png");
  -moz-image-region: rect(0px, 80px, 16px, 64px);
}

.inline-toolbar toolbarpaletteitem toolbarseparator,
.inline-toolbar toolbarseparator {
  height: 26px;
}

.inline-toolbar toolbarspacer {
  height: 20px;
}

window[inlinetoolbox] #wrapper-spring {
  display: none;
}

.inline-toolbox[doCustomization] {
  background: grey;
}

.inline-toolbox[doCustomization] .inline-toolbar {
  min-width: 100px;
  min-height: 10px;
}

/* Only show the dummy smart reply button when customizing. */
.inline-toolbox[doCustomization] #hdrSmartReplyButton > toolbarbutton {
  display: none;
}

.inline-toolbox[doCustomization] #hdrDummyReplyButton {
  display: -moz-box !important;
}

.inline-toolbar {
  -moz-box-pack: end;
  min-width: 50px !important;
  min-height: 14px !important;
}


.msgHeaderView-flat-button:hover {
  background-color: rgb(230,231,227);
  border: 2px solid #B0B3B6;
}

#msgHeaderView textbox {
  color: inherit;
}

.headerName {
  color: #A1A1A1; /* lower contrast */
  font-weight: bold;
  text-align: right;
  background-color: transparent;
  padding: 0px;
  margin-top: 0;
  -moz-margin-end: 0;
}

.headerValueBox {
  overflow: visible;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.headerValue {
  min-width: 50px;
  white-space: normal;
  color: black !important;
  line-height: 1.5em;

  -moz-appearance: none !important;

  padding: .1em 0px !important;
  margin: 0px !important;
  margin-bottom: 3px !important;


  /* 1px plus 2px of border-radius matches the 3px at the beginning of
    .emailDisplayButton, making email address header values and plain text
    headers line up. Not sure why this math isn't needed in other themes*/
  -moz-margin-start: 1px !important;
  border: none !important;
  background-color: transparent;
}

.headerValue[containsEmail="true"] {
  -moz-margin-start: 0px !important;
}

.headerValueBox[singleline="true"] > .headerValue[containsEmail="true"] {
  white-space: nowrap;
}

.headerValueBox[singleline="true"] {
  overflow: hidden;
}

.headerValueUrl {
  cursor: pointer;
  color: #0000FF;
  text-decoration: underline;
}

.headerValueUrl:hover {
  color: red;
}

.headerField {
  color: inherit;
}

.moreIndicator {
  font-weight: bold;
  font-size: small;
}

.moreIndicator:hover {
  text-decoration: underline;
  color: darkred;
}

.tagvalue {
  padding: 0 0.5ex;
  -moz-margin-start: 0px;
  background-image: url("chrome://messenger/skin/tagbg.png");
  border-radius: 3px;
  border-width: 0.5px;
  border-style: outset;
  text-shadow: 0 1px 0 rgba(238,238,236,0.4); /* Tango Alumninum 1 */
  color: #111111;
}

/* ::::: msg header message ids ::::: */

.messageIdDisplayButton {
  margin: 0;
  padding-top: 0px !important;
  padding-bottom: 0px !important;
  -moz-padding-start: 0px !important;
  -moz-padding-end: 10px !important;
  background-color: transparent !important;
  background: url("chrome://messenger/skin/icons/arrow-dn-grey.png") no-repeat center right;
}

.messageIdDisplayButton:hover {
  cursor: pointer;
  text-decoration: underline;
  color: blue;
  background: url("chrome://messenger/skin/icons/arrow-dn-black.png") no-repeat center right;
}

/* ::::: msg header email addresses ::::: */

.emailDisplayButton {
  margin: 0;
  -moz-padding-start: 2px !important;
  -moz-padding-end: 2px !important;
  background-color: transparent;
  border-radius: 2px;
}

.emailDisplayButton:hover {
  cursor: pointer;
  background: -moz-linear-gradient(top, #F9CE90, #F6A942); /* orange gradient */
}

mail-emailaddress[selected="true"] .emailDisplayButton{
  /* when an email address context menu is selected,
    make sure that the email bubble stays displayed, and
    tweak the bottom to blend in more w/ the menu */
  cursor: pointer;
  border-radius: 3px;
  background: -moz-linear-gradient(top, #F9CE90, #F6A942); /* orange gradient */
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* this is for the comma in between email addresses */
.emailSeparator {
  -moz-margin-start: -5px; /* squeeze it inside the bubble, by the star */
}

/* Because there's no star for newsgroups like there is for email addresses,
 * pushing it back the same number of pixels as emailSeparator causes
 * the comma to be drawn on top of the text, which looks bad, so using
 * a separate rule here.
 */
.newsgroupSeparator {
  -moz-margin-start: -2px;
}

.emailDisplayButton:focus {
  border-top: 1px dotted #F6A942; /* Lightest hue from orange gradient */
  border-bottom: 1px dotted #F9CE90; /* Darkest hue from orange gradient */
  border-left: 1px dotted #F8BA67; /* Middle hue from orange gradient */
  border-right: 1px dotted #F8BA67; /* Middle hue from orange gradient */
}

.emailStar:focus {
  border: 1px dotted;
}

.emaillabel,
.newsgrouplabel {
  padding: 0px !important;  /* override <label> defaults */
  margin: 0px !important;  /* override <label> defaults */
  overflow: hidden;
}

.emailStar {
  max-width: 1em;
  max-height: 1em;
  -moz-appearance: none;
  -moz-box-orient: vertical;
  -moz-margin-start: -1px !important;
  padding: 0px;
  margin: 0px 2px;
  list-style-image: url("chrome://messenger/skin/starIcons.png");
  -moz-image-region: rect(0px, 16px, 16px, 0px);
}

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

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

.emailStar[hascard="true"] {
  -moz-image-region: rect(16px, 16px, 32px, 0px);
}

.emailStar:hover[hascard="true"] {
  -moz-image-region: rect(16px, 32px, 32px, 16px);
}

.emailStar:hover:active[hascard="true"] {
  -moz-image-region: rect(16px, 48px, 32px, 32px);
}

.emailPopup {
  font-size: inherit;
  max-height: 7px; /* the height of the image */
  margin: 0.2em 2px 0px; /* 0.2em just to move it off the top of the text */
  list-style-image: url("chrome://messenger/skin/icons/arrow-dn-7.png");
}

.emailPopup:hover {
  list-style-image: url("chrome://messenger/skin/icons/arrow-dn-blue.png");
}
 
/* ::::: email address twisty ::::: */

.addresstwisty {
  -moz-padding-end: 0px;
  padding-top: 4px;
  list-style-image:url("chrome://messenger/skin/icons/arrow/arrow-right-dim.png");
}

.addresstwisty:hover {
  list-style-image:url("chrome://messenger/skin/icons/arrow/arrow-right.png");
}

.addresstwisty[open] {
  list-style-image:url("chrome://messenger/skin/icons/arrow/arrow-down-dim.png");
}

.addresstwisty[open]:hover {
  list-style-image:url("chrome://messenger/skin/icons/arrow/arrow-down.png");
}

/* ::::: view expand and collapse twisties  ::::: */

.expandHeaderViewButton {
  list-style-image:url("chrome://messenger/skin/icons/twisty-open.gif");
}

/* ::::: collapsed view styles ::::: */

mail-multi-emailHeaderField,
mail-headerfield,
mail-newsgroups-headerfield {
  margin: 0;
  padding: 0;
  -moz-box-align: baseline;
}

window[inlinetoolbox] #smallicons,
window[inlinetoolbox] button[icon="add"] {
  display: none;
}

window[inlinetoolbox] #modelist menuitem:first-child {
  display: none;
}

mail-headerfield > .headerValue {
  -moz-user-focus: normal;
  -moz-user-select: text;
  word-wrap: break-word;
}

#header-view-toolbox {
  float: right;
  padding-top: 3px;
}

#header-view-toolbox:-moz-locale-dir(rtl) {
  float: left;
}
