#header{
	min-width: @header-min-width;
	#login{
		font-family: @header-menu-font;
		.bg(@header-login-bgImage, no-repeat, @header-login-bgColor, @header-login-bgX, @header-login-bgY);
		.height(@header-login-height);
		.fontSize(@header-login-fontSize);
		>div{
			float: @header-login-float;
			padding: @header-login-padding;
			.height(@header-login-height);
			.welcomeMessage, .userData, .dropdownmenu{
				float: @header-login-blocks-float;
				display: @header-login-blocks-display;
				height: @header-login-blocks-height;
				line-height: @header-login-blocks-height;
				color: @header-login-blocks-textColor;
				width: auto;
				.boxSizing();
			}
			.welcomeMessage{
				margin: @header-login-welcomeMessage-margin;
			}
			.userData{
				.userAvatar{
					border: @header-login-avatar-border;
					margin: @header-login-avatar-margin;
					vertical-align: middle;
				}
				.iconMixin(userAvatar);
			}
			.dropdownmenu{
				//padding: @header-login-profileLabel-padding;
				.menuitem_userName{
					>a{
						color: @header-login-settings-link-textColor;
						padding: @header-login-welcomeMessage-margin;
					}
				}
				.menuitem_userName.downArrow{
					>a{
						.bg(@header-login-profileLink-bg, no-repeat, transparent, right, center);
						padding: @header-login-profileLink-padding;
						margin:  @header-login-profileLink-margin;
						color: @header-login-settings-link-textColor;
						display: block;
    					max-width: @header-login-usernameLink-maxWidth;
    					overflow: hidden;
    					text-overflow: ellipsis;
    					
					}
				}
				.menuitem_profile{
					>a{
						.bg(@header-login-profileLink-bg, no-repeat, transparent, right, center);
						color: @header-login-profileLink-textColor;
						padding: @header-login-profileLink-padding;
						margin:  @header-login-profileLink-margin;
					}
				}
				.menuitem_options{
					line-height: auto;
					position: relative;
					&:before{
						content: "";
						width: @header-login-settings-borderLeftWidth;
						border-left: @header-login-settings-borderLeft;
						position: absolute;
						top: (@header-login-height - @header-login-settings-borderHeight) /2;
						left: 0;
						display: block;
						height: @header-login-settings-borderHeight;
					}
					padding: @header-login-settings-padding;
					>a{
						color: @header-login-settings-link-textColor;
					}
				}
				
				> li{
					.pointerAsLink();
					>a{
						height: @header-login-height;
						display: block;
					}
					> ul{// the menu list
						background: @header-login-dropdown-background;
						line-height: 1;
						height: auto;
						border: @header-login-dropdown-border;
						border-top: 0;
						>li{
							a{
								color: @header-submenu-link-textColor;
								white-space : nowrap;
								display: block;
								padding: @header-login-dropdown-link-padding;
								&:hover{
									background: @header-submenu-linkHover-bgColor;
									color: @header-submenu-linkHover-textColor;
								}
							}
						}
					}
				}
				
			}
		}
	}
	//-------------------------------------------------------------------------
	// main menu
	//-------------------------------------------------------------------------
	#menu{
		a{
			white-space : nowrap;
		}
	
		>div >ul.dropdownmenu.notCustom >li{
			 &.current, &.current:hover {
				a{
					&.tasklistinguser {
						.bg(@header-menu-link-tasksSelected-bg, no-repeat, @header-menu-link-bgColor, @header-menu-link-bgX, @header-menu-link-bgY);
					}
					&.caselistinguser {
						.bg(@header-menu-link-casesSelected-bg, no-repeat, @header-menu-link-bgColor, @header-menu-link-bgX, @header-menu-link-bgY);
					}
					&.processlistinguser {
						.bg(@header-menu-link-appsSelected-bg, no-repeat, @header-menu-link-bgColor, @header-menu-link-bgX, @header-menu-link-bgY);
					}
				}
			}
			a{
				&.tasklistinguser {
					.bg(@header-menu-link-tasks-bg, no-repeat, @header-menu-link-bgColor, @header-menu-link-bgX, @header-menu-link-bgY);
				}
				&.caselistinguser {
					.bg(@header-menu-link-cases-bg, no-repeat, @header-menu-link-bgColor, @header-menu-link-bgX, @header-menu-link-bgY);
				}
				&.processlistinguser {
					.bg(@header-menu-link-apps-bg, no-repeat, @header-menu-link-bgColor, @header-menu-link-bgX, @header-menu-link-bgY);
				}
			}
		}
	}
	
	
	#menu{
		font-family: @header-menu-font;
		.fontSize(@header-menu-fontSize);
		.height(@header-menu-height);
		position: relative; // CSSPIE z-index fix
		background: @header-menu-gradientColor1;
		div{
			width: 100%;
			.boxSizing();
			.height(@header-menu-height);
		}
		>div{
			.clearFix();
			padding: @header-menu-margin;
			>ul.dropdownmenu{
				margin: 0;
				float: left;
				>li{
					&.dropdownitem > a {
						line-height: 1; //TODO check this rule
						.bg("arrow-down-white.png", no-repeat, transparent, right, center);
						margin:  @header-login-profileLink-margin;
					}
					&.dropdownitem.current > a {
						line-height:1; //TODO check this rule
						.bg("arrow-down.png", no-repeat, transparent, right, center);
						margin:  @header-login-profileLink-margin;
					}
					// current item
					&.current, &.current:hover{
						.pointerAsLink();
						.bg(@header-menu-li-selected-bgImg, @header-menu-li-selected-bgRepeat, @header-menu-li-selected-bgColor, @header-menu-li-selected-bgX, @header-menu-li-selected-bgY);
						&:before, &:after{
							display:none;
						}
						a{
							border: none;
							color: @header-menu-link-textColorHover;
							border: none !important;
							&:after, &:before{
								display: none;
							}
						}
						ul{
							background: @header-submenuCurrent-bgColor !important;
							li{
								a:hover{
									background: @header-submenu-linkHover-bgColor;
									color: @header-submenu-linkHover-textColor;
								}
							}
						}
					}
					&:hover{
						background-color: @header-menu-gradientColor1Hover;
					}
					float: left;
					position: relative;
					.boxSizing();
					height: @header-menu-height ;
					min-width: @header-menu-li-width;
					padding: @header-menu-li-padding;

					&:before{
						left: 0;
						top: @header-menu-link-paddingY;
						position: absolute;
						height: @header-menu-link-fontSizePx;
						border-left: @header-menu-link-borderLeft;
						content: "";
						width: 0;
						display: block;
					}
					&:first-child:before{
						border-right: @header-menu-link-borderLeft;
						border-left: @header-menu-link-borderRight;
					}
					&:last-child:after{
						border-right: @header-menu-link-borderLeft;
						border-left: @header-menu-link-borderRight;
					}
					&:after{
						right: 0;
						top: @header-menu-link-paddingY;
						position: absolute;
						height: @header-menu-link-fontSizePx;
						content: "";
						display: block;
						width: 0;
						border-right: @header-menu-link-borderRight;
					}
					a{
						line-height: 1; //TODO check this rule
						display: block;
						font-weight: @header-menu-link-fontWeight;
						.boxSizing();
						color: @header-menu-link-textColor;
						text-align: @header-menu-link-textAlign;
						padding: @header-menu-link-padding;
					}
					ul{
						margin-top: @header-menu-submenu-marginTop;
						background: @header-submenu-bgColor;
						border: @header-menu-dropdown-border;
						border-top: none;
						z-index: @zIndex-dropdownHeader !important;
						a{
							border: none;
							padding: @header-submenu-link-padding;
							&:hover{
								background: @header-submenu-linkHover-bgColor;
								color: @header-submenu-linkHover-textColor;
							}
							&:before, &:after{
								border: none;
							}
						}
						li, a{
                            .fontSize(@header-menu-submenu-fontSize);
							color: @header-submenu-link-textColor;
							text-align: left;
							&:after, &:before{
								border: none !important;
								display: none;
							}
						}
					}
				}
			}
		}
	}
}
