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

/* ::::: Folder Pane ::::: */
.tabmail-tab[type="folder"] {
  list-style-image: url("chrome://messenger/skin/icons/folder-closed.png");
}

treechildren::-moz-tree-image(folderNameCol) {
  -moz-margin-end: 4px;
  list-style-image: url("chrome://messenger/skin/icons/folder-closed.png");
}

treechildren::-moz-tree-image(folderNameCol, newMessages-true) {
  list-style-image: url("chrome://messenger/skin/icons/folder-closed.png");
}

/* ..... News Folders ..... */
.tabmail-tab[type="folder"][ServerType="nntp"],
treechildren::-moz-tree-image(folderNameCol, serverType-nntp) {
  list-style-image: url("chrome://messenger/skin/icons/folder-newsgroup.png");
}

/* ..... Feed Folders ..... */
.tabmail-tab[type="folder"][ServerType="rss"],
treechildren::-moz-tree-image(folderNameCol, serverType-rss) {
  list-style-image: url("chrome://messenger/skin/icons/message-news.png");
}

/* ..... Inbox ..... */
.tabmail-tab[type="folder"][SpecialFolder="Inbox"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Inbox) {
  list-style-image: url("chrome://messenger/skin/icons/folder-inbox.png");
}

treechildren::-moz-tree-image(folderNameCol, specialFolder-Inbox, newMessages-true) {
  list-style-image: url("chrome://messenger/skin/icons/folder-inbox.png");
}

/* ..... Sent ..... */
.tabmail-tab[type="folder"][SpecialFolder="Sent"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Sent) {
  list-style-image: url("chrome://messenger/skin/icons/folder-sent.png");
}

/* ..... Unsent ..... */
.tabmail-tab[type="folder"][SpecialFolder="Outbox"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Outbox) {
  list-style-image: url("chrome://messenger/skin/icons/folder-outbox.png");
}

/* ..... Drafts ..... */
.tabmail-tab[type="folder"][SpecialFolder="Drafts"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Drafts) {
  list-style-image: url("chrome://messenger/skin/icons/folder-draft.png");
}

/* ..... Templates ..... */
.tabmail-tab[type="folder"][SpecialFolder="Templates"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Templates) {
  list-style-image: url("chrome://messenger/skin/icons/folder-template.png");
}

/* ..... Junk ..... */
.tabmail-tab[type="folder"][SpecialFolder="Junk"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Junk) {
  list-style-image: url("chrome://messenger/skin/icons/folder-junk.png");
}

/* ..... Trash ..... */
.tabmail-tab[type="folder"][SpecialFolder="Trash"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Trash) {
  list-style-image: url("chrome://messenger/skin/icons/folder-trash.png");
}

/* ..... Saved Search Folder ..... */
.tabmail-tab[type="folder"][SpecialFolder="Virtual"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Virtual) {
  list-style-image: url("chrome://messenger/skin/icons/saved-search-folder.png");
}

/* ..... Archive Folder ..... */
.tabmail-tab[type="folder"][SpecialFolder="Archive"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Archive) {
  list-style-image: url("chrome://messenger/skin/icons/folder-archive.png");
}

/* Disable Shared Folder Rule for now
treechildren::-moz-tree-image(folderNameCol, imapShared-true) {
  list-style-image: url("chrome://messenger/skin/icons/folder-share.png");
}
*/

/* ..... Server Folders ..... */

treechildren::-moz-tree-image(folderNameCol, isServer-true) {
  list-style-image: url("chrome://messenger/skin/icons/server-mail.png");
}

treechildren::-moz-tree-image(folderNameCol, biffState-NewMail, isServer-true) {
  list-style-image: url("chrome://messenger/skin/icons/server-mail.png");
}

treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-pop3, isSecure-true) {
  list-style-image: url("chrome://messenger/skin/icons/server-remote-lock.png");
}

treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-imap, isSecure-true) {
  list-style-image: url("chrome://messenger/skin/icons/server-remote-lock.png");
}

treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-none) {
  list-style-image: url("chrome://messenger/skin/icons/server-local.png");
}

/* ..... News Folders ..... */
treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-nntp) {
  list-style-image: url("chrome://messenger/skin/icons/server-news.png");
}

treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-nntp, isSecure-true) {
  list-style-image: url("chrome://messenger/skin/icons/server-news-lock.png");
}

/* ..... Feed Folders ..... */
treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-rss) {
  list-style-image: url("chrome://messenger/skin/icons/server-newsblog.png");
}

/* ..... Account nodes ..... */
.tabmail-tab[type="folder"][IsServer="true"] {
  list-style-image: url("chrome://messenger/skin/icons/server-mail.png");
}

/* ..... Secure IMAP/POP account nodes ..... */
.tabmail-tab[type="folder"][IsServer="true"][ServerType="imap"][IsSecure="true"],
.tabmail-tab[type="folder"][IsServer="true"][ServerType="pop3"][IsSecure="true"] {
  list-style-image: url("chrome://messenger/skin/icons/server-remote-lock.png");
}

/* ..... Local folders ..... */
.tabmail-tab[type="folder"][IsServer="true"][ServerType="none"] {
  list-style-image: url("chrome://messenger/skin/icons/server-local.png");
}

/* ..... News server ..... */
.tabmail-tab[type="folder"][IsServer="true"][ServerType="nntp"] {
  list-style-image: url("chrome://messenger/skin/icons/server-news.png");
}

/* ..... Secure news server ..... */
.folderMenuItem[IsServer="true"][ServerType="nntp"][IsSecure="true"] {
  list-style-image: url("chrome://messenger/skin/icons/server-news-lock.png");
}

/* .....  Newsgroup .....  */
.tabmail-tab[type="folder"][ServerType="nntp"] {
  list-style-image: url("chrome://messenger/skin/icons/folder-newsgroup.png");
}

/* ::::: All Servers ::::: */

treechildren::-moz-tree-cell-text(folderNameCol, biffState-NewMail, isServer-true),
treechildren::-moz-tree-cell-text(folderNameCol, newMessages-true),
treechildren::-moz-tree-cell-text(folderNameCol, specialFolder-Inbox, newMessages-true) {
  font-weight: bold;
  color: blue;
}

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

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

treechildren::-moz-tree-cell-text(folderNameCol, noSelect-true) {
  color: gray;
  font-style: italic;
}

.tree-folder-checkbox {
  list-style-image: none;
}

/* ::::: Folder Summary Popup ::::: */

.folderSummary-message-row {
  /* This max width ends up dictating the overall width of the popup
     because it controls how large the preview, subject and sender text can be
     before cropping kicks in */
  max-width: 450px;
}

.folderSummary-subject {
  font-weight: bold; 
}

.folderSummary-previewText {
  color: gray; 
}
