@import url("https://fonts.googleapis.com/css?family=Questrial");

body {
  font-family: "Questrial", sans-serif;
}

.outer {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 400px;
  width: 400px;
  margin-top: -200px;
  margin-left: -200px;
  color: #FFFFFF;
  background: #00B8D4;
  border-radius: 2px;
  box-shadow: 1px 2px 10px 0px rgba(0, 0, 0, 0.3);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

.hidden {
  display: none;
}

.button {
  box-sizing: border-box;
  position: absolute;
  display: block;
  width: 260px;
  height: 60px;
  top: 170px;
  left: 70px;
  cursor: pointer;
  border: 2px solid #FFFFFF;
  border-radius: 30px;
  text-align: center;
  line-height: 56px;
  font-size: 20px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 2px;
  transition: all 0.3s ease-in-out;
}
.button:hover {
  background: #26C6DA;
}
.button img {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 15px;
  opacity: 0;
}

.circle {
  position: absolute;
  width: 60px;
  height: 60px;
  z-index: 2;
  top: 170px;
  left: 170px;
  fill: none;
  stroke: #FFFFFF;
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-dasharray: 183 183;
  stroke-dashoffset: 183;
  pointer-events: none;
  transform: rotate(-90deg);
}

input:checked ~ .button {
  animation: button 0.5s ease both, fill 0.5s ease-out 1.5s forwards;
}
input:checked ~ .button img {
  animation: check 0.5s ease-out 1.5s both;
}
input:checked ~ .circle {
  animation: circle 2s ease-out 0.5s both;
}

@keyframes button {
  0% {
    width: 260px;
    left: 70px;
    border-color: #FFFFFF;
    color: #FFFFFF;
  }
  50% {
    color: transparent;
  }
  100% {
    width: 60px;
    left: 170px;
    border-color: #007C91;
    background: transparent;
    color: transparent;
  }
}
@keyframes circle {
  0% {
    stroke-dashoffset: 183;
  }
  50% {
    stroke-dashoffset: 0;
    stroke-dasharray: 183;
    transform: rotate(-90deg) scale(1);
    opacity: 1;
  }
  90%, 100% {
    stroke-dasharray: 500 500;
    transform: rotate(-90deg) scale(2);
    opacity: 0;
  }
}
@keyframes fill {
  0% {
    background: transparent;
    border-color: #FFFFFF;
  }
  100% {
    background: #FFFFFF;
  }
}
@keyframes check {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
