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

/* this needs a different rule from the tree because otherwise the margin
   applies to the tab */
.tabmail-tab[type="folder"] {
  list-style-image: url("moz-icon://stock/gtk-directory?size=menu");
}

treechildren::-moz-tree-image(folderNameCol) {
  list-style-image: url("moz-icon://stock/gtk-directory?size=menu");
  -moz-margin-end: 2px;
}

treechildren::-moz-tree-image(folderNameCol, newMessages-true) {
  list-style-image: url("moz-icon://stock/gtk-directory?size=menu");
}

treechildren::-moz-tree-image(folderNameCol, serverType-rss, newMessages-true) {
  list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
  -moz-image-region: rect(112px 16px 128px 0px);
}

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

.tabmail-tab[type="folder"][SpecialFolder="Inbox"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Inbox) {
  list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
  -moz-image-region: rect(64px 16px 80px 0px);
}

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

.tabmail-tab[type="folder"][SpecialFolder="Sent"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Sent) {
  list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
  -moz-image-region: rect(144px 16px 160px 0px);
}

/* ..... Outbox ..... */

.tabmail-tab[type="folder"][SpecialFolder="Outbox"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Outbox) {
  list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
  -moz-image-region: rect(96px 16px 112px 0px);
}

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

.tabmail-tab[type="folder"][SpecialFolder="Drafts"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Drafts) {
  list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
  -moz-image-region: rect(48px 16px 64px 0px);
}

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

.tabmail-tab[type="folder"][SpecialFolder="Templates"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Templates) {
  list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
  -moz-image-region: rect(160px 16px 176px 0px);
}

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

.tabmail-tab[type="folder"][SpecialFolder="Junk"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Junk) {
  list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
  -moz-image-region: rect(80px 16px 96px 0px);
}

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

.tabmail-tab[type="folder"][SpecialFolder="Trash"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Trash) {
  list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
  -moz-image-region: rect(176px 16px 192px 0px) !important;
}

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

.tabmail-tab[type="folder"][SpecialFolder="Archive"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Archive) {
  list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
  -moz-image-region: rect(192px 16px 208px 0px);
}

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

.tabmail-tab[type="folder"][SpecialFolder="Virtual"],
treechildren::-moz-tree-image(folderNameCol, specialFolder-Virtual) {
  list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
  -moz-image-region: rect(128px 16px 144px 0px) !important;
}

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

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

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

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

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

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

/* ..... Local folders ..... */
.tabmail-tab[type="folder"][IsServer="true"][ServerType="none"] {
  list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
  -moz-image-region: rect(0px 16px 16px 0px);
}

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

/* ..... Secure news server ..... */
.tabmail-tab[type="folder"][IsServer="true"][ServerType="nntp"][IsSecure="true"] {
  list-style-image: url("chrome://messenger/skin/icons/server.png");
  -moz-image-region: rect(0px 64px 16px 80px);
}

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/folder-pane.png");
  -moz-image-region: rect(16px 32px 32px 16px);
}

/* ..... 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) {
  list-style-image: url("chrome://messenger/skin/icons/folder-pane.png");
  -moz-image-region: rect(16px 16px 32px 0px);
}

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

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

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

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

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

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

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

/* ::::: 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: GrayText;
  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: GrayText;
}

/* Make sidebar look normal. */

treechildren::-moz-tree-twisty {
  -moz-appearance: treetwisty;
  margin-right: 3px;
}

treechildren::-moz-tree-twisty(open) {
  -moz-appearance: treetwistyopen;
}

treechildren::-moz-tree-cell-text(folderNameCol, newMessages-true) {
  font-weight: bold;
  margin-left: -16px;
  padding-left: 16px;
  background-image: url("chrome://messenger/skin/icons/folder-new-star.png");
  background-repeat: no-repeat;
  background-position: left;
}
