@import "../../../variables.less";
@import "../../../mixins.less";

.uiSpaceMenu {
	border-bottom: 1px solid @borderColor;
	#gradient > .vertical(@primaryBackgroundLight, @primaryBackgroundHover);
	.box-shadow(inset);

	.spaceMenuTab {
		height: 90px;
		border-bottom: none;

		> li {
			padding-bottom: 4px;
			+ li {
				margin-left:  -1px;
			}
		}

		> .active {
			background: url("@{images-path}/social/skin/SpaceMenuPortlet/arrowIcon.png") no-repeat bottom center;	
		}

		> li > a,
		> li > a:hover,
		> .active > a,
		> .active > a:hover {
			text-align: center;
			border:none;
			background: none;
			height: 51px;
			min-width: 45px;
			margin: 10px 20px;
			.border-radius(5px);
		}

		> .active > a {
			#gradient > .vertical(@baseColorLight, @baseColorMedium);
			.box-shadow(1px 0 4px rgba(0,0,0,0.38) inset);
		}

		> li > a:hover,
		> .active > a:hover ,
		> li.dropdown.open > a:hover,
		> li.dropdown.open > a:focus{
			#gradient > .vertical(rgba(153,153,153,0.2),rgba(130,130,130,0.2));
			.box-shadow(0 0 4px rgba(0,0,0,0.36) inset);
		}

		> li > a > img {
			.size(31px,31px);
		}

		> li > a > span {
			display: block;
			color: @textColor;
		}

		> .active > a > span {
			color: @baseBackground;
			text-shadow: none;
		}

		> .dropdown > a > b {
			border: 2px dashed @borderColor;
			color: @textColor;
			display: block;
			font-size: 20px;
			font-weight: 100;
			padding: 3px 8px;
		}
	  	// Aligning Apps Icons in "More" menu
	  	li.dropdown.open ul.dropdown-menu li.item a span {
		  	position: relative;
		  	bottom: 8px;
		}
		> li > a .tabName,
		> li > a > span {
      font-size: 13px;
    }
	}

	.nodeIconBg {
	  display: block;
	  float: left;
	  width: 39px;
	  background-position:center;
	}

  .userAvt {
    position: relative;

    .dropdown-toggle {
      position: absolute;
      top: 49px;
      left: 15px;
      display: inline-block;
      width: 110px;
      height: 111px;
    }
    .dropdown-menu {
      left: 14px;
      min-width: 110px;    
    }
    [class^="uiIcon"] {
        border: 1px solid #fff;
        color: #fff;
        padding: 3px;
        border-radius: 20px;
        display: none;
        font-size: 18px;
        background-color: rgba(0, 0, 0, 0.2);
    }
    a:hover .uiIconCamera {
      display: inline;
      cursor: pointer;
    }
    .uiIconCamera {
      top: 67%;
      left: 65%;
    }
    img {
      width: 100px;
      height: 100px;
      margin-left: 15px;
      margin-top: 50px;
      border: 5px solid #ffffff;
      .border-radius(5px 5px 5px 5px);
      .box-shadow(0px 2px 4px rgba(0, 0, 0, 0.17));
    }
  }

  .spaceMenuNavHeader {
    padding-top: 50px;
    padding-bottom: 40px;
    background: url(/eXoSkin/skin/images/themes/default/social/skin/SpaceMenuPortlet/menuBg.png) no-repeat 90% center, -moz-linear-gradient(0deg,#99a1b6 0,#8c94a7 100%);
    background: url(/eXoSkin/skin/images/themes/default/social/skin/SpaceMenuPortlet/menuBg.png) no-repeat 90% center, -webkit-linear-gradient(0deg,#99a1b6 0,#8c94a7 100%);;
    background: url(/eXoSkin/skin/images/themes/default/social/skin/SpaceMenuPortlet/menuBg.png) no-repeat 90% center, -ms-linear-gradient(0deg,#99a1b6 0,#8c94a7 100%);;

    .bannerControls {
        position: relative;
        display: none;
        cursor: pointer;
        float: right;
        text-align: right;
        margin: -45px 5px 0;

        .dropdown-menu {
          position: relative;
          float: none;
          min-width: 110px;
          text-align: left;
        }

        a [class^="uiIcon"] {
            border: 1px solid #fff;
            color: #fff;
            padding: 5px;
            .border-radius(50%);
            font-size: 18px;
            background-color: rgba(0, 0, 0, 0.2);
            width: 30px;
            height: 30px;
            box-sizing: border-box;
            text-align: center;
        }
    }

    &:hover .bannerControls {
      display: inline-block;
    }

    h3 {
      color: #ffffff;
      margin-top: 0px;
      font-weight: bold;
      margin-left: 140px;
      text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.5);
    }
    .spaceMenuApps {
      display: inline-flex;
      margin-left: 15px;
      min-width: 200px;
      .btn {
        color: @btnColor;
        > i {
          color: inherit;
        }
      }
      > li {
        display: inline-flex;
        margin-left: 15px;
      }
      > li:first-child {
        margin-left: 0px;
      }
    }
  }

  .uiBannerUploader {
    display: none;
  }

  .nav {
    margin-bottom: 0px;
    [class^="uiIconApp"] {
      font-size: 25px;
    }
  }
}


.sticky {
  .uiSpaceMenu {
    position: fixed;
    z-index: 4;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
    top: 42px;
    left: 250px;
    right: 0px;

    .spaceMenuNavHeader {
      float: left;
      background: transparent !important;
      padding-top: 30px;
      padding-bottom: inherit;

      > .bannerControls {
        display: none;
      }

      h3 {
        float: left;
        font-size: 20px;
        color: black;
        vertical-align: middle;
        display: inline-block;
        margin-left: 13px;
        margin-top: auto;
        margin-bottom: auto;
        text-shadow: none;
      }

      .spaceMenuApps {
        [class^="uiIcon"] {
          margin-right: 0px;
        }
        .btn {
          color: #999999;
          padding: 4px 13px;
          span {
            display: none;
          }
        }
        > li {
          margin-left: 10px;
        }
      }
    }

    .spaceMenuTab {
      [class^="uiIcon"] {
        font-size: 26px;
      }
    }
  }
}


@media (min-width: 1025px) {
  .collapse-left-bar .sticky .uiSpaceMenu {
    left: 65px;
  }
  .sticky {
    .uiSpaceMenu {
      .userAvt {
        background-color: #f9f9f9;
        background-image: -moz-linear-gradient(top, #ffffff, #f0f0f0);
        background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f0f0f0));
        background-image: -webkit-linear-gradient(top, #ffffff, #f0f0f0);
        background-image: -o-linear-gradient(top, #ffffff, #f0f0f0);
        background-image: linear-gradient(to bottom, #ffffff, #f0f0f0);
        background-repeat: repeat-x;
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff0f0f0', GradientType=0);
        width: 41px;
        height: 41px;
        -webkit-border-radius: 100px;
        -moz-border-radius: 100px;
        border-radius: 100px;
        -webkit-box-shadow: 0px 2px 4px rgba(13, 13, 13, 0.27);
        -moz-box-shadow: 0px 2px 4px rgba(13, 13, 13, 0.27);
        box-shadow: 0px 2px 4px rgba(13, 13, 13, 0.27);
        border: 1px solid #b1b1b1;
        padding: 0px;
        position: relative;
        text-align: center;
        line-height: 37px;
        margin-left: 20px;
        margin-top: 21px;

        a {
          display: none;
        }

        img {
          max-height: 40px;
          max-width: 40px;
          margin: 0;
          padding: 0;
          border-radius: 50%;
          display: inline;
          -webkit-border-radius: 100px;
          -moz-border-radius: 100px;
          border-radius: 100px;
          border: 1px solid #ffffff;
        }
      }

      .spaceMenuNavHeader {
        .spaceMenuApps {
          margin-left: auto;
        }
      }

      .spaceMenuTab {
        > li > a,
        > li > a:hover,
        > .active > a,
        > .active > a:hover {
          margin: 10px 16px;
          padding-right: 10px;
          padding-left: 10px;
          min-width: 39px;
        }
      }
    }
    #Application {
      margin-top: 50px;
    }
    &#RightBody {
      padding-top: 191px;
    }
  }
}

@media (max-width: 1024px) {
  .sticky {
    .uiSpaceMenu {
      left: 0px;
      right: 0px;

      .userAvt {
        margin-left: 20px;
        margin-top: 12px;
      }
      .spaceMenuNavHeader {
        padding-top: 20px;
        h3 {
          width: 120px;
        }
        .spaceMenuApps {
          margin-left: auto;
          min-width: 150px;
        }
      }
      nav {
        float: left;
        width: 100%;
      }
    }
    #Application {
      margin-top: 250px;
    }
  }
  .uiSpaceMenu {
    .spaceMenuTab {
      height: 40px;
      display: block;
      white-space: nowrap;
      overflow-x: auto;
      overflow-y: hidden;
      -webkit-overflow-scrolling: touch;
      -ms-overflow-style: -ms-autohiding-scrollbar;

      > .active {
        background: none;
      }
      > li > a, > li > a:hover,
      > .active > a, > .active > a:hover {
        background-color: inherit;
        background-image: none;
        filter: none;
        box-shadow: none;
        height: auto;
        margin: auto;
      }
      > .active > a span {
        color: #2f5e92;
        font-weight: bold;
      }
      > li {
        float: none;
        display: inline-block;
        &.active > a {
          border-bottom: 3px solid #2f5e92;
          border-radius: 0px;
          padding-bottom: 5px;
        }
        i {
          display: none;
        }
        > a > .tabName {
          margin: 4px 4px 0;
        }
      }
    }

    .spaceMenuNavHeader {
      h3, .spaceMenuApps {
        margin-left: 74px;
      }
      h3 {
        margin-top: 4px;
        margin-bottom: 7px;
      }
      .bannerControls {
        margin-top: -35px;
      }
    }
    .spaceMenuNavHeader .spaceMenuApps .btn {
      padding: 5px 10px;

      i {
        margin-right: 2px;
      }
      span {
        display: none;
      }
    }

    .userAvt {
      background-color: #f9f9f9;
      background-image: -moz-linear-gradient(top, #ffffff, #f0f0f0);
      background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f0f0f0));
      background-image: -webkit-linear-gradient(top, #ffffff, #f0f0f0);
      background-image: -o-linear-gradient(top, #ffffff, #f0f0f0);
      background-image: linear-gradient(to bottom, #ffffff, #f0f0f0);
      background-repeat: repeat-x;
      filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff0f0f0', GradientType=0);
      width: 41px;
      height: 41px;
      -webkit-border-radius: 100px;
      -moz-border-radius: 100px;
      border-radius: 100px;
      -webkit-box-shadow: 0px 2px 4px rgba(13, 13, 13, 0.27);
      -moz-box-shadow: 0px 2px 4px rgba(13, 13, 13, 0.27);
      box-shadow: 0px 2px 4px rgba(13, 13, 13, 0.27);
      border: 1px solid #b1b1b1;
      padding: 0px;
      position: relative;
      text-align: center;
      line-height: 37px;
      margin-left: 21px;
      margin-top: 43px;

      a.dropdown-toggle {
        display: none!important;
      }
      img {
        max-height: 40px;
        max-width: 40px;
        margin: 0;
        padding: 0;
        border-radius: 50%;
        display: inline;
        -webkit-border-radius: 100px;
        -moz-border-radius: 100px;
        border-radius: 100px;
        border: 1px solid #ffffff;
      }
    }
  }
}
@media (min-width: 768px) and (max-width: 1024px) {
    .sticky .uiSpaceMenu {
      top: 52px;
    }
}
@media (max-width: 480px) {
  .uiSpaceMenu {
    .userAvt {
      margin-left: 15px;
    }
    .spaceMenuNavHeader {
      h3 {
        text-overflow: ellipsis;
        width: 200px;
        white-space: nowrap;
        overflow: hidden;
        margin-left: 67px;
      }
      .spaceMenuApps {
        margin-left: 67px;
      }
      .bannerControls {
        margin-top: -40px;
      }
    }
  }
}
@media (max-width: 320px) {
  .sticky {
    .uiSpaceMenu {
      .spaceMenuNavHeader {
        h3 {
          width: 100px;
        }
        .spaceMenuApps {
          margin-left: auto;
          min-width: 140px;
        }
      }
    }
  }
}
