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

.tabmail-tab[type="folder"][selected="true"] .tab-icon-image {
  list-style-image: url("chrome://messenger/skin/icons/folder-open.png");
}

treechildren::-moz-tree-image(folderNameCol) {
  -moz-margin-end: 2px;
  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"] .tab-icon-image,
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"] .tab-icon-image,
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"] .tab-icon-image,
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"] .tab-icon-image,
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"] .tab-icon-image,
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"] .tab-icon-image,
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"] .tab-icon-image,
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"] .tab-icon-image,
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"] .tab-icon-image,
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"] .tab-icon-image,
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"] .tab-icon-image,
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"] .tab-icon-image  {
  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"] .tab-icon-image,
.tabmail-tab[type="folder"][IsServer="true"][ServerType="pop3"][IsSecure="true"] .tab-icon-image {
  list-style-image: url("chrome://messenger/skin/icons/server-remote-lock.png");
}

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

/* ..... News server ..... */
.tabmail-tab[type="folder"][IsServer="true"][ServerType="nntp"] .tab-icon-image {
  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"] .tab-icon-image {
  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(folderNameCol, newMessages-true),
treechildren::-moz-tree-cell(folderNameCol, specialFolder-Inbox, newMessages-true) {

}

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: grey; 
}
