$tablet-width: 768px;
$status-ok: #6aa000;
$status-warning: #e3e600;
$status-error: #ff0000;

/**
 * Layout
 */

.wrap .notice,
.wrap > h2 {
	z-index: 2;
    position: relative;
}

.wrap h2 {
	color: #888;
	line-height: 1.75;
	margin: .5em 0 .75em;
}

#wpbody #update-nag,
#wpbody .update-nag {
	margin-left: -20px;
	width: 100%;
	margin-top: 0;
	margin-bottom: 20px;
}

h2.ep-list-features {
	display: none; // We use this since WP inserts warnings after the first h2
}

/**
 * Header
 */

.ep-header-menu {
	background-color: #fff;
	position: relative;
	margin-left: -20px;
	padding-left: 20px;
	padding-right: 20px;
	padding-top: 5px;
	padding-bottom: 5px;
	border-bottom: 2px solid #ddd;
	z-index: 2;
}

.ep-header-menu:after {
	content: ' ';
	clear: both;
	display: block;
}

.ep-header-menu img {
	float: left;
}

.ep-header-menu .icons {
	float: right;
	padding-right: 3px;
	height: 39px;
	line-height: 39px;
	display: inline-block;
}

.ep-header-menu .icons .dashicons-update {
	font-size: 29px;
	margin-right: 10px;
	top: -3px;
}

.ep-header-menu .icons a {
	font-size: 27px;
	vertical-align: middle;
	color: inherit;
	position: relative;
	top: -3px;
	margin-left: 8px;
	cursor: pointer;
}

.ep-header-menu .icons .dashicons-no,
.ep-header-menu .icons .dashicons-controls-play,
.ep-header-menu .icons .dashicons-controls-pause {
	top: 1px;
	font-size: 30px;
}

.ep-header-menu .resume-sync,
.ep-header-menu .pause-sync,
.ep-header-menu .cancel-sync {
	display: none;
}

.ep-header-menu .sync-status {
	display: none;
	color: #666;
	bottom: -1px;
	position: relative;
	margin-right: 8px;
    vertical-align: middle;
    font-style: italic;
}

.ep-header-menu .progress-bar {
	margin-bottom: -5px;
	height: 5px;
	position: absolute;
	bottom: 0;
	left: 0;
	background-color: #D84440;
}

/**
 * Features
 */

.ep-features {
	overflow: auto;
}

.error-overlay.cant-connect,
.error-overlay.syncing {
	content: ' ';
	display: block;
	position: fixed;
	top: 46px;
	left: 0;
	right: 0;
	bottom: 0;
	opacity: .6;
	background-color: #fff;
	z-index: 1;
}

@media (min-width: $tablet-width) {
	.error-overlay.cant-connect,
	.error-overlay.syncing,
	.error-overlay {
		top: 32px;
		left: 160px;
	}
}

.ep-feature .postbox {
	margin-bottom: 0;
}

.ep-feature .postbox .hndle {
	cursor: inherit;
}

.ep-feature .postbox .hndle .settings-button {
	float: right;
	display: inline-block;
	font-size: 13px;
	background-color: #efefef;
	border-radius: 4px;
	padding: 4px 7px;
	margin-top: -4px;
	cursor: pointer;
	color: inherit;
	position: relative;
    padding-left: 23px;
}

.ep-feature .settings-button:before {
	content: "\f140";
	font: 400 19px/1 dashicons;
	display: inline-block;
	color: #72777c;
	padding: 0 5px 0 0;
	vertical-align: middle;
	top: 4px;
	position: absolute;
	left: 1px;
}

.ep-feature .settings-button:after {
	border-radius: 50%;
	content: ' ';
	display: inline-block;
	vertical-align: middle;
	width: 8px;
	height: 8px;
	margin-left: 10px;
	margin-top: -2px;
}

.feature-requirements-status-2.ep-feature {
	.postbox .hndle .settings-button:after {
		background-color: transparent;
		border: 1px solid $status-error;
	}

	.settings .requirements-status-notice {
		border-color: $status-error;
	}
}

.feature-requirements-status-1.ep-feature {
	.postbox .hndle .settings-button:after {
		background-color: transparent;
		border: 1px solid $status-warning;
	}

	&.feature-active .postbox .hndle .settings-button:after {
		background-color: $status-warning;
	}

	.settings .requirements-status-notice {
		border-color: $status-warning;
	}
}

.feature-requirements-status-0.ep-feature {
	.postbox .hndle .settings-button:after {
		background-color: transparent;
		border: 1px solid $status-ok;
	}

	&.feature-active .postbox .hndle .settings-button:after {
		background-color: $status-ok;
	}

	.settings .requirements-status-notice {
		border-color: $status-ok;
	}
}

.ep-feature {
	position: relative;
	vertical-align: top;
	margin-bottom: 20px;
}

.ep-feature.saving .action-wrap:before {
	content: ' ';
	vertical-align: middle;
	margin-right: 1.4em;
	top: 4px;
	border-radius: 50%;
	width: 8px;
	height: 8px;
	display: inline-block;
	font-size: 7px;
	position: relative;
	text-indent: -9999em;
	border-top: 5px solid #ccc;
    border-right: 5px solid #ccc;
    border-bottom: 5px solid #ccc;
    border-left: 5px solid #999;
	-webkit-transform: translateZ(0);
	-ms-transform: translateZ(0);
	transform: translateZ(0);
	-webkit-animation: load8 1.1s infinite linear;
	animation: load8 1.1s infinite linear;
}

.ep-feature .description,
.ep-feature .settings {
	margin-bottom: 0;
	text-align: left;
}

.ep-feature .settings {
	display: none;
	overflow: auto;

	h3 {
		margin-top: 0;
		font-size: inherit;
    	font-weight: bold;
	}
}

.ep-feature.show-settings {

	.settings {
		display: block;
	}

	.description {
		display: none;
	}

	.settings-button:before {
		content: "\f142";
	}
}

.ep-feature .settings .requirements-status-notice {
	border-left: 4px solid $status-ok;
	background-color: #efefef;
	padding: 8px 12px;
	margin-bottom: 10px;
}

.ep-feature .settings .action-wrap {
	clear: both;
	text-align: right;
	padding-top: 15px;
	vertical-align: middle;

	a {
		cursor: pointer;
		display: inline-block;
	}

	.no-dash-sync {
		color: #aaa;
		line-height: 27px;
		padding-right: 8px;
		display: none;
	}

	a.disabled {
		cursor: default;
	}

	.cancel {
		margin-top: 4px;
		margin-right: 6px;
	}
}

.ep-feature.dash-sync-disabled .settings .action-wrap {
	.no-dash-sync {
		display: inline;
	}
}

.ep-feature .settings .field {
	clear: both;
	overflow: initial;
	padding-top: 15px;

	&:first-child {
		padding-top: 0;
	}

	label {
		margin: 0.25em 0 0.5em;
		display: inline-block;
	}

	div {
		padding-top: 5px;
	}

	> label,
	.field-name {
		display: block;
		float: left;
		width: 25%;
		padding-right: 1.5em;
		box-sizing: border-box;
	}

	.input-wrap {
		width: 75%;
		display: block;
		float: right;
	}

	.field-description {
		font-style: italic;
		margin-top: 4px;
		margin-bottom: 0;
		color: #666;
	}

	.disabled {
		color: lighten(#444, 50%);

		input {
			cursor: default;
		}
	}
}

.ep-feature .long {
	display: none;

	p:last-child {
		margin-bottom: 0;
	}
}

.ep-feature.show-full .long {
	display: block;
}

.ep-feature .learn-more,
.ep-feature .collapse {
	cursor: pointer;
}

.ep-feature.show-full .learn-more {
	display: none;
}

.ep-feature .learn-more:after {
	content: "\f140";
	font-family: dashicons;
	font-size: 1.5em;
	vertical-align: middle;
	top: -.07em;
	position: relative;
}

.ep-feature .collapse:after {
	content: "\f142";
	font-family: dashicons;
	font-size: 1.5em;
	vertical-align: middle;
	top: -.07em;
	position: relative;
}

/**
 * Intro Page
 */


.intro h2 {
	padding: 9px 15px 4px 0;
}

.wrap.intro {
	margin-top: 30px;
	margin-bottom: 30px;
	overflow: auto;

	.updated,
	.notice,
	.error,
	.is-dismissible {
		display: none !important;
	}
}

.features-screenshot {
	display: none;
}

.setup-message {
	text-align: center;
	background-color: #e63e3b;
	margin: 20px -20px 0 -20px;
	padding: 2em 0;
	clear: both;
}

.setup-message .setup-button {
	border-radius: 5px;
	background-color: #d73c38;
	color: #f19ea4;
	display: inline-block;
	margin: 0 .75em;
	text-decoration: none;
	padding: .75em 3em;
	box-shadow: 1px 1px 3px 1px rgba(0,0,0,0.25);
}

.setup-message .setup-button-primary {
	background-color: #fff;
	color: #d84440;
}

/**
 * Animations
 */

@-webkit-keyframes load8 {
	0% {
		-webkit-transform: rotate(0deg);
		transform: rotate(0deg);
	}
	100% {
		-webkit-transform: rotate(360deg);
		transform: rotate(360deg);
	}
}

@keyframes load8 {
	0% {
		-webkit-transform: rotate(0deg);
		transform: rotate(0deg);
	}
	100% {
		-webkit-transform: rotate(360deg);
		transform: rotate(360deg);
	}
}

@media (min-width: $tablet-width) {
	.intro .left {
		float: left;
		width: 30%;
	}

	.features-screenshot {
		margin: 0 auto;
		max-width: 1000px;
		width: 70%;
		display: block;
		height: auto;
		float: right;
	}

	.ep-features .left {
		display: block;
		float: left;
		box-sizing: border-box;
		padding-right: 10px;
		width: 50%;
	}

	.ep-features .right {
		display: block;
		float: right;
		box-sizing: border-box;
		padding-left: 10px;
		width: 50%;
	}

	.ep-feature .feature-message {
		float: left;
		padding: 0;
		vertical-align: middle;
		display: inline-block;
		padding-top: .5em;
	}
}
