@import 'vars.scss';

.cherry-plugin-wizard,
.tm-wizard {
	background: $bodyColor;
	color: $textColor;
	padding: 40px 50px;
	border: 1px solid $bordersColor;
	font-size: $fontSize;
	line-height: 19px;
	max-width: 1100px;

	.notice,
	.updated,
	.woocommerce-notice {
		display: none;
	}

	&-skins {
		padding-top: 30px;
	}

	&-skin-item {
		display: flex;
		padding: 40px 0;
		border-top: 1px solid $bordersColor;
		&__thumb {
			width: 310px;
			img {
				box-shadow: 0 5px 21px rgba( 0,0,0,.1 );
				width: 100%;
				height: auto;
			}
		}
		&__summary {
			width: calc( 100% - 310px );
			padding: 0 0 0 35px;
		}
		&__actions {
			padding-top: 15px;
			.btn {
				width: 110px;
				text-align: center;
				margin: 0 15px 0 0;
			}
		}
		&__plugins {
			overflow: hidden;
			max-height: 0;
			box-sizing: border-box;
			&-title {
				cursor: pointer;
				transition: all 200ms linear;
				&:hover {
					color: $iconColor;
				}
				&:after {
					content: "\f140";
					font-family: 'dashicons';
					color: $iconColor;
					font-size: 22px;
					line-height: 18px;
					padding: 0 0 0 5px;
					vertical-align: text-bottom;
				}
				&.is-active {
					&:after {
						content: "\f142";
					}
					& + .cherry-plugin-wizard-skin-item__plugins {
						max-height: 400px;
						margin: 0 0 10px;
					}
				}
			}
			&-content {
				padding: 10px 10px 5px 10px;
				border-radius: 5px;
				border: 1px solid $bordersColor;
				background: $innerBoxColor;
			}
		}
	}

	&-type {
		&__select {
			padding: 30px 0;
		}
		&__item {
			border: 1px solid $bordersColor;
			border-radius: 5px;
			display: block;
			padding: 20px 20px 20px 47px;
			margin: 0 0 10px;
			font-size: 14px;
			color: $textColorAlt;
			position: relative;
			display: flex;
			> * {
				position: relative;
				z-index: 2;
			}

			input[type="radio"] {
				position: absolute;
				left: 20px;
				top: 27px;
			}

			&-mask {
				position: absolute;
				left: 0;
				top: 0;
				right: 0;
				bottom: 0;
				background: $innerBoxColor;
				transition: all 200ms linear;
				z-index: 1;
				opacity: 0;
			}
			&-label {
				&-title {
					display: block;
					padding: 0 0 5px;
				}
				&-desc {
					color: $textColor;
					font-size: 13px;
				}
			}
			&:hover .cherry-plugin-wizard-type__item-mask,
			input:checked + .cherry-plugin-wizard-type__item-mask {
				position: absolute;
				opacity: 1;
			}
		}
	}

	&-skin-plugins {
		&__item {
			font-size: 12px;
			line-height: 22px;
			padding: 0 7px;
			display: inline-block;
			margin: 0 5px 5px 0;
			border: 1px solid $bordersColor;
			background: #fff;
			border-radius: 2px;
		}
	}

	&-msg {
		padding: 15px 15% 25px 0;
	}

	&-server {
		padding: 10px 0 25px;
		margin: 0;
		&__item {
			font-size: 14px;
			padding: 0 0 8px;
			margin: 0;
			position: relative;
			&.check-success {
				color: $successColor;
			}
		}
	}

	h2 {
		margin: 0 0 30px;
		padding: 0 0 15px;
		font-size: 30px;
		line-height: 1em;
		color: $textColorAlt;
		border-bottom: 1px solid $bordersColor;
	}
	h4 {
		font-size: 20px;
		line-height: 27px;
		padding: 0 0 10px;
		margin: 0;
		color: $textColorAlt;
	}
	h5 {
		margin: 0;
		padding: 0 0 10px;
		font-size: 14px;
		line-height: 20px;
		color: $textColorAlt;
	}
	.btn {
		display: inline-block;
		padding: 15px 30px;
		font-size: 12px;
		line-height: 20px;
		text-transform: uppercase;
		font-weight: bold;
		border: none;
		outline: none;
		background: $defaultColor;
		color: #fff;
		cursor: pointer;
		vertical-align: top;
		border-radius: 5px;
		transition: all 200ms linear;
		text-decoration: none;
		box-shadow: 0 5px 15px rgba( 0,0,0,.18 );
		position: relative;
		&:focus,
		&:active {
			box-shadow: none;
			color: #fff;
		}
		&:hover {
			background: $defaultColorAlt;
			color: #fff;
			box-shadow: 0 1px 3px rgba( 0,0,0,.18 );
		}
		&.btn-primary {
			background: $primaryColor;
			&.disabled {
				background: lighten( $primaryColor, 10% );
				cursor: default;
			}
			&:hover {
				background: $primaryColorAlt;
			}
		}
		&.btn-success {
			background: $successColor;
			&:hover {
				background: $successColorAlt;
			}
		}
		&.btn-danger {
			background: $dangerColor;
			&:hover {
				background: $dangerColorAlt;
			}
		}
		&.btn-warning {
			background: $warningColor;
			&:hover {
				background: $warningColorAlt;
			}
		}
		.dashicons,
		.dashicons-before::before {
			vertical-align: bottom;
			margin: 0 0 0 -5px;
		}
		&.in-progress {
			.text {
				opacity: 0;
			}
			.cherry-plugin-wizard-loader__spinner,
			.tm-wizard-loader__spinner {
				opacity: 1;
			}
		}
	}
	&-advanced-install {
		padding: 0 0 36px;
	}
}

.cherry-plugin-wizard-loader,
.tm-wizard-loader {
	.btn & {
		position: absolute;
		top: 50%;
		left: 50%;
		width: 20px;
		height: 20px;
		margin: -13px 0 0 -13px;
	}
	.cherry-plugin-wizard-item & {
		position: absolute;
		top: 19px;
		left: 27px;
		width: 14px;
		height: 14px;
	}
	&__spinner {
		display: block;
		width: 100%;
		height: 100%;
		animation: spin .7s linear infinite;
		border: 3px solid #FFF;
		border-top: 3px solid #3498DB;
		border-radius: 50%;
		transition: opacity 300ms linear;
		opacity: 0;
		.cherry-plugin-wizard-item & {
			opacity: 1;
			border: 3px solid $primaryColor;
			border-top: 3px solid #fff;
		}
	}
}

.cherry-plugin-wizard-item,
.tm-wizard-item {
	padding: 19px 95px 19px 55px;
	border: 1px solid $bordersColor;
	line-height: 20px;
	font-size: 14px;
	border-radius: 5px;
	margin: 0 0 10px;
	position: relative;
	color: $textColorAlt;
	&__label {
		display: inline-block;
		vertical-align: top;
	}
	> .dashicons {
		position: absolute;
		left: 20px;
		top: 15px;
		font-size: 30px;
	}
	&.installed-success {
		border-color: $successColor;
		background: $successColorLight;
		> .dashicons {
			color: $successColor;
		}
	}
	&.installed-warning {
		border-color: $successColor;
		background: rgba( red( $successColor ), green( $successColor ), blue( $successColor ), .05 );
		> .dashicons {
			color: $successColor;
		}
	}
	&.installed-error {
		border-color: $dangerColor;
		background: rgba( red( $dangerColor ), green( $dangerColor ), blue( $dangerColor ), .05 );
		> .dashicons {
			color: $dangerColor;
		}
	}
}

.plugins-set {
	padding-top: 50px;
	&:first-child {
		padding-top: 0;
	}
	&__desc {
		padding: 0 0 20px;
	}
}

.cherry-plugin-wizard-install-results {
	&__trigger {
		position: absolute;
		right: 0;
		top: 19px;
		padding: 0 2em 0 0;
		color: $textColor;
		cursor: pointer;
		&:after {
			content: "\f140";
			font-family: 'dashicons';
			color: $iconColor;
			font-size: 22px;
			line-height: 18px;
			vertical-align: text-bottom;
		}
		&.is-active {
			&:after {
				content: "\f142";
			}
			& + ul {
				display: block;
			}
		}
	}
	ul {
		font-size: 0.8em;
		padding: 15px 0 0 15px;
		margin: 0;
		display: none;
		li {
			padding: 0 0 5px;
			margin: 0;
			list-style: circle;
		}
	}
}

.tm-config-list {
	padding: 0 0 50px;
}

.tm-warning-notice {
	padding: 10px 10px 10px 35px;
	position: relative;
	color: $warningColor;
	background: rgba( red( $warningColor ), green( $warningColor ), blue( $warningColor ), .1 );
	margin: -10px 0 30px;
	&:before {
		content: "\f534";
		font-family: "dashicons";
		position: absolute;
		left: 10px;
		top: 50%;
		font-size: 18px;
		line-height: 22px;
		height: 22px;
		margin: -11px 0 0 0;
	}
}

.cherry-plugin-wizard-installed {
	padding-top: 20px;
	color: $textColor;
}

.cherry-plugin-wizard-progress {
	height: 24px;
	border-radius: 12px;
	background: $innerBoxColor;
	position: relative;
	overflow: hidden;
	min-width: 150px;
	margin: 0 0 30px;
	&__bar {
		position: absolute;
		left: 0;
		top: 0;
		bottom: 0;
		background: $primaryColor;
		&:after {
			content: "";
			position: absolute;
			top: 0;
			left: 0;
			bottom: 0;
			right: 0;
			background-image:
			   -webkit-gradient(linear, 0 0, 100% 100%,
			      color-stop(.25, rgba(255, 255, 255, .05)),
			      color-stop(.25, transparent), color-stop(.5, transparent),
			      color-stop(.5, rgba(255, 255, 255, .05)),
			      color-stop(.75, rgba(255, 255, 255, .05)),
			      color-stop(.75, transparent), to(transparent)
			   );
			background-image:
				-moz-linear-gradient(
				  -45deg,
			      rgba(255, 255, 255, .05) 25%,
			      transparent 25%,
			      transparent 50%,
			      rgba(255, 255, 255, .05) 50%,
			      rgba(255, 255, 255, .05) 75%,
			      transparent 75%,
			      transparent
			   );
			z-index: 1;
			-webkit-background-size: 50px 50px;
			-moz-background-size: 50px 50px;
			-webkit-animation: move 2.5s linear infinite;
			overflow: hidden;
		}
	}
	&__label {
		content: attr( data-width );
		color: #fff;
		position: absolute;
		left: 15px;
		right: 15px;
		top: 0;
		bottom: 0;
		line-height: 24px;
		text-align: left;
	}
}

@-webkit-keyframes move {
	0% { background-position: 0 0; }
	100% { background-position: 50px 50px; }
}
@-moz-keyframes move {
	0% { background-position: 0 0; }
	100% { background-position: 50px 50px; }
}
@-ms-keyframes move {
	0% { background-position: 0 0; }
	100% { background-position: 50px 50px; }
}
@keyframes move {
	0% { background-position: 0 0; }
	100% { background-position: 50px 50px; }
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}
