@import "@10up/component-tooltip";
@import "./global/colors.css";

html.wp-toolbar {
	background: transparent;
}

@custom-media --tablet-min (min-width: 880px);
@custom-media --wide-min (min-width: 1270px);
@custom-media --tablet-max (max-width: 880px);
@custom-media --wide-max (max-width: 1270px);

/**
 * Layout
 */

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

h2.ep-list-features {
	display: none;
}

/**
 * Header
 */

#wpbody #update-nag,
#wpbody .update-nag {
	display: block;
	margin: 5px 15px 2px;
}

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

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

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

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

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

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

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

.ep-header-menu .sync-status {
	bottom: -1px;
	color: var(--ep-c-medium-gray);
	display: none;
	font-style: italic;
	margin-right: 8px;
	position: relative;
	vertical-align: middle;
}

.ep-header-menu .progress-bar {
	background-color: var(--ep-c-medium-red);
	bottom: 0;
	height: 5px;
	left: 0;
	margin-bottom: -5px;
	position: absolute;
}

.ep-header-menu .icons .dashicons-update,
.ep-header-menu .icons .dashicons-admin-generic {
	display: inline;
}

.ep-header-menu .icons .dashicons-update {
	top: 2px;
}

/**
 * Features
 */

.ep-features {
	overflow: auto;
}

.error-overlay.cant-connect,
.error-overlay.syncing {
	background-color: var(--ep-c-white);
	bottom: 0;
	content: " ";
	display: block;
	left: 0;
	opacity: 0.6;
	position: fixed;
	right: 0;
	top: 46px;
	z-index: 1;
}

@media (--tablet-min) {

	.error-overlay.cant-connect,
	.error-overlay.syncing,
	.error-overlay {
		left: 160px;
		top: 32px;
	}
}

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

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

.ep-feature .postbox .hndle .settings-button {
	background-color: var(--ep-c-medium-white);
	border: none;
	border-radius: 4px;
	color: inherit;
	cursor: pointer;
	display: inline-block;
	float: right;
	font-size: 13px;
	font-weight: 400;
	line-height: inherit;
	margin-top: -4px;
	padding: 4px 7px;
	padding-left: 23px;
	position: relative;
}

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

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

.feature-requirements-status-2.ep-feature {

	& .postbox .hndle .settings-button::after {
		background-color: transparent;
		border: 1px solid var(--ep-status-error);
	}

	& .settings .requirements-status-notice {
		border-color: var(--ep-status-error);
	}
}

.feature-requirements-status-1.ep-feature {

	& .postbox .hndle .settings-button::after {
		background-color: transparent;
		border: 1px solid var(--ep-status-warning);
	}

	&.feature-active .postbox .hndle .settings-button::after {
		background-color: var(--ep-status-warning);
	}

	& .settings .requirements-status-notice {
		border-color: var(--ep-status-warning);
	}
}

.feature-requirements-status-0.ep-feature {

	& .postbox .hndle .settings-button::after {
		background-color: transparent;
		border: 1px solid var(--ep-status-ok);
	}

	&.feature-active .postbox .hndle .settings-button::after {
		background-color: var(--ep-status-ok);
	}

	& .settings .requirements-status-notice {
		border-color: var(--ep-status-ok);
	}
}

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

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

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

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

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

.ep-feature.show-settings {

	& .settings {
		display: block;
	}

	& .description {
		display: none;
	}

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

.ep-feature .settings .requirements-status-notice {
	background-color: var(--ep-c-medium-white);
	border-left: 4px solid var(--ep-status-ok);
	margin-bottom: 10px;
	padding: 8px 12px;

	&.requirements-status-notice--reindex {
		border-color: var(--ep-status-warning);
		display: none; /* Controlled by JavaScript. */
	}

	&.requirements-status-notice--syncing {
		border-color: var(--ep-status-error);
		display: none; /* Controlled by JavaScript. */
	}
}

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

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

	& .no-dash-sync {
		color: var(--ep-c-light-gray);
		display: none;
		line-height: 27px;
		padding-right: 8px;
	}

	& a.disabled {
		cursor: default;
	}

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

.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 {
		display: inline-block;
		margin: 0.25em 0 0.5em;
	}

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

	& .input-wrap {
		display: block;
		float: right;
		padding-top: 5px;
		width: 75%;
	}

	& .field-description {
		color: var(--ep-c-medium-gray);
		font-style: italic;
		margin-bottom: 0;
		margin-top: 4px;
	}

	& .disabled {
		color: var(--ep-c-light-gray);

		& input {
			cursor: default;
		}
	}

	& .components-form-token-field {
		padding-top: 0;
	}

	& .components-form-token-field__label {
		margin-top: 0;
	}

	& .components-form-token-field__input-container {
		border-color: var(--ep-c-light-gray);
	}
}

.ep-feature .long {
	display: none;

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

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

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

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

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

/**
 * Intro Page
 */


.intro h2 {
	line-height: 1.2;
	padding: 9px 0 4px 0;
}

.intro h1 {
	color: var(--ep-c-medium-gray);
	font-weight: 600;
	margin: 0.5em 0 2em;
	text-align: center;
}

.intro-container {
	display: flex;
	flex-direction: column;
	justify-content: center;
	position: relative;
	text-align: center;

	@media (--tablet-min) {
		flex-direction: row;
	}

	@media (--wide-min) {
		margin-left: 10%;
		margin-right: 10%;
	}

	& h2 {
		color: var(--ep-c-medium-gray);
		height: 8%;
	}

	& p {
		margin-left: auto;
		margin-right: auto;
		max-width: 300px;
	}
}

.ep-feature-list {
	display: inline-block;
	margin: 0;
	text-align: left;
	vertical-align: top;

	& li {
		align-items: center;
		display: flex;
		margin: 4px 3px;
	}

	& [role="tooltip"].a11y-tip__help--top {
		font-size: inherit;
	}
}

.ep-feature-info {
	text-decoration: none;

	& .dashicons {
		font-size: 14px;
		position: relative;
		top: 2px;
	}
}

.intro-box {
	flex-grow: 2;
	margin-bottom: 2em;
}

.intro-container-success {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	text-align: center;
}

.intro-container-success p {
	margin-top: 23px;
	padding: 0 35% 0 35%;
}

@media (--tablet-max) {

	.intro-container-success p {
		margin-top: 23px;
		padding: 0 26%;
	}
}

.ep-config-success span {
	font-size: 6em;
	padding-right: 75px;
}

.setup-complete {
	font-size: 2em;
	margin-top: 0;
	padding-top: 0;
	width: 100%;
}

.setup-complete h2 {
	margin-top: 0;
	padding-top: 0;
}

.ep-copy-text {

	@media (--tablet-min) {
		padding: 0 9% 0 9%;
	}

	& a {
		font-weight: 700;
	}
}

.ep-circle {
	background: var(--ep-c-white);
	border-radius: 50%;
	color: var(--ep-c-medium-gray);
	display: inline-block;
	font-size: 16px;
	font-weight: 400;
	height: 6em;
	line-height: 2.8em;
	margin: 0 1em;
	text-align: center;
	width: 6em;

	& p {
		border: 0;
		font-size: 50px;
		font-weight: 700;
		line-height: 0.5em;
		margin: 0;
	}
}

.ep-circle--first {

	@media (--tablet-min) {

		&::after {
			background: #d4d4d4;
			content: "";
			height: 0.2em;
			left: 50%;
			position: absolute;
			top: 2.9em;
			transform: translateX(-50%);
			width: 75%;
			z-index: -1;
		}
	}
}

.ep-circle--active {
	background-color: var(--ep-c-medium-red);
	color: var(--ep-c-white);
}

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

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

.features-screenshot {
	display: none;
}

.setup-message {
	clear: both;
	text-align: center;
}

.setup-button {
	-webkit-appearance: none;
	background-color: var(--ep-c-medium-red);
	border: none;
	border-radius: 10px;
	box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.25);
	color: var(--ep-c-white);
	display: inline-block;
	margin: 0 0.75em;
	padding: 1em 1.5em;
	text-decoration: none;
}

.setup-button:hover {
	background-color: var(--ep-c-dark-red);
	color: var(--ep-c-white-red);
}

.setup-message .setup-button-primary {
	background-color: var(--ep-c-white);
	color: var(--ep-c-medium-red);
}

.ep-feature-search .wp-color-result.button {
	margin-bottom: 10px;
}


.ep-feature.ep-feature-search .settings .wp-picker-input-wrap > label {
	margin-right: 10px;
	margin-top: 0;
}

.ep-feature.ep-feature-search .settings.wp-picker-input-wrap  label {
	align-items: center;
	display: flex;
}

.ep-feature.ep-feature-search .settings .wp-picker-open + .wp-picker-input-wrap {
	display: flex;
}

/**
 * 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 (--tablet-min) {

	.intro .left {
		float: left;
		width: 30%;
	}

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

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

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

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

/**
 * Settings page
 */

/* @media screen and (max-width: 600px) { */
.wrap h2.nav-tab-wrapper.ep-credentials-tabs {
	border-bottom: 1px solid var(--ep-c-white-gray);
}

/* } */

.ep-credentials input[type="text"] {
	min-width: 250px;
}

h2 .nav-tab.ep-credentials-tab {
	cursor: pointer;
	margin-bottom: -1px;
}

.ep-credentials-tab.nav-tab-active {
	border-bottom-color: var(--ep-c-white);
}

.ep-credentials-tab img,
.ep-credentials-tab span {
	display: inline-block;
	vertical-align: middle;
}

.ep-credentials fieldset {
	border-bottom: 1px solid var(--ep-c-white-gray);
	border-left: 1px solid var(--ep-c-white-gray);
	border-right: 1px solid var(--ep-c-white-gray);
	margin: 0;
	padding: 0 1rem;
}

.ep-credentials fieldset.predefined {
	border-top: 1px solid var(--ep-c-white-gray);
}

.ep-settings .ep-credentials-general {
	padding: 0 1rem;
}

.ep-settings .button-primary {
	margin: 0 1rem;
}

.ep-settings .description {
	font-size: 0.75rem;
	font-style: italic;
}

@media (--tablet-min) {

	.ep-credentials {
		display: inline-block;
	}

	.ep-credentials .form-table {
		width: auto;
	}

	.ep-credentials .form-table td,
	.ep-credentials-general .form-table td {
		padding-left: 0;
	}

	.ep-credentials .form-table td input,
	.ep-credentials .form-table td select,
	.ep-credentials-general .form-table td input,
	.ep-credentials-general .form-table td select {
		width: 250px;
	}
}

.ep-flex-container {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
	width: 100%;
}

.ep-flex-container-nowrap {
	display: -webkit-box;
	display: -ms-flexbox;
	display: flex;
	width: 100%;
}

.stats-list {
	margin-right: 0;
	width: 100%;

	/* @media( --tablet-min ) {
		width: 48%;
		margin-right: 24px;
	} */

	@media (--wide-min) {
		background-color: var(--ep-c-white);
		margin-right: 28px;
		width: 37%;
	}
}

.stats-queries {
	background-color: var(--ep-c-white);
	width: 100%;

	/* @media( --tablet-min ) {
		width: 48%;
	} */

	@media (--wide-min) {
		width: 60%;
	}
}

.stats-list-th span:last-of-type {
	border-radius: 4px;
	color: inherit;
	cursor: pointer;
	display: inline-block;
	float: right;
	font-size: 13px;
	margin-top: -4px;
	padding: 4px 7px;
	padding-left: 23px;
	position: relative;
}

.status-circle {
	float: right;
	text-transform: capitalize;
}

.status-circle::after {
	border-radius: 50%;
	content: " ";
	display: inline-block;
	height: 8px;
	margin-left: 10px;
	margin-top: -2px;
	vertical-align: middle;
	width: 8px;
}

.green-status {
	color: var(--ep-status-ok);
}

.yellow-status {
	color: var(--ep-status-warning);
}

.red-status {
	color: var(--ep-status-error);
}

.green-status::after {
	background-color: var(--ep-status-ok);
}

.yellow-status::after {
	background-color: var(--ep-status-warning);
}

.red-status::after {
	background-color: var(--ep-status-error);
}

.doc-chart {
	margin-right: 0;
	width: 100%;

	@media (--tablet-min) {
		margin-right: 24px;
		width: 48%;
	}

	@media (--wide-min) {
		margin-right: 28px;
		width: 50%;
	}
}

.ep-qchart-container {
	margin: 0 auto;
	width: 90%;

	@media (--tablet-min) {
		width: 48%;
	}

	@media (--wide-min) {
		margin: 0 auto;
		width: 50%;
	}

}

.inside-totals {
	padding: 0 12px 12px;
}

.ep-totals {
	display: flex;
	flex-direction: column;
	width: 100%;

	@media (--tablet-min) {
		width: 48%;
	}

	@media (--wide-min) {
		width: 47%;
	}

	& .ep-flex-container {
		flex-direction: column;
		justify-content: center;
		margin-bottom: auto;
		margin-top: auto;

		@media (--wide-min) {
			flex-direction: row;
		}
	}
}

.ep-totals-column {
	box-sizing: border-box;
	text-align: center;
	width: 100%;

	@media (--wide-min) {
		width: 50%;
	}
}

p.ep-totals-title {
	font-weight: bolder;
	margin-top: 28px;
}

p.ep-totals-data {
	font-size: 3em;
	margin-top: 22px;
}

.feature-epio-logo {
	margin-left: 5px;
	vertical-align: middle;
}
