/**
 * BEGIN FLOCK GPL
 *
 * Copyright Flock Inc. 2005-2009
 * http://flock.com
 *
 * This file may be used under the terms of the
 * GNU General Public License Version 2 or later (the "GPL"),
 * http://www.gnu.org/licenses/gpl.html
 *
 * 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.
 *
 * END FLOCK GPL
 */

richtree {
  -moz-binding: url("chrome://flock/content/bindings/richtree.xml#richtree");
  -moz-appearance: none;
}

richtreeitem {
  -moz-binding: url("chrome://flock/content/bindings/richtree.xml#richtreeitem");
}

richtreefolder {
  -moz-binding: url("chrome://flock/content/bindings/richtree.xml#richtreefolder");
}

richtreefolder .folder-container {
  display: none;
  background: #ffffff;
}

richtree > vbox {
  background: transparent;
  margin: 0;
  padding: 0;
}

richtreefolder .folder-title-container {
  background-color: #f5f3ec;
  color: #2a2a2a;
  font-family: "Lucida Grande", Tahoma, Verdana, Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: bold;
  text-align: center;
  border-bottom: 1px solid #c0c0c0;
  margin: 0;
  min-height: 24px;
  line-height: 24px;
  padding: 1px 0 1px 0;
}

richtreefolder .folder-title-container:hover {
	background-color: #e7e5de;
}

/* remove border when two folders are adjacent */
richtreefolder + richtreefolder .folder-title-container {
  border-top-width: 0;
}

/* DS: XUL doesn't support the CSS3 pseudo class of :nth-child(2n+1)
 * let's take this to 5 levels of max depth for UX/visibility
 */
richtreefolder richtreeitem + richtreefolder {
  border-top-width: 1px;
}

/* root level 0 */
richtreefolder > richtreeitem {
  padding-left: 41px !important;
}

/* nested level 1 */
richtreefolder richtreefolder .sidebarfolder-twisty {
  padding-left: 19px;
}

richtreefolder richtreefolder richtreeitem {
  padding-left: 64px !important;
}

/* nested level 2 */
richtreefolder richtreefolder richtreefolder .sidebarfolder-twisty {
  padding-left: 38px;
}

richtreefolder richtreefolder richtreefolder richtreeitem {
  padding-left: 83px !important;
}

/* nested level 3 */
richtreefolder richtreefolder richtreefolder richtreefolder .sidebarfolder-twisty {
  padding-left: 58px;
}

richtreefolder richtreefolder richtreefolder richtreefolder richtreeitem {
  padding-left: 100px !important;
}

/* nested level 4 */
richtreefolder richtreefolder richtreefolder richtreefolder richtreefolder .sidebarfolder-twisty {
  padding-left: 80px;
}

richtreefolder richtreefolder richtreefolder richtreefolder richtreefolder richtreeitem {
  padding-left: 125px !important;
}

/* nested level 5 */
richtreefolder richtreefolder richtreefolder richtreefolder richtreefolder richtreefolder .sidebarfolder-twisty {
  padding-left: 101px;
}

richtreefolder richtreefolder richtreefolder richtreefolder richtreefolder richtreefolder richtreeitem {
  padding-left: 143px !important;
}

richtreefolder[open="true"] > vbox > .folder-container {
  display: -moz-box;
}

richtreefolder .sidebarfolder-twisty {
  list-style-image: url("chrome://flock/skin/bindings/twistyUp.png");
  margin: 0 3px 0 8px;
}

richtreefolder[open="true"] > vbox > .folder-title-container > .sidebarfolder-twisty {
  list-style-image: url("chrome://flock/skin/bindings/twistyDown.png");
  margin: 0 3px 0 8px;
}

richtreeitem {
  font-family: "Lucida Grande", Tahoma, Verdana, Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: normal;
  -moz-box-align: start;
  -moz-box-pack: start;
  background-color: #ffffff;
  border-bottom: 1px solid #cccccc;
  color: #2f64da;
  line-height: 24px;
  height: 24px !important;
  padding: 1px 0 1px 7px !important;
  margin: 0;
}

richtreeitem:hover,
richtreeitem[highlight="true"]:hover {
  background-color: #f2f2f2;
}

richtreeitem image {
  max-height: 16px !important;
  margin-top: 3px;
}

richtreeitem label {
  margin: 0 0 0 6px;
}

richtreeitem[selected="true"],
richtreeitem[selected="true"][highlight="true"],
richtreefolder[selected="true"] > vbox > .folder-title-container {
  background-color: #cde4fe;
}

richtreeitem[highlight="true"] {
  background-color: #fff9d7;
}

richtreeitem[dragging="true"] {
  opacity: 0.4;
}

richtreefolder[insertPos="before"] {
  border-top: 2px solid orange;
}

richtreefolder[insertPos="after"],
richtreeitem[insertPos="after"] {
  border-bottom: 2px solid orange;
}

richtreefolder[insertPos="on"] > vbox > .folder-title-container,
richtreeitem[insertPos="on"] {
  background-image: none;
  background: #6eb0f7;
}

richtreefolder[insertPos="on"][dragOver="true"] > richtreeitem {
  color: orange;
}

richtreefolder .icon {
%ifdef XP_UNIX
%ifdef XP_MACOSX
/* Mac */
  list-style-image: url("chrome://browser/skin/folder.png") !important;
%else
/* Linux */
  list-style-image: url("moz-icon://stock/gtk-directory?size=menu") !important;
%endif
%else
/* Windows */
  list-style-image: url("chrome://browser/skin/folder.png") !important;
%endif
  margin: 0 3px;
}

richtreeitem image.self-hosted-blog {
  -moz-image-region: rect(0px 466px 16px 450px); 
  list-style-image: url("chrome://flock/skin/toolbar/Toolbar-small.png");
}
