* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: #FFE177;
  font-family: 'Poppins', sans-serif;
  transition: background 1.3s ease;
}

.body.active {
  background: #628FD6;
  transition: background 1.3s ease;
}

.body.green-bg {
  transition: background 1.3s ease;
  background: #62D47E;
}

.container {
  max-width: 450px;
  max-height: 130px;
  overflow: hidden;
  position: relative;
}


.btn {
  width: 440px;
  height: 130px;
  border-radius: 10px;
  background: #fff;
  color: #000;
  font-size: 20px;
  outline: none;
  border: 0;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
}

.btn .text {
  font-size: 26px;
  padding-left: 125px;
}

.btn:active {
  animation: scale .6s ease-in-out;
}

@keyframes scale {
  50% {
    transform: scale(0.95);
  }

  100% {
    transform: scale(1);
  }
}

.icon {
  width: 130px;
  height: inherit;
  position: absolute;
  top: 0;
  left: 0;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #FFB44C;
}

.icon svg {
  fill: #fff;
  z-index: 100;
}

.icon svg:first-child {
  margin-right: 16px;
}

.icon svg:last-child {
  margin-left: 16px;
}

.btn.active .icon.active {
  width: 440px;
  transition: all 1s ease;
  transition-delay: .4s;
  background: transparent;
}

.btn.active .icon.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  background: #A8C7F7;
  border-radius: 50%;
  transform-origin: 50% 100%;
  animation: bg-icon 6s ease forwards;
}

@keyframes bg-icon {
  0% {
    background: #A8C7F7;
    border-radius: 50%;
    transform-origin: 80px 80px;
    transform: scale(0);
    width: 40px;
    height: 40px;
  }

  5% {
    width: 60px;
    height: 60px;
  }

  30%,
  60%,
  90% {
    background: #A8C7F7;
    border-radius: 8px;
    width: 440px;
    height: 130px;
    transform: scale(1);
  }

  100% {
    transition: background .5s ease;
    background: #01B766;
    border-radius: 8px;
    width: 440px;
    height: 130px;
    transform: scale(1);
  }
}

.clock {
  position: relative;
  height: 50px;
  width: 50px;
  background: #F7F5F7;
  box-sizing: border-box;
  border-radius: 100%;
  border: 5px solid #fff;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  --opacity: 0;
  --tick-opacity: 0;
}

.clock.active {
  animation: clock-anim 8s ease 1s forwards;
}

@keyframes clock-anim {
  0%,
  39% {
    --opacity: 1
  }

  /* 40%,60%,80%, */
  100% {
    --opacity: 0;
    --tick-opacity: 1
  }
}

.clock.active .hour {
  width: 2px;
  height: 40px;
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  opacity: var(--opacity);
  animation: time 2.5s infinite linear;
}

.clock.active .hour:before {
  position: absolute;
  content: "";
  background: #262626;
  height: 20px;
  width: 2px;
  top: 20px;
  left: 0;
  opacity: var(--opacity);
  border-radius: 8px;
}

.clock.active .minute {
  width: 2px;
  height: 40px;
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  opacity: var(--opacity);
  animation: time 1.5s infinite linear;
}

.clock.active .minute:before {
  position: absolute;
  content: "";
  background: #262626;
  height: 18px;
  width: 2px;
  top: 18px;
  left: 0;
  border-radius: 8px;
  opacity: var(--opacity);
}

@keyframes time {
  to {
    transform: rotate(360deg);
  }
}

#tick {
  position: absolute;
  top: -9px;
  left: -2px;
  width: 40px;
  height: 50px;
  margin-left: 0;
}

#tick polyline {
  opacity: 0;
}

#tick polyline.active {
  -webkit-animation: checkmark 0.35s ease-in-out forwards;
  animation: checkmark 0.35s ease-in-out forwards;
}

@keyframes checkmark {
  0% {
    stroke-dashoffset: 100px;
    opacity: 1;
  }

  100% {
    stroke-dashoffset: 0px;
    opacity: 1;
  }
}

.text.active {
  opacity: 0;
  transition: all .5s ease;
}

.icon.fade-top {
  transform: translateY(-140px);
}