/* Sidebars */

.sidebar-placesTree {
  border-top: none !important;
}

#sidebar tree,
#sidebar page {
  background-color: transparent !important;
  -moz-appearance: none !important;
  border: none !important;
}

#bookmarksPanel, 
#history-panel,
#bookmarksPanel > hbox,
#history-panel > hbox {
  -moz-appearance: none !important;
  background-color: transparent !important;
  border-top: none !important;
}

tree.sidebar-placesTree,
tree.sidebar-placesTree treechildren::-moz-tree-row {
  background-color: transparent;
  border-color: transparent;
  padding-bottom: 1px;
  -moz-appearance: none;
  margin: 0;
  border: none;
}

#bookmarks-view treechildren::-moz-tree-row(selected), 
#historyTree treechildren::-moz-tree-row(selected) {  
  background-color: #6f81a9;
  background-image: url("chrome://browser/skin/places/selected-gradient.png");
  background-repeat: repeat-x;
  background-position: bottom left;
  border-top: 1px solid #979797;
}

tree.sidebar-placesTree treechildren::-moz-tree-separator {
  border-top: 1px solid #505d6d;
  margin: 0 10px;
}

#bookmarks-view treechildren::-moz-tree-row(selected,focus),
#historyTree treechildren::-moz-tree-row(selected,focus) {  
  background-image: url("chrome://browser/skin/places/selected-focused-gradient.png");
  background-color: #8a8a8a !important;
  border-top: 1px solid #91a0c0;
}

tree.sidebar-placesTree treechildren::-moz-tree-cell-text(selected) {  
  font-weight: bold !important;
  color: #ffffff !important;
}

#bookmarksPanel > hbox > label,
#history-panel > hbox > label {
  display: none;
}

#viewButton {
  -moz-appearance: none;
  border: 1px solid #7F7F7F;
  -moz-border-radius: 10px;
  background: url("chrome://global/skin/icons/white-gray-gradient.gif") #A09E9D repeat-x top center;
  min-width: 0px;
  min-height: 0px;
  -moz-padding-start: 5px;
  -moz-padding-end: 0px;
  padding-top: 1px;
  padding-bottom: 1px;
}

#viewButton .button-menu-dropmarker {
  list-style-image: url("chrome://global/skin/icons/menulist-dropmarker.png");
}

#viewButton:focus {
  outline: 2px solid #4A8BC7;
  outline-offset: -2px;
  -moz-outline-radius: 10px;
}

page > hbox {
  margin: 0 4px 6px 4px;
}

/* Trees */

treechildren::-moz-tree-image(title) {
  list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
  -moz-padding-end: 2px;
  margin: 0px 2px;
  width: 16px;
  height: 16px;
}

treechildren::-moz-tree-image(title, livemarkItem) {
  list-style-image: url("chrome://browser/skin/places/livemarkItem.png");
}

treechildren::-moz-tree-image(title, container),
treechildren::-moz-tree-image(title, open) {
  list-style-image: url("chrome://global/skin/tree/folder.png");
  -moz-image-region: rect(0, 16px, 16px, 0);
}

treechildren::-moz-tree-image(title, separator) {
  list-style-image: none;
  width: 0 !important;
  height: 0 !important;
  margin: 0;
}

treechildren::-moz-tree-row(session-start) {
  border-top:1px dotted ThreeDShadow;
}

treechildren::-moz-tree-image(container, OrganizerQuery_AllBookmarks) {
  list-style-image: url("chrome://browser/skin/places/allBookmarks.png");
}

treechildren::-moz-tree-image(container, livemark) {
  list-style-image: url("chrome://browser/skin/page-livemarks.png");
}

treechildren::-moz-tree-image(container, OrganizerQuery_BookmarksToolbar) {
  list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png");
}

treechildren::-moz-tree-image(container, OrganizerQuery_BookmarksMenu) {
  list-style-image: url("chrome://browser/skin/places/bookmarksMenu.png");
}

treechildren::-moz-tree-image(container, OrganizerQuery_UnfiledBookmarks) {
  list-style-image: url("chrome://browser/skin/places/unfiledBookmarks.png");
}

/* query-nodes should be styled even if they're not expandable */
treechildren::-moz-tree-image(query) {
  list-style-image: url("chrome://browser/skin/places/query.png");
}

treechildren::-moz-tree-image(title, query, tagContainer),
treechildren::-moz-tree-image(container, OrganizerQuery_Tags) {
  list-style-image: url("chrome://mozapps/skin/places/tagContainerIcon.png");
}

/* calendar icon for folders grouping items by date */
treechildren::-moz-tree-image(title, query, dayContainer) {
  list-style-image: url("chrome://browser/skin/places/history.png");
}

treechildren::-moz-tree-image(title, query, hostContainer) {
  list-style-image: url("chrome://global/skin/tree/folder.png");
}

treechildren::-moz-tree-image(title, query, hostContainer, open) {
  list-style-image: url("chrome://global/skin/tree/folder.png");
}

treechildren::-moz-tree-image(query, OrganizerQuery_History) {
  list-style-image: url("chrome://browser/skin/places/history.png");
}

/* We want some queries to look like ordinary folders. This must come
   after the (title, query) selector, or it would get overridden. */
treechildren::-moz-tree-image(title, query, folder),
treechildren::-moz-tree-image(title, query, folder, open) {
  list-style-image: url("chrome://global/skin/tree/folder.png");
  -moz-image-region: rect(0, 16px, 16px, 0);
}

/* FIXME this should make the date field invisible, but only does it for
         unselected items and maybe won't work for different color schemes. */
treechildren::-moz-tree-cell-text(date, session-continue) {
  color:white;
}

treechildren::-moz-tree-cell-text(title, separator) {
  color: ThreeDShadow;
  margin: 0px 5px;
}

treechildren::-moz-tree-cell-text(title, separator, selected, focus) {
  color: HighlightText;
}

treechildren::-moz-tree-twisty(title, separator) {
  -moz-appearance: none;
  padding: 0px;
}
