/******************************************************
*                                                     *
*   Async reCAPTCHA - jQuery Plugin                   *
*                                                     *
*   Purpose: This project contains a simple and       *
*            full configurable jQuery plugin which    *
*            asynchronously loads one or multiple     *
*            Google reCAPTCHA v2 instances located    *
*            on a page. The load is triggered when    *
*            the reCAPTCHA is scrolled into viewport. *
*                                                     *
*   Author: Andreas Kar (thex) <andreas.kar@gmx.at>   *
*   Repository: https://git.io/JvyqU                  *
*                                                     *
******************************************************/

/* apply styling on reCAPTCHA container to make it working with spinner */
.g-recaptcha {
  min-height: 78px;
  position: relative;
  z-index: 2;
}

/* Spinner container with same size as reCAPTCHA */
.async-recaptcha-spinner-ctn {
  min-height: 78px;
  display: inline-block;
  position: absolute;
  min-width: 304px;
}

/* Default styles for centering spinner and built-in spinner */
.async-recaptcha-spinner {
  position: absolute !important;
  margin: auto !important;
  top:0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

/* credits @ https://www.w3schools.com/howto/howto_css_loader.asp */
.async-recaptcha-spinner.simple-spinner {
  border: 0.25em solid #f3f3f3;
  border-radius: 50%;
  border-top: 0.25em solid #000;
  width: 2rem;
  height: 2rem;
  -webkit-animation: simple-spin 0.75s linear infinite; /* Safari */
  animation: simple-spin 0.75s linear infinite;
}

/* Safari */
@-webkit-keyframes simple-spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes simple-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Loading.io CSS spinner, credits @ https://github.com/loadingio/css-spinner/ */

/* circle */
.async-recaptcha-spinner.lds-circle {
  display: inline-block;
  width: 32px;
  height: 32px;
  margin: 8px;
  border-radius: 50%;
  background: #000;
  animation: lds-circle 2.4s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

/* default */
.async-recaptcha-spinner.lds-default {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  transform: scale(0.5);
}
.async-recaptcha-spinner.lds-default div {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #000;
  border-radius: 50%;
  animation: lds-default 1.2s linear infinite;
}
.async-recaptcha-spinner.lds-default div:nth-child(1) {
  animation-delay: 0s;
  top: 37px;
  left: 66px;
}
.async-recaptcha-spinner.lds-default div:nth-child(2) {
  animation-delay: -0.1s;
  top: 22px;
  left: 62px;
}
.async-recaptcha-spinner.lds-default div:nth-child(3) {
  animation-delay: -0.2s;
  top: 11px;
  left: 52px;
}
.async-recaptcha-spinner.lds-default div:nth-child(4) {
  animation-delay: -0.3s;
  top: 7px;
  left: 37px;
}
.async-recaptcha-spinner.lds-default div:nth-child(5) {
  animation-delay: -0.4s;
  top: 11px;
  left: 22px;
}
.async-recaptcha-spinner.lds-default div:nth-child(6) {
  animation-delay: -0.5s;
  top: 22px;
  left: 11px;
}
.async-recaptcha-spinner.lds-default div:nth-child(7) {
  animation-delay: -0.6s;
  top: 37px;
  left: 7px;
}
.async-recaptcha-spinner.lds-default div:nth-child(8) {
  animation-delay: -0.7s;
  top: 52px;
  left: 11px;
}
.async-recaptcha-spinner.lds-default div:nth-child(9) {
  animation-delay: -0.8s;
  top: 62px;
  left: 22px;
}
.async-recaptcha-spinner.lds-default div:nth-child(10) {
  animation-delay: -0.9s;
  top: 66px;
  left: 37px;
}
.async-recaptcha-spinner.lds-default div:nth-child(11) {
  animation-delay: -1s;
  top: 62px;
  left: 52px;
}
.async-recaptcha-spinner.lds-default div:nth-child(12) {
  animation-delay: -1.1s;
  top: 52px;
  left: 62px;
}

/* dual ring */
.async-recaptcha-spinner.lds-dual-ring {
  display: inline-block;
  width: 80px;
  height: 80px;
  transform: scale(0.5);
}
.async-recaptcha-spinner.lds-dual-ring:after {
  content: " ";
  display: block;
  width: 64px;
  height: 64px;
  margin: 8px;
  border-radius: 50%;
  border: 6px solid #000;
  border-color: #000 transparent #000 transparent;
  animation: lds-dual-ring 1.2s linear infinite;
}

/* ellipsis */
.async-recaptcha-spinner.lds-ellipsis {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  transform: scale(0.5);
}
.async-recaptcha-spinner.lds-ellipsis div {
  position: absolute;
  top: 33px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #000;
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.async-recaptcha-spinner.lds-ellipsis div:nth-child(1) {
  left: 8px;
  animation: lds-ellipsis1 0.6s infinite;
}
.async-recaptcha-spinner.lds-ellipsis div:nth-child(2) {
  left: 8px;
  animation: lds-ellipsis2 0.6s infinite;
}
.async-recaptcha-spinner.lds-ellipsis div:nth-child(3) {
  left: 32px;
  animation: lds-ellipsis2 0.6s infinite;
}
.async-recaptcha-spinner.lds-ellipsis div:nth-child(4) {
  left: 56px;
  animation: lds-ellipsis3 0.6s infinite;
}

/* facebook */
.async-recaptcha-spinner.lds-facebook {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  transform: scale(0.5);
}
.async-recaptcha-spinner.lds-facebook div {
  display: inline-block;
  position: absolute;
  left: 8px;
  width: 16px;
  background: #000;
  animation: lds-facebook 1.2s cubic-bezier(0, 0.5, 0.5, 1) infinite;
}
.async-recaptcha-spinner.lds-facebook div:nth-child(1) {
  left: 8px;
  animation-delay: -0.24s;
}
.async-recaptcha-spinner.lds-facebook div:nth-child(2) {
  left: 32px;
  animation-delay: -0.12s;
}
.async-recaptcha-spinner.lds-facebook div:nth-child(3) {
  left: 56px;
  animation-delay: 0;
}

/* grid */
.async-recaptcha-spinner.lds-grid {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  transform: scale(0.5);
}
.async-recaptcha-spinner.lds-grid div {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #000;
  animation: lds-grid 1.2s linear infinite;
}
.async-recaptcha-spinner.lds-grid div:nth-child(1) {
  top: 8px;
  left: 8px;
  animation-delay: 0s;
}
.async-recaptcha-spinner.lds-grid div:nth-child(2) {
  top: 8px;
  left: 32px;
  animation-delay: -0.4s;
}
.async-recaptcha-spinner.lds-grid div:nth-child(3) {
  top: 8px;
  left: 56px;
  animation-delay: -0.8s;
}
.async-recaptcha-spinner.lds-grid div:nth-child(4) {
  top: 32px;
  left: 8px;
  animation-delay: -0.4s;
}
.async-recaptcha-spinner.lds-grid div:nth-child(5) {
  top: 32px;
  left: 32px;
  animation-delay: -0.8s;
}
.async-recaptcha-spinner.lds-grid div:nth-child(6) {
  top: 32px;
  left: 56px;
  animation-delay: -1.2s;
}
.async-recaptcha-spinner.lds-grid div:nth-child(7) {
  top: 56px;
  left: 8px;
  animation-delay: -0.8s;
}
.async-recaptcha-spinner.lds-grid div:nth-child(8) {
  top: 56px;
  left: 32px;
  animation-delay: -1.2s;
}
.async-recaptcha-spinner.lds-grid div:nth-child(9) {
  top: 56px;
  left: 56px;
  animation-delay: -1.6s;
}

/* heart */
.async-recaptcha-spinner.lds-heart {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  transform: rotate(45deg) scale(0.5);
  transform-origin: 40px 40px;
}
.async-recaptcha-spinner.lds-heart div {
  top: 32px;
  left: 32px;
  position: absolute;
  width: 32px;
  height: 32px;
  background: #000;
  animation: lds-heart 1.2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}
.async-recaptcha-spinner.lds-heart div:after,
.async-recaptcha-spinner.lds-heart div:before {
  content: " ";
  position: absolute;
  display: block;
  width: 32px;
  height: 32px;
  background: #000;
}
.async-recaptcha-spinner.lds-heart div:before {
  left: -24px;
  border-radius: 50% 0 0 50%;
}
.async-recaptcha-spinner.lds-heart div:after {
  top: -24px;
  border-radius: 50% 50% 0 0;
}

/* hourglass */
.async-recaptcha-spinner.lds-hourglass {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  transform: scale(0.5);
}
.async-recaptcha-spinner.lds-hourglass:after {
  content: " ";
  display: block;
  border-radius: 50%;
  width: 0;
  height: 0;
  margin: 8px;
  box-sizing: border-box;
  border: 32px solid #000;
  border-color: #000 transparent #000 transparent;
  animation: lds-hourglass 1.2s infinite;
}

/* ring */
.async-recaptcha-spinner.lds-ring {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  transform: scale(0.5);
}
.async-recaptcha-spinner.lds-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 64px;
  height: 64px;
  margin: 8px;
  border: 8px solid #000;
  border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: #000 transparent transparent transparent;
}
.async-recaptcha-spinner.lds-ring div:nth-child(1) {
  animation-delay: -0.45s;
}
.async-recaptcha-spinner.lds-ring div:nth-child(2) {
  animation-delay: -0.3s;
}
.async-recaptcha-spinner.lds-ring div:nth-child(3) {
  animation-delay: -0.15s;
}

/* ripple */
.async-recaptcha-spinner.lds-ripple {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  transform: scale(0.5);
}
.async-recaptcha-spinner.lds-ripple div {
  position: absolute;
  border: 4px solid #000;
  opacity: 1;
  border-radius: 50%;
  animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
.async-recaptcha-spinner.lds-ripple div:nth-child(2) {
  animation-delay: -0.5s;
}

/* roller */
.async-recaptcha-spinner.lds-roller {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  transform: scale(0.6);
}
.async-recaptcha-spinner.lds-roller div {
  animation: lds-roller 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  transform-origin: 40px 40px;
}
.async-recaptcha-spinner.lds-roller div:after {
  content: " ";
  display: block;
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #000;
  margin: -4px 0 0 -4px;
}
.async-recaptcha-spinner.lds-roller div:nth-child(1) {
  animation-delay: -0.036s;
}
.async-recaptcha-spinner.lds-roller div:nth-child(1):after {
  top: 63px;
  left: 63px;
}
.async-recaptcha-spinner.lds-roller div:nth-child(2) {
  animation-delay: -0.072s;
}
.async-recaptcha-spinner.lds-roller div:nth-child(2):after {
  top: 68px;
  left: 56px;
}
.async-recaptcha-spinner.lds-roller div:nth-child(3) {
  animation-delay: -0.108s;
}
.async-recaptcha-spinner.lds-roller div:nth-child(3):after {
  top: 71px;
  left: 48px;
}
.async-recaptcha-spinner.lds-roller div:nth-child(4) {
  animation-delay: -0.144s;
}
.async-recaptcha-spinner.lds-roller div:nth-child(4):after {
  top: 72px;
  left: 40px;
}
.async-recaptcha-spinner.lds-roller div:nth-child(5) {
  animation-delay: -0.18s;
}
.async-recaptcha-spinner.lds-roller div:nth-child(5):after {
  top: 71px;
  left: 32px;
}
.async-recaptcha-spinner.lds-roller div:nth-child(6) {
  animation-delay: -0.216s;
}
.async-recaptcha-spinner.lds-roller div:nth-child(6):after {
  top: 68px;
  left: 24px;
}
.async-recaptcha-spinner.lds-roller div:nth-child(7) {
  animation-delay: -0.252s;
}
.async-recaptcha-spinner.lds-roller div:nth-child(7):after {
  top: 63px;
  left: 17px;
}
.async-recaptcha-spinner.lds-roller div:nth-child(8) {
  animation-delay: -0.288s;
}
.async-recaptcha-spinner.lds-roller div:nth-child(8):after {
  top: 56px;
  left: 12px;
}

/* spinner */
.async-recaptcha-spinner.lds-spinner {
  color: official;
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  transform: scale(0.5);
}
.async-recaptcha-spinner.lds-spinner div {
  transform-origin: 40px 40px;
  animation: lds-spinner 1.2s linear infinite;
}
.async-recaptcha-spinner.lds-spinner div:after {
  content: " ";
  display: block;
  position: absolute;
  top: 3px;
  left: 37px;
  width: 6px;
  height: 18px;
  border-radius: 20%;
  background: #000;
}
.async-recaptcha-spinner.lds-spinner div:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: -1.1s;
}
.async-recaptcha-spinner.lds-spinner div:nth-child(2) {
  transform: rotate(30deg);
  animation-delay: -1s;
}
.async-recaptcha-spinner.lds-spinner div:nth-child(3) {
  transform: rotate(60deg);
  animation-delay: -0.9s;
}
.async-recaptcha-spinner.lds-spinner div:nth-child(4) {
  transform: rotate(90deg);
  animation-delay: -0.8s;
}
.async-recaptcha-spinner.lds-spinner div:nth-child(5) {
  transform: rotate(120deg);
  animation-delay: -0.7s;
}
.async-recaptcha-spinner.lds-spinner div:nth-child(6) {
  transform: rotate(150deg);
  animation-delay: -0.6s;
}
.async-recaptcha-spinner.lds-spinner div:nth-child(7) {
  transform: rotate(180deg);
  animation-delay: -0.5s;
}
.async-recaptcha-spinner.lds-spinner div:nth-child(8) {
  transform: rotate(210deg);
  animation-delay: -0.4s;
}
.async-recaptcha-spinner.lds-spinner div:nth-child(9) {
  transform: rotate(240deg);
  animation-delay: -0.3s;
}
.async-recaptcha-spinner.lds-spinner div:nth-child(10) {
  transform: rotate(270deg);
  animation-delay: -0.2s;
}
.async-recaptcha-spinner.lds-spinner div:nth-child(11) {
  transform: rotate(300deg);
  animation-delay: -0.1s;
}
.async-recaptcha-spinner.lds-spinner div:nth-child(12) {
  transform: rotate(330deg);
  animation-delay: 0s;
}

/* Loading.io CSS spinner animations */

/* circle */
@keyframes lds-circle {
  0%, 100% {
    animation-timing-function: cubic-bezier(0.5, 0, 1, 0.5);
  }
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(1800deg);
    animation-timing-function: cubic-bezier(0, 0.5, 0.5, 1);
  }
  100% {
    transform: rotateY(3600deg);
  }
}

/* default */
@keyframes lds-default {
  0%, 20%, 80%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.5);
  }
}

/* dual ring */
@keyframes lds-dual-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ellipsis */
@keyframes lds-ellipsis1 {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes lds-ellipsis3 {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}
@keyframes lds-ellipsis2 {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(24px, 0);
  }
}

/* facebook */
@keyframes lds-facebook {
  0% {
    top: 8px;
    height: 64px;
  }
  50%, 100% {
    top: 24px;
    height: 32px;
  }
}

/* grid */ 
@keyframes lds-grid {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* heart */
@keyframes lds-heart {
  0% {
    transform: scale(0.95);
  }
  5% {
    transform: scale(1.1);
  }
  39% {
    transform: scale(0.85);
  }
  45% {
    transform: scale(1);
  }
  60% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(0.9);
  }
}

/* hourglass */
@keyframes lds-hourglass {
  0% {
    transform: rotate(0);
    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
  }
  50% {
    transform: rotate(900deg);
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }
  100% {
    transform: rotate(1800deg);
  }
}

/* ring */
@keyframes lds-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ripple */
@keyframes lds-ripple {
  0% {
    top: 36px;
    left: 36px;
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    top: 0px;
    left: 0px;
    width: 72px;
    height: 72px;
    opacity: 0;
  }
}

/* roller */
@keyframes lds-roller {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* spinner */
@keyframes lds-spinner {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}