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

#appstore_container {
	padding: 15px;
	max-width: 1136px;
	margin: auto;
}

@media (min-width: 1176px) {
	#appstore_container {
		width: 1136px;
	}
}

@media (min-width: 864px) and (max-width: 1175px) {
	#appstore_container {
		width: 824px;
	}
}

@media (max-width: 863px) {
	#appstore_container {
		width: 512px;
	}
}

/********** LEFT **********/

#appstore_container .left-menu {
	float: left;
	width: 180px;
}

#appstore_container .left-menu .app-filter {
	background: #fcfcfc;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	display: block;
	font-size: 18px;
	height: 30px;
	line-height: 30px;
	padding: 15px 10px;
	margin: 10px auto;
}

#appstore_container .left-menu .app-filter-list > .app-filter:first-child {
	margin-top: 0px;
}

#appstore_container .left-menu .app-filter:hover {
	background: #f5f5f5;
}

#appstore_container .left-menu .app-filter.active {
	background: $primary-color;
	border: 1px solid $primary-color;
	color: #fff;
}

#appstore_container .left-menu .app-filter-group .app-filter {
	margin: 0px auto;
}

#appstore_container .left-menu .app-filter-group .app-filter:not(:first-child) {
	border-top-left-radius: 0px;
	border-top-right-radius: 0px;
}

#appstore_container .left-menu .app-filter-group .app-filter:not(:last-child) {
	border-bottom-left-radius: 0px;
	border-bottom-right-radius: 0px;
	border-bottom: none;
}

#appstore_container .left-menu .marketplace {
	margin: 24px auto;

	.admin-title {
		color: #a4a4ab;
		font-weight: bold;
		padding-left: 4px;
	}
	.launch-market {
		position: relative;
		margin: 8px auto;
		padding: 15px 10px;

		background: #f4f4f5;
		border: 1px solid #bcbcc2;
		border-radius: 4px;

		cursor: pointer;
		font-size: 15px;
		height: 36px;
		line-height: 36px;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	.launch-market::after {
		position: absolute;
		content: 'Beta';
		bottom: 10px;
		right: -58px;
		width: 150px;
		height: 18px;
		line-height: 18px;
		overflow: hidden;

		background-color: $primary-color;
		border: 1px solid white;
		color: #fff;
		text-align: center;
		text-transform: uppercase;
		font-size: 12px;
		font-weight: bold;

		transform: rotate(-45deg);
		box-shadow: 1px 1px 1px rgba(49, 49, 58, .6);
	}

	.launch-market:hover {
		background: $primary-color;
		border-color: darken($primary-color, 20%);
	}
	.launch-market.active {
		background: $primary-color;
		border-color: darken($primary-color, 20%);
	}

	.title {
		display: inline-block;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;

		i {
			margin: 0 8px 0 4px;
			font-size: 16px;
			color: white;
		}
	}
}

/********** RIGHT **********/

#appstore_container .right-content {
	margin-left: 200px;
}

/* * * * * Top * * * * */

#appstore_container .right-content .search-bar {
	margin: 16px 0px 21px;
}

#appstore_container .right-content .search-bar:after {
	clear: right;
}

#appstore_container .right-content .search-bar .search-query {
	margin-right: 5px;
}

/* * * * * Center * * * * */

#appstore_container .right-content .right-container .app-list {
	list-style: none;
	margin: 0;
}

#appstore_container .right-content .right-container .app-element {
	width: 270px;
	height: 110px;
	border: solid 1px #ccc;
	float: left;
	padding: 20px 15px;
	margin: 5px;
	position: relative;
	cursor: pointer;
	border-radius: 4px;

	background: -moz-linear-gradient(top,  hsl(0,0%,99%) 0%, hsl(0,0%,96%) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,hsl(0,0%,99%)), color-stop(100%,hsl(0,0%,96%))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  hsl(0,0%,99%) 0%,hsl(0,0%,96%) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  hsl(0,0%,99%) 0%,hsl(0,0%,96%) 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  hsl(0,0%,99%) 0%,hsl(0,0%,96%) 100%); /* IE10+ */
	background: linear-gradient(to bottom,  hsl(0,0%,99%) 0%,hsl(0,0%,96%) 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e8e8e8',GradientType=0 ); /* IE6-9 */
}

#appstore_container .right-content .right-container .app-element:hover {
	background: -moz-linear-gradient(top,  hsl(0,0%,96%) 0%, hsl(0,0%,99%) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,hsl(0,0%,96%)), color-stop(100%,hsl(0,0%,99%))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  hsl(0,0%,96%) 0%,hsl(0,0%,99%) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  hsl(0,0%,96%) 0%,hsl(0,0%,99%) 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  hsl(0,0%,96%) 0%,hsl(0,0%,99%) 100%); /* IE10+ */
	background: linear-gradient(to bottom,  hsl(0,0%,96%) 0%,hsl(0,0%,99%) 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#fcfcfc',GradientType=0 ); /* IE6-9 */
}

#appstore_container .right-content .right-container .app-element .app-installed {
	height: 18px;
	width: 18px;
	padding: 3px;
	position: absolute;
	top: 0;
	right: 0;
	border-left: solid 1px #ccc;
	border-bottom: solid 1px #ccc;
	border-bottom-left-radius: 4px;
}

#appstore_container .right-content .right-container .app-element:not(.installed) .app-installed {
	display: none;
}

#appstore_container .right-content .right-container .app-element-left {
	float: left;
	width: 70px;
	height: 100%;
}

#appstore_container .right-content .right-container .app-element-left .app-icon {
	height: 100%;
	width: 64px;
	margin: auto;
	background: url('./static/images/default_icon.png') no-repeat center;
	background-size: contain;
}

#appstore_container .right-content .right-container .app-element-right {
	float: left;
	width: 190px;
	margin-left: 10px;
}

#appstore_container .right-content .right-container .app-element-right .app-title {
	text-transform: uppercase;
	color: $primary-color;
	font-weight: bold;
	height: 30px;
	line-height: 30px;
	overflow-x: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#appstore_container .right-content .right-container .app-element-right .app-description {
	height: 80px;
	overflow: hidden;
	font-size: 12px;
}

#appstore_container .market-beta-notice {
	padding: 2px;
	overflow: hidden;
}

#appstore_container #market-content {
	border: 1px solid #e0e0e9;
	border-radius: 2px;
	background-color: #FFF;
	overflow: hidden;

	.market-body {
		padding: 20px;
	}

	a .fa.fa-external-link {
		color: $primary-color;
	}

	.form-horizontal .plain-text {
		margin-top: 5px;
	}
}


#market-content .market-settings {
	form {
		.err-message{
			color: red;
		}
	}
}

#market-content .market-settings {
	form {
		#api_url-error{
			position: relative;
			padding: 5px;
		}
	}
}

#market-content .empty-placeholder{
	font-style: italic;
}

#market-content .market-welcome {
	text-align: center;
	font-size: 18px;

	.market-title {
		margin-bottom: 20px 0 30px;
		.title_finally {
			color: #271FE0;
			display: block;
		}
	}
	.market-body {
		.actions {
			padding: 20px 20px 10px;
		}
	}
}

#market-content .market-link {
	.market-body {
		a .fa.fa-external-link {
			color: $primary-color;
		}
		form {
			margin: 0;
			padding: 30px 0 0;

			textarea {
				max-width: 450px;
				width: 100%;
				box-sizing: border-box;
			}
			.control-actions {
				padding-top: 20px;
			}
		}
	}
}

#market-content .market-settings {
	.market-body {
		form {
			margin: 0;
			padding: 30px 0 0;

			textarea {
				width: 450px;
			}
		}
	}

	.header-form {
		border-top-left-radius: 2px;
		border-top-right-radius: 2px;
		background-color: #22a5ff;
		color: #fff;
		height: 65px;
		padding: 20px 20px 0;

		.logo-header {
			vertical-align: top;
			margin-right: 25px;
			width: 100px;
			height: 37px;
		}

		.title {
			font-size: 24px;
			margin-bottom: 7px;
		}
	}

	.go-to-market {
		text-align: left;
		padding-top: 10px;
	}

	form {
		margin: 0;
		.control-label {
			text-align: left;
		}
	}

	.content {
		padding: 20px;

		form {
			margin: 0;
		}
		.help-block {
			margin-top: 10px;

			.clearfix {
				margin-bottom: 25px;
			}

			i.fa-question-circle {
				margin-right: 10px;
			}
		}

		.help-block.clearfix {
			margin-bottom: 25px;
		}

		.content-title {
			border-bottom: 1px solid #c0c0c9;
			color: #22a5ff;
			font-size: 18px;
			font-weight: 500;
			margin-bottom: 25px;
			padding-bottom: 10px;
		}
	}

	.danger-content {
		.content-data {
			.row-wrap {
				padding: 20px 0;
			}
			.danger-title {
				margin-bottom: 10px;
				font-size: 16px;
			}
			.help-block {
				margin-bottom: 0;
			}
		}

		button {
			color: $danger-color;
			border-color: $danger-color;
			width: 100%;
			i.fa {
				color: $danger-color;
				margin-right: 10px;
			}
		}
	}
}

/************ Danger Confirmation Dialog ***************/
.danger-dialog #action_input {
	margin-top: 5px;
	margin-left: 10px;
	margin-bottom: 0px;
}

/********** POPUP **********/

#appstore_popup_container {
	padding: 20px;
	width: 570px;
}

#appstore_popup_container .icon {
	background: url('./static/images/default_icon.png') no-repeat center;
	height: 60px;
	width: 60px;
	float: left;
	background-size: contain;
}

#appstore_popup_container .left-container {
	float: left;
	width: 350px;

	.title-container {
		display: flex;

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

#appstore_popup_container .right-container {
	float: left;
	width: 200px;
	height: 380px;
	background-color: #eee;
	border: solid 1px #ccc;
	margin-left: 20px;
	border-radius: 4px;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	position: relative;
}

#appstore_popup_container .bottom-container {
	margin-top: 15px;
}

#appstore_popup_container .title {
	float: left;
	height: 60px;
	line-height: 60px;
	margin-left: 15px;
	text-transform: uppercase;
	font-size: 20px;
	font-weight: 600;
}

#appstore_popup_container .screenshot-container {
	height: 300px;
	border: solid 1px #ccc;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

#appstore_popup_container .left-container > div:not(:first-of-type) {
	margin-top: 20px;
}

#appstore_popup_container .description-title {
	color: $primary-color;
	text-transform: uppercase;
	font-size: 16px;
	font-weight: bold;
}

#appstore_popup_container .description-content {
	font-size: 13px;
	margin-top: 10px;
	line-height: 16px;
}

#appstore_popup_container .description-content .features-title {
	font-weight: bold;
	margin-bottom: 5px;
}

#appstore_popup_container .description-content ul li {
	line-height: 16px;
}

#appstore_popup_container .screenshot-container .carousel .carousel-indicators {
	top: -15px;
}

#appstore_popup_container .screenshot-container .carousel,
#appstore_popup_container .screenshot-container .carousel .carousel-inner,
#appstore_popup_container .screenshot-container .carousel .carousel-inner > .item {
	height: 100%;
}

#appstore_popup_container .screenshot-container .carousel .carousel-inner > .item {
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center;
}

#appstore_popup_container .screenshot-container .carousel .carousel-inner > .item.missing-screenshot {
	background-image: url('./static/images/missing_screenshot.png');
}

#appstore_popup_container .screenshot-container .carousel .carousel-indicators li {
	background-color: rgba(51, 51, 51, 0.25);
	cursor: pointer;
}

#appstore_popup_container .screenshot-container .carousel .carousel-indicators li.active {
	background-color: rgba(51, 51, 51, 0.75);
}

#appstore_popup_container .screenshot-container .carousel .carousel-control {
	display: none;
}

#appstore_popup_container .right-container > div > div {
	padding: 10px;
}

#appstore_popup_container .right-container > div > div:not(:first-of-type) {
	border-top: solid 1px #ccc;
}

#appstore_popup_container .right-container .info-bloc ul {
	margin: 0;
	list-style: none;
}

#appstore_popup_container .right-container .info-bloc li {
	line-height: 30px;
}

#appstore_popup_container .right-container .permissions-bloc .permissions-title {
	margin-bottom: 10px;
}

#appstore_popup_container .right-container .permissions-bloc .permissions-link {
	display: none;
	margin-top: 10px;
}

#appstore_popup_container .right-container .permissions-bloc .permissions-link a,
#appstore_popup_container .right-container .permissions-bloc .permissions-link a:hover {
	font-size: 13px;
	color: $primary-color;
}

#appstore_popup_container .right-container .permissions-bloc input[type="radio"] {
	margin: 0 6px 4px 0;
}

#appstore_popup_container .right-container .bottom-right-div {
	position: absolute;
	width: 180px;
	bottom: 0px;
}

#appstore_popup_container .right-container .help-bloc > div {
	text-transform: uppercase;
}

#appstore_popup_container .right-container .help-bloc > ul {
	margin: 10px 0 0 0;
	list-style: none;
}

#appstore_popup_container .right-container .help-bloc a {
	font-size: 14px;
	font-weight: 600;
}

#appstore_popup_container .right-container .help-bloc a:hover {
	color: $primary-color;
}

#appstore_popup_container .right-container .user-list-view {
	display: none;
}

#appstore_popup_container .right-container .user-list-view form {
	margin: 0;
}

#appstore_popup_container .right-container .user-list-view .user-list {
	margin: 0;
	list-style: none;
	border-top: solid 1px #ccc;
	background-color: #f9f9f9;
	overflow: auto;
	height: 195px;
}

#appstore_popup_container .right-container .user-list-view .user-list-element {
	border-bottom: solid 1px #ccc;
	cursor: pointer;
}

#appstore_popup_container .right-container .user-list-view .user-list-element label:not(.monster-checkbox) {
	line-height: 25px;
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#appstore_popup_container .right-container .user-list-view .user-list-element label.monster-checkbox {
	margin: 0 7px -5px;
}

#appstore_popup_container .right-container .user-list-view .user-list-element.checked i.fa-square {
	display: none;
}

#appstore_popup_container .right-container .user-list-view .user-list-element:not(.checked) i.fa-check-square {
	display: none;
}

#appstore_popup_container .right-container .user-list-view .user-list-element:hover {
	background-color: #f3f3f3;
}

#appstore_popup_container .right-container .user-list-view .user-list-links a {
	color: $primary-color;
	font-size: 13px;
	width: 50%;
	text-align: center;
	float: left;
}

#appstore_popup_container .right-container .user-list-view .user-list-buttons button {
	width: 85px;
	min-width: initial;
}

#appstore_popup_container .action-bar {
	border-top: solid 1px #c0c0c9;
	margin-top: 20px;
	padding-top: 20px;
	text-align: right;
}

#appstore_popup_container .action-bar :not(:last-child) {
	margin-right: 10px;
}
