// Vars
.mediatk-settings-page {
	--mediatk-brand-color: #2764f1;
	--mediatk-danger-color: #47d87c;
}

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

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

.mediatk-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: mediaTkLoadingSpinner 0.5s infinite linear;
			animation: mediaTkLoadingSpinner 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: mediaTkLoadingSpinner 0.5s infinite linear;
				animation: mediaTkLoadingSpinner 0.5s infinite linear;
			}
		}
	}

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

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

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

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

.mediatk-text-field {
	width: 100%;
	max-width: 250px;

	&.is-fullwidth {
		max-width: 100%;
	}

	&.is-large {
		max-width: 400px;
	}
}

.mediatk-dimension-field {
	width: 120px;
}

.mediatk-dimensions {
	display: flex;
	align-items: center;

	.mediatk-dimension {
		width: 120px;

		&:not(:last-child) {
			margin-right: 10px;
		}
	}

	label {
		display: block;
		margin-bottom: 5px;
	}

	.mediatk-dimension-field {
		width: 100%;
	}
}

// Featured products
.mediatk-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;
	}

	.form-table {
		th {
			.description {
				font-weight: 400;
				font-style: italic;
				color: #646970;
			}
		}
	}

	.mediatk-checkbox-label {
		.description {
			font-style: italic;
			color: #646970;
		}
	}

	.radio-label {
		padding-left: 28px;
	}
}

// Misc.
.mediatk-multiline-radio-fields {
	.radio-label {
		display: block;

		&:not(:last-child) {
			margin-bottom: 10px;
		}
	}
}

.mediatk-tags-metabox h2 {
	position: relative;

	.action-status {
		display: inline-block;
		position: absolute;
		right: 20px;
		top: 50%;
		padding: 10px;
		height: 30px;
		line-height: 10px;
		font-size: 11px;
		color: #fff;
		background-color: #444;
		border-radius: 4px;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-50%);
		transition: all 0.3s ease-in-out;

		&.is-shown {
			opacity: 1;
			visibility: visible;
		}
	}
}
