// Vars
.kirki-settings-page {
	--kirki-brand-color: #2764F1;
	--kirki-danger-color: #47D87C;
}

// Loading animation
@-webkit-keyframes loadingSpinAround {
	from {
		transform: rotate(0);
	}
	to {
		transform: rotate(359deg);
	}
}

@keyframes loadingSpinAround {
	from {
		transform: rotate(0);
	}
	to {
		transform: rotate(359deg);
	}
}

.kirki-settings-page {
	// Button
	.button.is-loading {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		color: transparent !important;
		pointer-events: none;

		&::after {
			content: "";
			position: absolute;
			width: 1em;
			display: block;
			height: 1em;
			border: 2px solid #dbdbdb;
			border-color: transparent transparent #fff #fff !important;
			border-radius: 290486px;
			-webkit-animation: loadingSpinAround 0.5s infinite linear;
			animation: loadingSpinAround 0.5s infinite linear;
		}
	}

	.button-link {
		border-width: 0;
		background-color: transparent;
		font-size: 17px;
		text-decoration: underline;

		&:focus,
		&:active {
			outline: none;
			box-shadow: none;
			border-width: 0;
		}

		&.is-disabled {
			color: #ddd;
		}

		&.is-right-side {
			float: right;

			&.is-loading {
				justify-content: flex-end;
			}
		}

		&.is-loading {
			display: inline-flex;
			align-items: center;
			justify-content: center;
			color: transparent !important;
			pointer-events: none;

			&::after {
				content: "";
				position: absolute;
				width: 1em;
				display: block;
				height: 1em;
				border: 2px solid #7ab4e3;
				border-color: transparent transparent #2271b1 #2271b1 !important;
				border-radius: 290486px;
				-webkit-animation: loadingSpinAround 0.5s infinite linear;
				animation: loadingSpinAround 0.5s infinite linear;
			}
		}
	}

	.submission-status {
		margin-inline-start: 15px;
		line-height: 39px;
	}

	.submission-status.is-hidden {
		display: none;
	}

	.submission-status.is-success {
		color: #0fa953;
	}

	.submission-status.is-error {
		color: tomato;
	}
}

// Featured products
.featured-products-banner {
	img {
		border: 1px solid #ddd;
		max-width: 100%;
	}
}

.kirki-featured-products {
	> h2 {
		text-align: center;
		margin-bottom: 50px;
		font-size: 24px;
	}

	.products {
		display: flex;
		justify-content: space-between;

		li {
			width: 32%;
		}

		.subheadline {
			font-weight: 600;
			margin-top: -6px;
		}

		img {
			max-width: 100%;
		}
	}

	.credit {
		margin-top: 20px;
		text-align: center;
		opacity: 0.5;
	}
}

// Heatbox adjustment
.heatbox {
	position: relative;

	.checkbox-label {
		.is-disabled {
			opacity: 0.6;
		}
	}

	.heatbox-overlay.is-hidden {
		display: none;
	}

	.heatbox-overlay {
		position: absolute;
		top: 0;
		left: 0;
		background-color: rgba(0, 0, 0, 0.1);
		width: 100%;
		height: 100%;
		z-index: 100;
	}
}

// Kirki PRO
.pro-extensions-banner-link {
	display: block;
	margin-bottom: 20px;
	box-shadow: none !important;
}

.pro-extensions-banner {
	max-width: 100%;
	border: 1px solid #ddd;
}

.pro-extensions-list {
	margin: 0;

	li {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		margin: 0;
		padding: 25px 20px;
		border-bottom: 1px solid #ddd;

		&:last-child {
			border: none;
			background: #f9f9f9;

			h3 {
				margin-bottom: 10px;
			}

			p {
				margin-bottom: 0;
			}
		}

		div {
			flex: 0 50%;
		}

		h3 {
			display: inline-block;
			margin-bottom: 0;
			font-weight: 400;
		}

		p {
			font-size: 16px;
		}
	}

	.tooltip {
		position: relative;
		display: inline-block;
		cursor: pointer;
		color: #ccc;
		margin-inline-start: 8px;

		&:hover {
			color: #0073aa;

			p {
				opacity: 1;
				z-index: 1;
			}
		}

		p {
			z-index: -1;
			opacity: 0;
			position: absolute;
			bottom: 15px;
			left: -40px;
			width: 250px;
			background: #fff;
			padding: 15px;
			border: 1px solid #ddd;
			color: initial;
			-webkit-box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.15);
			-moz-box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.15);
			box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.15);
			border-radius: 4px;
		}
	}
}

.pro-extensions-list-icon {
	text-align: right;
	color: #47d87c;
	left: 0;
	bottom: 0;

	i {
		margin-inline-end: 20px;
		position: relative;
	}

	strong {
		padding: 2px 4px;
		border-radius: 4px;
		background: #47d87c;
		color: #fff;
		line-height: 1;
		margin: 0 10px;
		font-size: 12px;
	}
	.button-larger {
		padding: 10px 30px;
	}
}

// Recommended plugins
.kirki-recommended-list {
	display: flex;
	flex-wrap: wrap;
	margin: 0;

	li {
		display: flex;
		flex-direction: column;
		flex: 0 49%;
		margin-inline-end: 2%;

		&:nth-child(even) {
			margin-inline-end: 0;
		}

		& > a {
			box-shadow: none;
		}
	}

	img {
		max-width: 100%;
	}
}

.kirki-recommended-content {
	padding: 20px;
	flex: 1 0 auto;
	min-height: 150px;

	p {
		font-size: 16px;
	}
}

.kirki-recommended-status {
	display: flex;
	align-items: center;
	padding: 20px;
	background: #f9f9f9;
	border-top: 1px solid #ddd;

	div {
		flex: 0 50%;
	}
}

.kirki-recommended-status-icon {
	text-align: right;
	color: #aaa;

	&.green {
		color: #47d87c;
	}

	i {
		font-size: 22px !important;
	}
}

// Instant installation progress
.installation-progress-metabox {
	&.is-hidden {
		display: none;
	}
}

.installation-info {
	font-size: 14px;
	font-weight: 700;
}

.installation-progress {
	display: flex;
	align-items: center;
	margin-bottom: 10px;

	.progress-icon {
		position: relative;
		margin-inline-end: 4px;
		width: 20px;
		height: 20px;
	}

	&.is-loading {
		.progress-icon {
			display: inline-flex;
			align-items: center;
			justify-content: center;
			color: transparent !important;
			pointer-events: none;

			&::after {
				content: "";
				position: absolute;
				width: 1em;
				display: block;
				height: 1em;
				border: 2px solid #7ab4e3;
				border-color: transparent transparent #2271b1 #2271b1 !important;
				border-radius: 290486px;
				-webkit-animation: loadingSpinAround 0.5s infinite linear;
				animation: loadingSpinAround 0.5s infinite linear;
			}
		}
	}

	&.is-done {
		.progress-icon::before {
			content: "\f147";
			font-family: dashicons;
			color: #47d87c;
			font-size: 20px;
		}
	}

	&.is-failed {
		.progress-icon::before {
			content: "\f158";
			font-family: dashicons;
			color: tomato;
			font-size: 20px;
		}
	}

	.progress-text {
		flex: 1 1 auto;
	}
}
