/**
 * Riode Wizard CSS
 */

@import '../theme/mixins';
@import '../theme/direction';

$primary-color: #27c;

@keyframes spin {
	0% { transform: none; }
	to { transform: rotate(360deg); }
}

.riode-inline-loading {
	#{$left}: calc(50% - 17px);
	top: calc(50% - 17px);
	width: 34px;
	height: 34px;
	border: 2px solid transparent;
	border-top-color: #27c;
	border-radius: 50%;
	animation: spin .75s infinite linear;

	&:before {
		content: '';
		top: -2px;
		left: -4px;
		position: absolute;
		width: inherit;
		height: inherit;
		border: inherit;
		border-radius: inherit;
		animation: spin 1.5s infinite ease;
	}
}

/**
 * Button Component
 */
.btn {
	color: #ffffff;
	text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
	border: 1px solid;
	cursor: pointer;
	border-radius: 4px;
	padding: 6px 12px;
	transition: .3s;
	width: 100%;

	&:hover,
	&:focus {
		outline: none;
		box-shadow: none;
	}
}
.btn:disabled {
	cursor: default;
}
.btn-primary {
	background-color: #27c;
	border-color: #27c;

	&:hover,
	&:focus {
		background-color: #23282d;
		border-color: #23282d;
	}
}
.btn-secondary {
	background-color: #a6c76c;
	border-color: #a6c76c;

	&:hover,
	&:focus {
		background-color: #90b948;
		border-color: #90b948;
	}
}
.btn-dark {
	background-color: #23282d;
	border-color: #23282d;

	&:hover,
	&:focus {
		color: #23282d;
		background-color: #eeeef1;
		border-color: #eeeef1;
	}
}
.btn-primary[disabled] {
	background-color: #27c;
	border-color: #27c;
	pointer-events: none;
}
.btn-primary[disabled]:hover, .btn-primary[disabled]:focus, .btn-primary[disabled]:active {
	background-color: #27c;
	border-color: #27c;
}
.btn-quaternary {
	color: #333;
	text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
	background-color: #eee;
	border: 1px solid;
	border-color: #eee;
}
.btn-quaternary:not(:disabled):hover, .btn-quaternary:not(:disabled):focus, .btn-quaternary:not(:disabled):active {
	color: #ffffff;
	background-color: #90b948;
	border-color: #90b948;
	box-shadow: none
}
.riode-optimize-resources p {
	margin: 7px 0 15px;
}

/**
 * Setup Wizard / Plugins Tab
 * Optimize Wizard / Plugins Tab
 */
.riode-plugins {
	margin-top: 30px;
	.button-load-plugins > * {
		vertical-align: middle;
	}
	li {
		margin-bottom: 17px;
	}
	.spinner {
		float: none;
		margin-top: 0;
	}
	.installing .spinner {
		visibility: visible;
	}
	li .checkbox span {
		margin-left: 10px;
	}
	label {
		font-weight: 700;
	}
	.info {
		color: #23282d;
		font-weight: 400;

		&:before {
			content: '|';
			font-size: 14px;
			margin: 0 10px 5px;
		}
	}
	li p a {
		margin-right: 5px;
		color: #27c;
		text-decoration: underline;
	}
}

/**
 * Setup Wizard / Demos
 */
.riode_page_riode-setup-wizard {
	.mfp-bg {
		background: #000;
		opacity: .8;
	}
}

.riode-install-demos {
	label {
		font-size: 12px;
		font-weight: 500;
		color: #777;
	}
	.button-upload {
		margin-bottom: 7px;
	}
	.theme-name {
		font-size: 14px;
		font-weight: 400;
		text-transform: uppercase;
		white-space: nowrap;
		text-align: center;
		height: 18px;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		margin: 8px 0 0 0;
		padding: 8px 0;
		transition: color .3s;
	}
	.plugins-used {
		display: none;
	}
}

#theme-install-demos {
	display: flex;
	flex-wrap: wrap;
	margin: -10px -30px;
	padding: 30px 20px;

	.theme {
		padding: 0 10px;
		margin: 0 0 30px 0;
		width: calc(25% - 10px);
		border: none;
		box-shadow: none;
		box-sizing: border-box;
		cursor: pointer;
	}

	&::-webkit-scrollbar {
		height: 10px;
		width: 7px;
	}
	&::-webkit-scrollbar-thumb {
		background: #ebebeb;
		border-radius: 10px;
	}
	&::-webkit-scrollbar-track {
		background: #fff;
		border-radius: 10px;
		margin: 8px;
		width : 100%;
	}
}
@media (max-width: 1599px) {
	#theme-install-demos .theme {
		width: calc(33.3333% - 15px);
	}
}

@media (max-width: 1199px) {
	#theme-install-demos .theme {
		width: calc(50% - 20px);
	}
	.demo-sort-filters ul li {
		margin-#{$right}: 18px;
	}
}

.theme-wrapper:hover {
	.theme-screenshot {
		box-shadow: none;
	}
	.theme-name {
		color: #27c;
	}
}

.theme-screenshot {
	display: block;
	width: 100%;
	height: 200px;
	object-fit: cover;
	object-position: center top;
	background: #f4f4f4;
	border: 1px solid #ebebeb;
	box-shadow: 0 0 40px rgba(0,0,0,.1);
	transition: box-shadow .3s;
}

.riode-install-demo {
	.theme-screenshot {
		height: 250px;
	}
}

.theme-import-panel {
	flex: 0 0 100%;
	max-width: 100%;

	.demo-plugin {
		position: relative;
		font-size: 16px;
		float: #{$right};
		background: #f4f4f4;
		padding-#{$left}: 10px;
		box-shadow: none;
		outline: none;
		&.installed {
			pointer-events: none;
		}
		&.installing::before {
			display: inline-block;
			font: 400 20px/1 dashicons;
			-webkit-font-smoothing: antialiased;
			-moz-osx-font-smoothing: grayscale;
			vertical-align: top;
			content: "\f463";
			animation: rotation 2s infinite linear;
		}
	}

	.plugins-used .thumb+div {
		position: relative;

		h5 {
			display: inline-block;
			position: relative;
			padding-#{$right}: 10px;
			z-index: 1;
			background: #f4f4f4;
		}
		&::before {
			content: "";
			width: 100%;
			height: 1px;
			border-bottom: 1px dotted #9b9b9b;
			position: absolute;
			left: 0;
			bottom: 20px;
			z-index: 0;
		}
	}
}

.riode-install-demo-row {
	display: flex;
	flex-wrap: wrap;
	padding: 30px 20px 10px;

	> div {
		padding: 0 10px;
		box-sizing: border-box;
	}
}


.riode-install-demo {
	position: relative;
	max-width: 560px;
	margin: auto;
	font-size: 14px;
	background: #f4f4f4;
	border-radius: 5px;

	.mfp-close {
		width: 50px;
		height: 50px;
		font-size: 32px;
		font-family: inherit;
		padding-bottom: 5px;

		&:before {
			content: "";
			display: block;
			border-left: 1px solid #ccc;
			height: 16px;
			position: absolute;
			left: 0;
			top: 50%;
			margin-top: -8px;
		}
	}

	strong {
		display: block;
		line-height: 2;
	}

	img {
		max-width: 100%;
	}

	h3 {
		margin: 1em 0;
		text-align: center;
	}
	
	h3.text-left {
		text-align: left;
	}

	.theme-screenshot {
		box-shadow: none;
	}
	input[type=radio] {
		margin: -.25rem .25rem 0 0;
	}
	input[type=checkbox] {
		margin-left: 0;
	}
	.plugins-used {
		padding: 0;
		margin: 0 0 20px;

		> li {
			display: table;
			width: 100%;
			height: 40px;

			> * {
				display: table-cell;
				vertical-align: middle;
			}
		}
		.thumb {
			width: 40px;
			padding-#{$right}: 8px;
			text-align: center;
		}
		h5 {
			font-size: 14px;
			margin: 0 0 4px 0;
		}
		p {
			padding-bottom: 15px;
		}
	}

	[data-plugin="js_composer"] img {
		max-width: 29px;
	}
}

.riode-install-section {
	display: flex;
	flex-wrap: wrap;

	& > div {
		flex: 1;
		padding: 0 10px 20px;
	}

	h3 {
		text-align: left;
		margin-top: 0;
	}

	label {
		display: block;
	}

	.notice-alt {
		line-height: 1.7;
	}
}

.riode-install-demo-header {
	padding: 1.35em;
	background: #fff;
	box-shadow: 0 0 20px rgba(0,0,0,0.1);
	border: 0;
	border-radius: 3px;

	h2 {
		margin: 0;
		padding-#{$left}: 30px;
		font-size: 15px;
		line-height: 1;
		font-weight: 700;
		text-transform: capitalize;
	}
	.riode-mini-logo {
		margin: 4px 0 0 -17px;
		@if is_rtl() {
			margin-right: -20px;
		}
		position: absolute;
		color: #27c;

		&:before {
			box-shadow: -3px 3px 0 6px;
			width: 6px;
			height: 6px;
		}
	}
}

.riode-install-options {
	label {
		display: block;
		margin-bottom: 8px;
	}

	.btn-activate {
		display: inline-block;
		box-sizing: border-box;
		text-decoration: none;
		text-align: center;
		margin-bottom: 20px;
	}
}

.riode-installing-options {
	margin-top: 20px;

	> div {
		display: none;
		position: relative;
		padding-left: 30px;
		margin-bottom: 5px;
		line-height: 24px;
	}
	> .prepare,
	> .installing,
	> .installed {
		display: block;
	}

	.riode-loading {
		position: absolute;
		left: 0;
		width: 16px;
		height: 16px;

		&:after {
			content: "\f111";
			font-family: var(--fa-style-family-classic,"Font Awesome 6 Free");
			font-weight: 100;
			font-size: 20px;
			color: #27c;
			transition: opacity .3s;
			display: block;
		}
	}

	.installing .riode-loading {
		border: 2px solid transparent;
		border-top-color: #27c;
		border-radius: 50%;
		animation: spin .75s infinite linear;
	
		&:before {
			content: '';
			top: -2px;
			left: -2px;
			position: absolute;
			width: inherit;
			height: inherit;
			border: inherit;
			border-radius: inherit;
			animation: spin 1.5s infinite ease;
		}
		&:after {
			opacity: 0;
			margin: -4px 0 0 -2px;
		}
	}

	.installed .riode-loading:after {
		content: "\f058";
	}
}

.riode-install-editors {
	display: flex;
	justify-content: center;
	margin-bottom: 12px;
	label {
		min-width: auto;
		margin-#{$right}: 0;
	}
	input {
		position: absolute;
		visibility: hidden;
	}
	img {
		box-shadow: 0 0 20px rgba(0,0,0,0.1);
		max-width: 80px;
		border-radius: 50%;
		padding: 15px;
		background: #fff;
		transform: scale(0.6);
		transition: transform .2s;
	}
	input:checked + img {
		transform: scale(0.8);
	}
}
.import-progress-bar {
	margin-top: 10px;
	background: #ccc;
	width: 100%;
	height: 20px;
	border: 1px solid #ccc;
}

.import-progress-bar div {
	background: #27c;
	height: 20px;
}

.riode-setup-demo-content {
	.riode-admin-panel-row {
		align-items: center;
	}
}
.riode-setup-demo-header {
	flex: 1;

	p.lead {
		margin-top: 0;
	}
}

.logo-select {
	margin-#{$right}: 2rem;

	label {
		margin-#{$right}: 1rem;
	}
}

#current-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	border: 1px solid #e3e3e3;
	background: #f4f4f4;
	border-radius: 4px;
	width: 200px;
	height: 90px;
}

/**
 * Riode Card - for Optimize Wizard / Widgets Step
 */
.riode-used-elements-form .loading-overlay {
	min-height: 40px;
}
.riode-card {
	margin-bottom: 15px;
	border-bottom: 1px solid #ebebeb;
}

.riode-card-header {
	margin-bottom: 0;
	padding-bottom: 15px;
	cursor: pointer;
	
	.toggle {
		display: inline-block;
		vertical-align: middle;
		position: relative;
		width: 24px;
		height: 24px;
		border-radius: 3px;
		border: 1px solid #e1e2e8;
		color: #5b636b;
		font-size: 12px;
		box-shadow: inset 0 1px 2px rgba(0,0,0,0.07);
		line-height: 24px;
		transition: border-color .3s;
		margin-#{$left}: 5px;
		text-align: center;

		&:before {
			content: '';
			font-family: var(--fa-style-family-classic,"Font Awesome 6 Free");
			font-weight: 900;
			font-size: 14px;
			font-weight: 900;
			position: absolute;
			#{$left}: 0;
			width: 100%;
			height: 100%;
			top: 0;
			margin: 0;
			line-height: 22px;
			color: #27c;
		}

		&:not(.all):not(.none):before {
			width: 12px;
			height: 12px;
			border-radius: 2px;
			background-color: #27c;
			left: 50%;
			top: 50%;
			transform: translate(-50%, -50%);
		}

		&.all {
			border-color: #27c;
			&:before {
				content: '\f00c';
			}
		}
		&.none:before {
			content: '';
		}
	}

	h3 {
		display: inline-block;
		margin: 0;
		font-size: 17px;
		font-weight: 500;
	}
	.spinner {
		position: absolute;
	}

	.checkbox-inline {
		font-weight: 500;
		line-height: 25px;

		&:not(.checkbox-toggle) {
			font-size: 13px;
			input[type="checkbox"] {
				width: 20px;
				height: 20px;
			}
			input[type="checkbox"]:before {
				line-height: 20px;
				font-size: 12px;
			}
		}
	}
	.checkbox-toggle {
		float: #{$right};
	}
	&:last-of-type {
		border: none;
	}
}

.riode-card-list {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -5px;
	padding: 0 0 15px;

	.riode-card & > * {
		padding: 6px 5px;
		flex: 0 0 25%;
		max-width: 25%;
		box-sizing: border-box;
	}
}

.riode-remove-demo {
	max-width: 500px;
	margin: auto;
	font-size: .875rem;
	background: #f4f4f4;
	border-radius: 5px;
	label {
		margin-bottom: .5rem
	}
}

.remove-status > h5 {
	font-size: .875rem;
	position: relative;
	&.riode-installing-options {
		padding-#{$left}: 28px;
	}
	&.success {
		color: #27c;
	}
}

@media (max-width: 1599px) {
	.riode-card .riode-card-list > * {
		flex: 0 0 33.3333%;
		max-width: 33.3333%;
	}
}

@media (max-width: 1199px) {
	.riode-card .riode-card-list > * {
		flex: 0 0 50%;
		max-width: 50%;
	}
}

@media (max-width: 767px) {
	.riode-card .riode-card-list > * {
		flex: 0 0 50%;
		max-width: 50%;
	}
	.riode-install-demo {
		max-width: 500px;
	}
	.riode-install-editors {
		display: flex;
		justify-content: space-between;

		label {
			flex: 0 0 45%;
			max-width: 45%;
			min-width: auto;
		}
	}

	.riode-install-demo-row h3 {
		margin: side-values( 2rem 0 0.5rem );
	}
	.riode-install-section>div {
		flex: 0 0 auto;
		max-width: 100%;
	}
}
// Wizard Style
.riode-resource-steps {
	margin: 10px 0 20px;
	border-bottom: 1px solid #ebebeb;
	color: #32373c;
	font-weight: 600;
	letter-spacing: -.05em;
	text-transform: uppercase;

	li {
		display: inline-block;
		position: relative;
		margin: 0;
		margin-#{$right}: 18px;

		> a {
			display: block;
			padding: 15px 0;
		}
	}
	a {
		color: inherit;
		text-decoration: none;
	}
	.active, .done {
		color: $primary-color;
	}
	li.done::after {
		color: inherit;
	}
	.active:before {
		content: '';
		position: absolute;
		bottom: 0;
		width: 100%;
		border-bottom: 4px solid $primary-color;
	}
	li:not(:last-child) {
		margin-#{$right}: 36px;
		&:after {
			content: '\f105';
			position: absolute;
			top: 50%;
			#{$right}: -23px;
			line-height: 0;
			color: #ccc;
			font-family: var(--fa-style-family-classic,"Font Awesome 6 Free");
		}
	}
}

// Installed Plugins
.installed-plugins {
	max-width: 850px;
	border: 1px solid #e1e1e1;
	border-radius: 5px;
	li {
		margin-bottom: 0;
		padding: 7px;
		a, span {
			float: #{$right};
		}

		&:nth-child(2n) {
			background: #f4f4f4;
		}
	}
	.plugins-label {
		padding: 10px 7px;
		font-weight: 700;
	}
}

.riode-admin-panel-body {
	position: relative;
	.speed-optimize-icon {
		position: absolute;
		top: 40px;
		#{$left}: 40px;
		display: block;
		width: 80px;
		height: 80px;
		font-size: 50px;
		line-height: 80px;
		text-align: center;
		border-radius: 50%;
		border: 5px solid #666;
		color: #666;
		&::before {
			position: relative;
			top: 5px;
			#{$left}: -4px;
		}
		&::after {
			content: ' ';
			position: absolute;
			left: 2px;
			right: 2px;
			top: 2px;
			bottom: 2px;
			border: 2px solid #666;
			border-radius: 50%;
		}
	}

	.riode-setup-next-steps-first {
		margin-bottom: 20px;
		max-width: 850px;
	}
}
.wizard-comments-form {
	.form-control {
		display: block;
		margin-bottom: 20px;
		width: 100%;
		height: 300px;
		border-color: #e1e1e1
	}
}

// Template Optimize
.riode-admin-panel-body .layout-items,
.riode-admin-panel-body .sidebar-items {
	max-width: 800px;
	border: 1px solid #eee;
	border-radius: 2px;

	input,
	span {
		float: $right;
	}

	li {
		margin-bottom: 0;
		padding: 8px 5px 8px 10px;
		&:nth-child(2n) {
			background: #f4f4f4;
		}
	}
}

/* Helper Class*/
.d-none {
	display: none !important;
}
.d-block {
	display: block !important;
}
