@import "../../../css/partials/base";

#apploader {
	width: 100%;
	height: 100%;
}

#apploader > div {
	height: 100%;
	padding: 0 35px;
}

/************************************************************/
/*********************** common style ***********************/
/************************************************************/

#apploader .left-div > div:first-child,
#apploader .right-div > h3 {
	margin-top: 35px;
}

#apploader .left-div > div:last-child,
#apploader .right-div > div:last-child {
	margin-bottom: 35px;
}

#apploader .app-element {
	display: inline-block;
	width: 176px;
	height: 134px;
	padding-top: 42px;
	text-align: center;

	cursor: move; /* fallback if grab cursor is unsupported */
	cursor: grab;
	cursor: -moz-grab;
	cursor: -webkit-grab;
}
#apploader .app-element .app-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 15px;
	background: url('static/images/default_icon.png') no-repeat center;
	background-size: contain;
	border-radius: 14px;
	transition: transform .15s ease-in, box-shadow .062s ease-in;
}

#apploader .app-element:hover .app-icon {
	box-shadow: 0 0 20px 0 rgba(0,0,0,0.2),0 5px 5px 0 rgba(0,0,0,0.24);
	transform: scale(1.15);
}

#apploader .app-element .app-name {
	overflow: hidden;
	max-width: 156px;
	max-height: 40px;
	margin: 0 auto;
}

/************************************************************/
/************************* .left-div ************************/
/************************************************************/

#apploader .left-div {
	float: left;
	width: 210px;
	background-color: #202029;
}

#apploader .left-div > div:not(:first-child) {
	margin-top: 30px;
	padding-top: 30px;
	border-top: 1px solid #404049;
}

#apploader .left-div h4 {
	font-size: 14px;
	font-weight: 400;
	margin-top: 0;
	text-transform: uppercase;
	color: #e0e0e9;
	letter-spacing: .04em;
}

#apploader .left-div p {
	margin-bottom: 0;
	color: #808089;
}

#apploader .default-app .app-container:not(.no-app):hover {
	cursor: pointer;
	border-color: $primary-color;
}

#apploader .default-app > div:not(:last-child) {
	margin-bottom: 30px;
}

#apploader .app-container {
	overflow: hidden;
	width: 176px;
	height: 176px;
	padding: 16px;
	border: 1px solid #404049;
	background-color: #303039;
}

#apploader .app-container.dragging {
	border-color: $primary-color;
}

#apploader .left-div .app-name {
	text-align: center;
	color: #e0e0c9;
}

#apploader .left-div .search-box {
	position: relative;
}

#apploader .left-div .search-query {
	width: 167px;
	margin: 0;
	padding: 7px 8px 9px 34px;
	color: #fff;
	border: 1px solid #404049;
	border-radius: 0;
	background-color: #303039;
	box-shadow: none;
}

#apploader .left-div .search-box i {
	position: absolute;
	top: 5px;
	left: 1px;
}

#apploader .left-div .search-query:focus {
	color: $primary-color;
	border-color: $primary-color;
}

#apploader .left-div .search-query:focus + i {
	color: $primary-color;
}

#apploader .app-description {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	height: 110px;
}

#apploader .app-description h4 {
	display: flex;
	align-items: center;
	max-width: 100%;
	max-height: 20px;

	.title {
		overflow-x: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	i {
		display: none;
		margin-left: 10px;
		color: $primary-color;
	}

	&.is-link {
		i {
			display: inherit;
		}
	}
}

#apploader .app-description p {
	overflow: hidden;
	max-height: 80px;
}


#apploader #launch_appstore {
	font-size: 18px;
	position: relative;
	width: 210px;
	margin: 0;
	padding: 26px 18px 25px 73px;
	text-align: left;
	color: #fff;
	border: none;
	background-color: $primary-color;
	box-shadow: none;
}


#apploader #launch_appstore i {
	font-size: 31px;
	position: absolute;
	top: 21px;
	left: 21px;
}

/************************************************************/
/************************ .right-div ************************/
/************************************************************/

#apploader .right-div {
	position: relative;
	overflow: auto;
	margin-left: 280px;
	color: #e0e0e9;
	background-color: #303039;
}

#apploader #close_app {
	font-size: 27px;
	position: absolute;
	top: 8px;
	right: 12px;
	color: #606069;
}

#apploader #close_app:hover {
	cursor: pointer;
	color: #fff;
}

#apploader .right-div h3 {
	font-weight: 400;
	margin-bottom: 97px;
	text-align: center;
}

#apploader .app-list {
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 35px;
}

#apploader .right-div .app-element:active {
	background-color: inherit;
}

#apploader .app-element.ui-sortable-helper {
	cursor: grabbing;
	cursor: -moz-grabbing;
	cursor: -webkit-grabbing;
}

#apploader .right-div .app-element.ui-sortable-placeholder {
	display: none;
}

/************************************************************/
/*********************** media queries **********************/
/************************************************************/

@media (max-height: 771px) {
	#apploader .left-div > div:not(:first-child) {
		margin-top: 15px;
		margin-bottom: 15px;
		padding-top: 15px;
	}
	#apploader .default-app > div:not(:last-child) {
		margin-bottom: 15px;
	}
	#apploader .right-div h3 {
		margin-bottom: 82px;
	}
}

@media (max-height: 661px) {
	#apploader .left-div .app-description {
		margin-top: 0 !important;
		border-top: 0 !important;
	}
	#apploader .app-store {
		margin-top: 0 !important;
		padding-top: 0 !important;
		border-top: 0 !important;
	}
	#apploader #launch_appstore {
		padding: 15px 0;
		text-align: center;
	}
	#apploader #launch_appstore i {
		display: none;
	}
	#apploader .right-div h3 {
		margin-bottom: 0;
	}
}

@media (max-height: 607px) {
	#apploader .left-div {
		overflow-y: auto;
		padding-left: 15px;
	}
	#apploader .right-div {
		margin-left: 260px;
	}
	#apploader .left-div .default-app,
	#apploader .right-div h3 {
		margin-top: 15px !important;
	}
}

/************************************************************/
/*********************** App List ***************************/
/************************************************************/

/* CREDIT: Andor Nagy */
/* SOURCE: http://codepen.io/andornagy/pen/xhiJH */

#appList {
	width: 150px;
	background-color: #303039;
}

#appList,
#appList ul {
	padding:0;
	margin:0;
	list-style: none;
	position: relative;
}

#appList li {
	display:inline-block;
	background-color: #303039;
}

#appList a {
	display:block;
	padding:0 10px;
	color: #c0c0c9;
	font-size: 14px;
	line-height: 60px;
	text-decoration:none;
}

#appList a > i{
	vertical-align: middle;
	color: #c0c0c9;
}

#appList a:hover {
	color: $primary-color;
}

/* Hide Dropdowns by Default */
#appList, #appList ul {
	display: none;
	position: absolute;
	top: 67px; /* the height of the main #apploader including border */
	z-index : 200;
}

/* Display Dropdowns on Hover */
#main_topbar_apploader:hover #appList,
#appList li:hover > ul {
	display:block;
}

/* First Tier Dropdown */
#appList li {
	width: 150px;
	float:none;
	display:list-item;
	position: relative;
	z-index : 200;
}

#appList li a{
	line-height:40px;
}

/* Second, Third and more Tiers	*/
#appList li ul li {
	position: relative;
	top: -60px;
	left: -151px;
	min-height: 40px;
	border-right: 1px solid #202029;
	z-index : 200;
}

#appList li ul li > a{
	font-size: 12px;
	line-height: 20px;
}

#appList li ul li > a:hover {
	color: #c0c0c9;
}

#appList a[data-name="appstore"] {
	border-top: 1px solid #202029;
	color: #fff;
}

#appList a[data-name="appstore"]:hover {
	color: $primary-color;
}

