/*
# ***** 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):
#
# 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 *****
*/

/* ===== mailWindow1.css ================================================
  == Styles for the main Mail window in the default layout scheme.
  ======================================================================= */

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

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


/* ::::::::: Global override :::::::::: */

treechildren::-moz-tree-twisty {
  margin-top: 0px !important;
  margin-bottom: 0px !important;
  -moz-margin-start: 0px !important;
  -moz-margin-end: -4px !important;
}

/* :::::::::::::::::::::::::::::::::::: */

#tabmail:-moz-lwtheme {
  text-shadow: none;
}

#folderPaneBox {
  border-right: 1px solid #8B8B8B;
  -moz-margin-end: -3px !important;
}

#folderTree {
  background-image: none !important;
  -moz-appearance: none !important;
}

#folderPaneHeader, #folderTree {
  background-color: #DEE4EA !important;
  border-bottom: 2px solid transparent;
}

#folderPaneHeader[overflowing="true"] {
  border-bottom: 2px groove ThreeDShadow;
}

#folderPaneHeader:-moz-window-inactive,
#folderTree:-moz-window-inactive {
  background-color: #E8E8E8 !important;
}

.focusring > .tree-stack > .tree-rows > .tree-bodybox {
  border: 0;
}


#folderTree treechildren::-moz-tree-indentation {
 background-color: black !important;
}

#folderTree treechildren::-moz-tree-row {
  -moz-padding-start: 2px !important;
  background: transparent;
}

#folderTree treechildren::-moz-tree-row(selected) {
  background: url("chrome://messenger/skin/icons/sidebar-item.png") 0 0 repeat-x #90A0C0;
}

#folderTree treechildren::-moz-tree-row(selected, focus) {
  background-position: 0 -18px;
}

#folderTree:-moz-system-metric(mac-graphite-theme) treechildren::-moz-tree-row(selected) {
  background-position: 0 -36px;
}

#folderTree:-moz-system-metric(mac-graphite-theme) treechildren::-moz-tree-row(selected, focus) {
  background-position: 0 -54px;
}

#folderTree treechildren:-moz-window-inactive::-moz-tree-row(selected) {
  background-position: 0 -72px;
}

#folderTree treechildren::-moz-tree-cell-text(selected, focus), #folderTree treechildren::-moz-tree-cell-text(selected) {
  color: HighlightText;
}

treecol,
treecolpicker {
  border: none;
  background-color: #e1e1e1;
}

#folderUnreadCol,
#folderTotalCol,
#folderSizeCol {
  text-align: right;
}

#folderNameCol [sortDirection="ascending"],
#folderNameCol [sortDirection="descending"] {
  list-style-image: none;
}

/* ::::: thread decoration ::::: */

treechildren::-moz-tree-cell-text(read) {
  font-weight: normal;
}

treechildren::-moz-tree-cell-text(unread) {
  font-weight: bold;
}

/* on a collapsed thread, if the top level message is read, but the thread has
 * unread children, underline the text.  4.x mac did this, very slick
 */
treechildren::-moz-tree-cell-text(container, closed, hasUnread, read) {
  text-decoration: underline;
}

/* ::::: message column icons ::::: */

treecol[hideheader="true"] {
}

/* ..... thread column ..... */

treecol.threadColumnHeader {
  list-style-image: url("chrome://messenger/skin/icons/unthreadcol.png");
}

treecol.threadColumnHeader[sortDirection="ascending"]  {
  list-style-image: url("chrome://messenger/skin/icons/threadcol.png");
}

treecol.threadColumnHeader[sortDirection="descending"] {
  list-style-image: url("chrome://messenger/skin/icons/threadcol.png");
}

treechildren::-moz-tree-image(threadCol, container) {
  list-style-image: url("chrome://messenger/skin/icons/thread-closed.png");
}

treechildren::-moz-tree-image(threadCol, container, selected) {
  list-style-image: url("chrome://messenger/skin/icons/thread-closed-selected.png");
}

treechildren::-moz-tree-image(threadCol, container, hasUnread) {
  list-style-image: url("chrome://messenger/skin/icons/thread-new-closed.png");
}

treechildren::-moz-tree-image(threadCol, container, hasUnread, selected) {
  list-style-image: url("chrome://messenger/skin/icons/thread-closed-selected.png");
}

/* ..... read column ..... */

treecol.readColumnHeader {
  list-style-image: url("chrome://messenger/skin/icons/readcol.png");
}

treechildren::-moz-tree-image(unreadButtonColHeader) {
  list-style-image: url("chrome://messenger/skin/icons/readmail.png");
}

treechildren::-moz-tree-image(unreadButtonColHeader, dummy) {
  list-style-image: none;
}

treechildren::-moz-tree-image(unreadButtonColHeader, unread) {
  list-style-image: url("chrome://messenger/skin/icons/unreadmail.png");
}

treechildren::-moz-tree-image(unreadButtonColHeader, unread, selected, focus) {
  list-style-image: url("chrome://messenger/skin/icons/unreadmail-selected.png");
}

treechildren::-moz-tree-image(subjectCol, replied) {
  list-style-image: url("chrome://messenger/skin/icons/symbol-replied.png") !important;
}

treechildren::-moz-tree-image(subjectCol, replied, selected) {
  list-style-image: url("chrome://messenger/skin/icons/symbol-replied-selected.png") !important;
}

treechildren::-moz-tree-image(subjectCol, forwarded) {
  list-style-image: url("chrome://messenger/skin/icons/symbol-forwarded.png") !important;
}

treechildren::-moz-tree-image(subjectCol, forwarded, selected) {
  list-style-image: url("chrome://messenger/skin/icons/symbol-forwarded-selected.png") !important;
}

treechildren::-moz-tree-image(subjectCol, replied, forwarded) {
  list-style-image: url("chrome://messenger/skin/icons/symbol-replied-forwarded.png") !important;
}

treechildren::-moz-tree-image(subjectCol, replied, forwarded, selected) {
  list-style-image: url("chrome://messenger/skin/icons/symbol-replied-forwarded-selected.png") !important;
}

/* ..... attachment column ..... */

treecol.attachmentColumnHeader {
  list-style-image: url("chrome://messenger/skin/icons/attachment-col.png");

  -moz-padding-end: 5px;
}

treechildren::-moz-tree-image(attachmentCol, attach) {
  list-style-image: url("chrome://messenger/skin/icons/attachment.png");
}

treechildren::-moz-tree-image(attachmentCol, attach, focus, selected) {
  list-style-image: url("chrome://messenger/skin/icons/attachment-selected.png");
}

/* ..... flag column ..... */

treecol.flagColumnHeader {
  list-style-image: url("chrome://messenger/skin/icons/flagcol.png");
}

treechildren::-moz-tree-image(flaggedCol) {
  list-style-image: url("chrome://messenger/skin/icons/readmail.png");
}

treechildren::-moz-tree-image(flaggedCol, dummy) {
  list-style-image: none;
}

treechildren::-moz-tree-image(flaggedCol, flagged) {
  list-style-image: url("chrome://messenger/skin/icons/flaggedmail.png");
}

/* ..... junkStatus column ..... */

treecol.junkStatusHeader {
  list-style-image: url("chrome://messenger/skin/icons/junk-column-header.png");
  -moz-padding-end: 3px;
  -moz-padding-start: 2px;
}

/* "unknown" now looks like "not junk".  see bug #182386 */
treechildren::-moz-tree-image(junkStatusCol) {
  list-style-image: url("chrome://messenger/skin/icons/readmail.png");
}

treechildren::-moz-tree-image(junkStatusCol, dummy) {
  list-style-image: none;
}

treechildren::-moz-tree-image(junkStatusCol, junk) {
  list-style-image: url("chrome://messenger/skin/icons/folder-junk.png");
  -moz-margin-end: -1px;
}

treechildren::-moz-tree-image(junkStatusCol, notjunk) {
  list-style-image: url("chrome://messenger/skin/icons/readmail.png");
  -moz-padding-start: 0px;
  -moz-padding-end: 4px;
}

/* ..... subject column ..... */

treechildren::-moz-tree-image(subjectCol) {
  list-style-image: url("chrome://messenger/skin/icons/symbol-null.png");
  margin: 0;
  padding: 0;
}

treechildren::-moz-tree-image(subjectCol, dummy) {
  list-style-image: none;
}

treechildren::-moz-tree-image(subjectCol, imapdeleted) {
  list-style-image: url("chrome://messenger/skin/icons/symbol-imapdeleted.png") !important;
}

treechildren::-moz-tree-image(subjectCol, imapdeleted, selected) {
  list-style-image: url("chrome://messenger/skin/icons/symbol-imapdeleted-selected.png") !important;
}


treechildren::-moz-tree-image(subjectCol, news) {
  list-style-image: none;
}

treechildren::-moz-tree-image(subjectCol, news, attach) {
  list-style-image: none;
}

treechildren::-moz-tree-image(subjectCol, news, attach, offline) {
  list-style-image: none;
}

treechildren::-moz-tree-image(subjectCol, news, new) {
  list-style-image: none;
}

treechildren::-moz-tree-image(subjectCol, news, new, attach) {
  list-style-image: none;
}

/* ..... new thread icons for watch and ignore ..... */

treechildren::-moz-tree-image(news, threadCol, watch) {
  list-style-image: url("chrome://messenger/skin/icons/thread-closed-eye.png");
}

treechildren::-moz-tree-image(news, threadCol, ignore) {
  list-style-image: url("chrome://messenger/skin/icons/thread-closed-kill.png");
}

treechildren::-moz-tree-image(news, threadCol, ignoreSubthread) {
  list-style-image: url("chrome://messenger/skin/icons/message-closed-kill.png");
}

#sizeCol,
#unreadCol,
#totalCol {
  text-align: right;
}

/* ::::: group rows ::::: */

treechildren::-moz-tree-row(dummy)  {
  background-image: url("chrome://messenger/skin/icons/group-background.gif");
  background-repeat: repeat-x;
  background-color: rgb(246, 246, 246);
  border: 1px solid rgb(197, 199, 202);
  margin: 0 1px;
}

treechildren::-moz-tree-row(dummy, focus, selected)  {
  background-color: #3874d1;
  border-color: #3874d1;
  background-image: none !important;
  margin: 0px;
  padding: 0 1px;
}

/* ..... message pane adjustments ..... */

/* We need to hide overflow in messagepanebox, so that resizing doesn't spill
   header content over the statusbar.
   */

#messagepanebox {
  background-color: #FFFFFF;
  -moz-appearance: none;
  overflow: hidden;
}

/* ..... folder pane adjustments ..... */

#folderpane-title {
  text-transform: uppercase;
  color: #555;
  font-weight: bold;
  padding: 4px 0;
}

.folderview-cycler,
.folderview-cycler .toolbarbutton-icon,
.folderview-cycler .toolbarbutton-text {
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

.folderview-cycler[dir="prev"],
.folderview-cycler[dir="next"]:-moz-locale-dir(rtl) {
  list-style-image: url("chrome://messenger/skin/icons/spin-buttons.png");
  -moz-image-region: rect(0 15px 16px 0);
  padding: 0 !important;
  margin: 0 !important;
}

.folderview-cycler[dir="next"],
.folderview-cycler[dir="prev"]:-moz-locale-dir(rtl) {
  list-style-image: url("chrome://messenger/skin/icons/spin-buttons.png");
  -moz-image-region: rect(0 31px 16px 15px);
  padding: 0 !important;
  margin: 0 !important;
  -moz-margin-end: 4px !important;
}

.folderview-cycler:active {
  list-style-image: url("chrome://messenger/skin/icons/spin-buttons-active.png") !important;
}
/* ..... splitter adjustments ..... */

splitter {
  background-color: transparent;
  width: 7px;
  min-width: 7px;
  min-height: 7px;
}

#threadpane-splitter {
  height: 8px !important;
  min-height: 8px;
  background-image: url("chrome://messenger/skin/icons/vertical-threadpane-splitter-bg.gif");
  background-repeat: repeat-y;
  -moz-border-start: 1px solid #A6A6A6;
  -moz-border-end: 1px solid #8C8C8C;
}

#threadpane-splitter:-moz-locale-dir(rtl) {
  background-image: url("chrome://messenger/skin/icons/vertical-threadpane-splitter-bg-rtl.gif");
}

/* The orient="vertical" isn't which direction the splitter itself runs, it's
   actually which way its parent lays out its children, so when it's vertical,
   the splitter is a horizontal bar. */
#threadpane-splitter[orient="vertical"] {
  background-image: url("chrome://messenger/skin/icons/threadpane-splitter-bg.gif");
  background-repeat: repeat-x;
  border-top: 1px solid #A6A6A6;
  border-bottom: 1px solid #8C8C8C;
  -moz-border-start-width: 0;
  -moz-border-end-width: 0;
}

#threadpane-splitter[state="collapsed"] {
  border-bottom-width: 0;
  -moz-border-end: 0;
}

#folderpane_splitter {
  background-image: none;
  width: 3px;
  min-width: 3px;
}

/* ..... status bar adjustments ..... */

#status-bar {
  border-top: none !important;
}

#quotaMeter {
  min-width: 4em;
  max-width: 4em;
}
#quotaPanel[alert="warning"] .progress-bar {
  background-color: orange;
  -moz-appearance: none;
}
#quotaPanel[alert="critical"] .progress-bar {
  background-color: red;
  -moz-appearance: none;
}
#quotaLabel {
  text-align: center;
}

.tabmail-tab[type="message"] {
  list-style-image: url("chrome://messenger/skin/icons/message-mail.png");
}
