/* Favorites settings */
body.hideFavorites .zarafa-tree-ipm-subtree-favorites-container {
	display: none !important;	
}

/* Set the position to relative when scrollFavorites class is added AND when favorites is shown in an x-window */
body.scrollFavorites .zarafa-tree-ipm-subtree-favorites-container, .x-window .zarafa-tree-ipm-subtree-favorites-container {
	position: relative !important;
}

/* hierarchy toolbar (Show all folders panel) */
#zarafa-navigationpanel .zarafa-hierarchy-treepanel .zarafa-hierarchy-treepanel-tbar {
	
	.x-toolbar{
		/* Bottom has -1 pixel since we have a bottom-border of 1px */
		padding: ($toolbar-height - $font-default-line-height)/2 $padding-extra-large (($toolbar-height - $font-default-line-height)/2 - 1) $padding-extra-large;

		.x-form-check-wrap{

			input, label{
				line-height: $font-default-line-height;
				vertical-align: middle;
			}
		}

		.x-form-item {
			margin-bottom: 0;
		}
	}
}

/* Always show the favorites container when screen is at least 768 pixels height
Note: Does not work in IE11 */
@media (min-height: 768px) {

	.zarafa-tree-ipm-subtree-favorites-container {
		position: sticky;
		top: 0;
		background: $white;
		border-bottom: 1px solid $grey;
		z-index: 99;	
	}
}

.zarafa-tree-ipm-subtree-container, .zarafa-tree-ipm-subtree-favorites-container {
	padding: $padding-extra-large 0 $padding-medium;
}

.zarafa-tree-ipm-subtree-container:last-child, .zarafa-tree-ipm-subtree-favorites-container:last-child{
	padding-bottom: $padding-extra-large;
}

/* Fix for the background-color when the titles are longer than the width of the box */
.zarafa-hierarchy-treepanel .x-tree-root-ct{
	display: inline-block;
	min-width: 100%;
}

/* Override -- lines in hierarchytree */
.x-tree-lines .x-tree-elbow,
.x-tree-lines .x-tree-elbow-line,
.x-tree-lines .x-tree-elbow-end {
	background-image: none;
}

#zarafa-navigationpanel .zarafa-context-navigation-block:not(.fixed-bottombar) .zarafa-hierarchy-treepanel-body{
	height: auto !important;
}

.zarafa-hierarchy-treepanel-body {
	overflow: hidden !important;
}

.zarafa-hierarchy-treepanel-body:hover {
	overflow: auto !important;
}

.zarafa-hierarchy-treepanel-bottombar{
	border-top: 1px solid $grey;
	padding: 10px 0;

	table {
		padding-left: 12px;
		width: 100%;
		padding-right: 9px;

		.x-btn.zarafa-hierarchy-treepanel-footer-opensharedfolder {
			display: block;

			.x-btn-small {
				display: block;

				em, button {
					width: 100%;
				}
			}
		}
	}
}

.x-tree-node-el {
	line-height: 20px;

	a {
		margin-left: $padding-medium;
	}
}

.x-tree-node a span, .x-dd-drag-ghost a span{
	padding-left: 0;
}

.x-tree-node.zarafa-tree-root-container .x-tree-node-el{
	padding-left: $padding-extra-large - 3px;
}

/* Selection in tree */
.x-tree-node .zarafa-hierarchy-node.x-tree-selected {
	background-color: $grid-active-color;
}

.x-tree-node .x-tree-node-over {
	background-color: $grid-hover-color;
}

.zarafa-hierarchy-treepanel-tbar .x-form-display-field.x-form-item,
.x-form-field.zarafa-hierarchy-treepanel-showallfolders {
	padding: 0 0 0 0;
	margin: 0 0 0 0;
}

/* counters */
.zarafa-hierarchy-node-total-count span.zarafa-hierarchy-node-counter {
	color: $green-hover;
}
.zarafa-hierarchy-node-unread-count span.zarafa-hierarchy-node-counter {
	color: $kopano-blue;
}
.zarafa-hierarchy-node-owner {
  font-weight: normal;
  color: $grey6 !important;
}

.zarafa-tree-node.zarafa-hierarchy-node-withcounter {
	font-weight: bold;
}

/* make the whole hierarchy tree entry's look clickable */
.x-tree-node-el {
	span, img, a {
		cursor: pointer;
	}
  svg {
    rect, path, g {
      cursor: pointer;
    }
  }
}

/* Margin for checkbox next to calendar icon  */
.zarafa-hierarchy-node-cb {
	margin-right: 6px;
}
