$light-gray: #ccc;
$very-light-gray: #f5f5f5;

@import 'mixins/breakpoint';

.welcome-panel {
	overflow: visible !important; // for tooltips
}

.welcome-panel-close {
	top: 0;
	right: 13px;

	@media (max-width: 600px) {
		top: 58px;
	}
}

.getting-started * {
	box-sizing: border-box;
}

// Progress bar
.getting-started__progress {
	float: left;
	font-weight: 400;
	font-size: 80%;

	.progress__bar span {
		background: #4ab866;
		width: 0%;
		transition: width 0.5s;
	}


	&.progress_10 .progress__bar span {
		width: 10%;
	}

	&.progress_20 .progress__bar span {
		width: 20%;
	}

	&.progress_30 .progress__bar span {
		width: 30%;
	}

	&.progress_40 .progress__bar span {
		width: 40%;
	}

	&.progress_50 .progress__bar span {
		width: 50%;
	}

	&.progress_60 .progress__bar span {
		width: 60%;
	}

	&.progress_70 .progress__bar span {
		width: 70%;
	}

	&.progress_80 .progress__bar span {
		width: 80%;
	}

	&.progress_90 .progress__bar span {
		width: 90%;
	}

	&.progress_100 .progress__bar span {
		width: 100%;
	}

	.progress__bar {
		display: inline-block;
		width: 80px;
		height: 12px;
		margin: 0 8px -2px 0;
		padding: 2px;
		border-radius: 2px;
		background: #f5f5f5;

		span {
			display: block;
			height: 100%;
			width: 0%;
			background: #4ab866;
		}
	}
}

.getting-started {
	padding-bottom: 10px;
	margin-top: 30px;

	h4 {
		margin: 0;
		font-size: 20px;
	}
}

.getting-started__intro {
	h3 {
		margin: 0;
		font-size: 41px;
		text-align: center;

		@include breakpoint(tablet) {
			font-size: 30px;
		}
		@include breakpoint(phone) {
			font-size: 24px;
		}
	}
}

.getting-started__wrapper {
	position: relative;
	.loading {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		min-height: 100%;
		z-index: 999;
		background-color: rgba(255,255,255,0.6);
	}
	.loading__message {
		img {
			vertical-align: middle;
		}
		position: absolute;
		width: 50%;
		min-width: 300px;
		border-radius: 2px;
		padding: 20px;
		border: 1px solid black;
		background-color: white;
		text-align: center;
		left: 50%;
		top: 100px;
		transform: translate(-50%,-50%);
  		-webkit-transform: translate(-50%, -50%);
	}
}

.getting-started__intro {
	background: url(../img/jps-welcome.png) no-repeat center bottom;
	background-size: 520px auto;
	padding-bottom: 200px;

	@include breakpoint(tablet) {
		padding: 30px;
	}
}

.getting-started__subhead {
	margin: 0 0 30px;
	color: #666;
	font-size: 18px;
	line-height: 1.6;
	text-align: center;

	@media (max-width: 600px) {
		margin-bottom: 15px;
		font-size: 15px;
	}
	@include breakpoint(phone) {
		font-size: 13px;
	}
}

.getting-started__action {
	text-align: center;

	.button.button-large {
		@extend .download-jetpack;
		height: auto;
	}
}

.getting-started__sections {
	float: left;
	width: 70%;
	padding: 0 10px;
}

.welcome__content_box {	
	h3 {
		padding: 5px 5px 10px 10px;
		border-bottom: 1px solid #eee;
	}
	background: white;
	margin: 10px;
	border: 1px solid #eee;
}

.welcome__section {
	.jetpack-logo {
		display: block;
		text-align: center;
		float: right;
		height: 70px;
		color: white;
		margin-left: 5px;
		background-color: #81a844;
		a {
			&:before {
				content: '';
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				background-size: 183px 32px;
			}
			span {
				text-indent: -9999px;
				visibility: hidden;
			}
			display: inline-block;
			position: relative;
			width: 214px;
			margin-right: 6px;
			background: url(../../jetpack/images/jetpack-logo.png) center center no-repeat;
			background: url(../../jetpack/images/jetpack-logo.svg) center center no-repeat, none;
			background-size: 183px auto;
			color: #fff;
			font-weight: normal;
		}
	}

	@include breakpoint(tablet){ 
		.jetpack-logo {
			float: none;
			margin-left: 0;
		}
	}

	h4 {
		margin-bottom: 10px;
	}

	h5 {
		margin-top: 0;
		font-size: 1em;
		font-weight: 400;
	}

	.step-description {
		font-size: larger;
	}

	ul {
		margin-left: 2em;

		li {
			margin: 0;
			list-style: disc;
		}
	}

	input[type="text"] {
		width: 100%;
	}

	a.skip {
		color: #bbb;
		font-size: 90%;
		margin-left: 20px;
		border-bottom: 1px dotted #bbb;
	}

	.submit {
		margin: 0px !important;
		padding: 5px 5px !important;
		background-color: $very-light-gray;
		text-align: right;
	}
}

#welcome__stats a.skip, #welcome__traffic a.skip {
	margin-left: 0;
}

.welcome__helper {
	padding-top: 15px;
	border-top: 1px solid #ddd;
}

.welcome__connect {

}

.welcome__jumpstart_wrapper {
	position: relative;
	
	p.more {
		text-align: center;
	}
}

.welcome__jumpstart_module {
	float: left;
	position: relative;
	height: 140px;
	padding: 10px;
	.activated {
		text-transform: uppercase;
		font-size: 10px;
		line-height: 100%;
		color: #fff;
		background: #9fbd72;
		border-radius: 2px;
		padding: 2px 4px;
		display: inline-block;
		margin-left: 5px;
	}
	small {
		display: block;
		margin-top: 5px;
		line-height: 150%;
	}
}

.welcome__jumpstart_overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	min-height: 100%;
	z-index: 700;

	&:before {
		content: '';
		display: block;
		position: absolute;
		width: 100%;
		height: 100%;
		background-color: rgba(0,0,0,0.2);
	}
}

.welcome__jumpstart_overlay__body {
	text-align: center;
	position: absolute;
	border-radius: 3px;
	box-shadow: 0 0 4px rgba(0,0,0,0.2);
	z-index: 800;
	left: 50%;
  	top: 50%;
  	padding: 15px;
  	transform: translate(-50%,-50%);
  	-webkit-transform: translate(-50%, -50%);
	width: 70%;
	background-color: #fff;
}

@include minbreakpoint(tablet) {
	.welcome__jumpstart_module { width: 33%; }
}

#welcome__design .theme-browser {
	margin-top: 10px;
	padding-left: 10px;
	min-width: 180px;

	.theme.active {
		-webkit-box-shadow: 0px 0px 8px 0px rgba(53, 146, 182,1);
		-moz-box-shadow: 0px 0px 8px 0px rgba(53, 146, 182,1);
		box-shadow: 0px 0px 8px 0px rgba(53, 146, 182,1);
		border: 1px solid rgba(53, 146, 182,1);
	}

	.theme-name { padding-right: 0px; }
	@include minbreakpoint(tablet) {
		.theme {
			width: 30%;
		}
	}
	@include breakpoint(phablet) {
		.theme {
			display: block;
			float: none;
		}
	}
	* { box-sizing: content-box; }
	h3 {
		line-height: 1.4em; 
		text-align: left !important; 
	}
}

#welcome__design .theme-overlay {
	* { box-sizing: content-box; }
}

#welcome__design .wp-pointer-content h3:before {
	content: '\f100';
}

// Progress list of steps
.getting-started__steps {
	float: right;
	width: 28%;
	height: 100%;
	background: #fafafa;
	border: 1px solid #eee;

	h3 {
		margin: 0;
		padding: 12px;
		overflow: hidden;
		background: #444;
		color: #fff;
		font-size: 12px;
		text-transform: uppercase;

		> span {
			float: left;
			margin-right: 10px;
		}
	}

	ol {
		margin-right: 10px;
		list-style: none;
	}

	li {
		position: relative;
		color: #ccc;
		line-height: 1.7;

		&::before {
			content: "\f345";
			position: absolute;
			top: 0px;
			left: -16px;
			font-family: dashicons;
			font-size: 16px;
		}

		&.completed {
			color: #4AB866;

			&::before {
				content: "\f147";
			}
		}

		&.current {
			color: #0074A2;
		}

		a {
			color: inherit;
			border-bottom: 1px dashed;
		}
	}

	@include breakpoint(tablet) {
		li {
			font-size: small;
		}
	}

	@include breakpoint(phablet) {
		li {
			font-size: smaller;
		}
	}
}

ul.welcome__advanced {
	margin-left: 0;

	li {
		padding: 1em;
		margin-bottom: 1em;
		list-style: none;
		background: #f5f5f5;
		border: 1px solid #ddd;
	}

	h5 {
		margin: 0;
		font-size: 1.2em;
		font-weight: 800;
	}

	.button {
		margin-top: 1em;
	}
}

// Connect Jetpack button
.download-jetpack {
	display: inline-block;
	position: relative;
	padding: 18px 24px 15px;
	color: #fff;
	font: 400 20px/1 'Open Sans', Helvetica, sans-serif; // 28/14
	background: #518d2a;
	z-index: 3;
	border-radius: 6px;
	box-shadow:
		0 6px 0 #3e6c20,
		0 6px 3px rgba(0,0,0,.4);

	&:visited {
		color: #fff;
	}
	&:hover,
	&:focus {
		color: #fff;
		background: #57972d;
		box-shadow:
			0 6px 0 #3e6c20,
			0 6px 3px rgba(0,0,0,.4);
	}
	&:active {
		top: 6px;
		box-shadow:
			0 0px 0 #3e6c20,
			0 0 0 rgba(0,0,0,.4);

		&:after {
			// fixes buggy clicks
			top: -6px;
		}
	}
	&:after {
		// fixes buggy clicks
		content: '';
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
	}
	@include breakpoint(large-desktop){
		font-size: em(21px);

		&:before {
			top: -1px;
			width: 23px;
			height: 23px;
		}
	};
	@include breakpoint(desktop){
		&:active {
			top: 0;
		}
	};
	@include breakpoint(large-phone){
		font-size: em(17px);
		font-weight: 600;

		&:before {
			width: 19px;
			height: 19px;
			margin-right: 9px;
		}
	};
}

.skip-step {
	background: none;
	border: none;
	color: #999;
	font-size: 0.9em;
	text-decoration: underline;
	cursor: pointer;
}