/* adapted from http://tympanus.net/Development/PageLoadingEffects/ */

@-webkit-keyframes moveRight {
	to { -webkit-transform: translateX(20px); }
}

@keyframes moveRight {
	to { transform: translateX(20px); }
}

@-webkit-keyframes moveLeft {
	to { -webkit-transform: translateX(-20px); }
}

@keyframes moveLeft {
	to { transform: translateX(-20px); }
}

div#page-change-overlay.on:after,
div#page-change-overlay.on:before {
	content: '';
	position: fixed;
	width: 20px;
	height: 20px;
	top: 50%;
	left: 50%;
	margin: -10px 0 0 -10px;
	border-radius: 50%;
	z-index: 1000;
	opacity: 1;
}

div#page-change-overlay.on:after {
	background: $button-background;
	-webkit-transform: translateX(-20px);
	transform: translateX(-20px);
	-webkit-animation: moveRight 0.6s linear infinite alternate;
	animation: moveRight 0.6s linear infinite alternate;
}

div#page-change-overlay.on:before {
	background: darken($button-background, 20%);
	-webkit-transform: translateX(20px);
	transform: translateX(20px);
	-webkit-animation: moveLeft 0.6s linear infinite alternate;
	animation: moveLeft 0.6s linear infinite alternate;
}
