/* ::::: Folder Pane ::::: */

.tabmail-tab[type="folder"] .tab-icon-image {
  list-style-image: url("chrome://messenger/skin/icons/folder.png");
  -moz-image-region: rect(0 16px 16px 0);
}

.tabmail-tab[type="folder"][selected="true"] .tab-icon-image {
  -moz-image-region: rect(0 32px 16px 16px);
}

treechildren::-moz-tree-image(folderNameCol) {
  -moz-margin-end: 2px;
  list-style-image: url("chrome://messenger/skin/icons/folder.png");
  -moz-image-region: rect(0 16px 16px 0);
}

treechildren::-moz-tree-image(folderNameCol, newMessages-true) {
  -moz-image-region: rect(16px 16px 32px 0);
}

treechildren::-moz-tree-image(folderNameCol, selected, open) {
  -moz-image-region: rect(0 32px 16px 16px);
}

treechildren::-moz-tree-image(folderNameCol, selected, open, newMessages-true) {
  -moz-image-region: rect(16px 32px 32px 16px);
}

/* ..... Newsgroup ..... */

.tabmail-tab[type="folder"][ServerType="nntp"] .tab-icon-image,
treechildren::-moz-tree-image(folderNameCol, serverType-nntp) {
  -moz-image-region: rect(0 160px 16px 144px);
}

/* ..... Feed ..... */

.tabmail-tab[type="folder"][ServerType="rss"] .tab-icon-image,
treechildren::-moz-tree-image(folderNameCol, serverType-rss) {
  list-style-image: url("chrome://messenger-newsblog/skin/icons/rss-feed.png");
  -moz-image-region: rect(0 16px 16px 0);
}

treechildren::-moz-tree-image(folderNameCol, serverType-rss, newMessages-true) {
  -moz-image-region: rect(16px 16px 32px 0);
}

/* Resets list-style-image for Feed Trash and Virtual folders */

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

/* ..... Inbox ..... */

.tabmail-tab[type="folder"][SpecialFolder="Inbox"] .tab-icon-image,
treechildren::-moz-tree-image(folderNameCol, specialFolder-Inbox) {
  -moz-image-region: rect(0 48px 16px 32px);
}

treechildren::-moz-tree-image(folderNameCol, specialFolder-Inbox, newMessages-true) {
  -moz-image-region: rect(16px 48px 32px 32px);
}

/* ..... Sent ..... */

.tabmail-tab[type="folder"][SpecialFolder="Sent"] .tab-icon-image,
treechildren::-moz-tree-image(folderNameCol, specialFolder-Sent) {
  -moz-image-region: rect(0 64px 16px 48px);
}

/* ..... Unsent ..... */

.tabmail-tab[type="folder"][SpecialFolder="Outbox"] .tab-icon-image,
treechildren::-moz-tree-image(folderNameCol, specialFolder-Outbox) {
  -moz-image-region: rect(0 80px 16px 64px);
}

/* ..... Drafts ..... */

.tabmail-tab[type="folder"][SpecialFolder="Drafts"] .tab-icon-image,
treechildren::-moz-tree-image(folderNameCol, specialFolder-Drafts) {
  -moz-image-region: rect(0 96px 16px 80px);
}

/* ..... Templates ..... */

.tabmail-tab[type="folder"][SpecialFolder="Templates"] .tab-icon-image,
treechildren::-moz-tree-image(folderNameCol, specialFolder-Templates) {
  -moz-image-region: rect(0 112px 16px 96px);
}

/* ..... Junk ..... */

.tabmail-tab[type="folder"][SpecialFolder="Junk"] .tab-icon-image,
treechildren::-moz-tree-image(folderNameCol, specialFolder-Junk) {
  -moz-image-region: rect(0 128px 16px 112px);
}

/* ..... Trash ..... */

.tabmail-tab[type="folder"][SpecialFolder="Trash"] .tab-icon-image,
treechildren::-moz-tree-image(folderNameCol, specialFolder-Trash) {
  -moz-image-region: rect(0 144px 16px 128px);
}

/* ..... Archives ..... */

.tabmail-tab[type="folder"][SpecialFolder="Archive"] .tab-icon-image,
treechildren::-moz-tree-image(folderNameCol, specialFolder-Archive) {
  -moz-image-region: rect(0 208px 16px 192px);
}

/* ..... Shared folders .....

treechildren::-moz-tree-image(folderNameCol, imapShared-true) {
  -moz-image-region: rect(0 192px 16px 176px);
}

*/ 

/* ..... Saved Search Folder ..... */

.tabmail-tab[type="folder"][SpecialFolder="Virtual"] .tab-icon-image,
treechildren::-moz-tree-image(folderNameCol, specialFolder-Virtual) {
  -moz-image-region: rect(0 176px 16px 160px);
}

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

/* ..... 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 {
  -moz-image-region: rect(0 32px 16px 16px);
}

/* ..... Local folders ..... */
.tabmail-tab[type="folder"][IsServer="true"][ServerType="none"] .tab-icon-image {
  -moz-image-region: rect(0 48px 16px 32px);
}

/* ..... News server ..... */
.tabmail-tab[type="folder"][IsServer="true"][ServerType="nntp"] .tab-icon-image {
  -moz-image-region: rect(0 64px 16px 48px);
}

/* ..... Secure news server ..... */
.tabmail-tab[type="folder"][IsServer="true"][ServerType="nntp"][IsSecure="true"] .tab-icon-image {
  -moz-image-region: rect(0 80px 16px 64px);
}

/* .....  Newsgroup .....  */
.tabmail-tab[type="folder"][ServerType="nntp"] .tab-icon-image {
  -moz-image-region: rect(0 160px 16px 144px);
}

treechildren::-moz-tree-image(folderNameCol, specialFolder-Virtual, newMessages-true) {
  -moz-image-region: rect(16px 176px 32px 160px);
}

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

/* ..... Mail server  ..... */

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

treechildren::-moz-tree-image(folderNameCol, biffState-NewMail, isServer-true) {
  -moz-image-region: rect(16px 16px 32px 0);
}

/* ..... Secure mail server ..... */

treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-pop3, isSecure-true),
treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-imap, isSecure-true) {
  -moz-image-region: rect(0 32px 16px 16px);
}

treechildren::-moz-tree-image(folderNameCol, biffState-NewMail, isServer-true, isSecure-true) {
  -moz-image-region: rect(16px 32px 32px 16px);
}

/* ..... Local folders ..... */

treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-none) {
  -moz-image-region: rect(0 48px 16px 32px);
}

treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-none, biffState-NewMail) {
  -moz-image-region: rect(16px 48px 32px 32px);
}

/* ..... News server ..... */

treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-nntp) {
  -moz-image-region: rect(0 64px 16px 48px) !important;
}

treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-nntp, isSecure-true) {
  -moz-image-region: rect(0 80px 16px 64px) !important;
}

/* ..... Feed server ..... */

.tabmail-tab[type="folder"][IsServer="true"][ServerType="rss"] .tab-icon-image,
treechildren::-moz-tree-image(folderNameCol, isServer-true, serverType-rss) {
  list-style-image: url("chrome://messenger-newsblog/skin/icons/server-rss.png");
  -moz-image-region: rect(0 16px 16px 0);
}

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

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

treechildren::-moz-tree-cell-text(folderNameCol, isServer-true),
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; 
}
