.custom-button {
  background-color: var(--custom-button-default-color);
  border: 1px solid black;
  padding: 0.5rem 1.75rem;
  border-radius: 3rem;
  line-height: 2rem;
  letter-spacing: 1px;
}

.custom-button-wrapper {
  display: flex;
  line-height: 2rem;
}
.custom-button-wrapper * {
  transition: all 250ms ease-in-out;
}

/* Normal State */
.custom-button-wrapper > .custom-button-prefix {
  background-color: var(--custom-button-default-color);
  border: 1px solid black;
  border-radius: 50%;
  transform: scale(0) translateX(0);
  animation-delay: 0.3s;
  animation-duration: 0.5s;
  animation-iteration-count: 3;
  display: grid;
  place-items: center;
  width: 3rem;
  aspect-ratio: 1;
}
.custom-button-wrapper.--up > .custom-button-prefix {
  transform: scale(0) translateX(1rem);
}

.custom-button-wrapper > .custom-button {
  display: grid;
  place-items: center;
  transform: translateX(-1rem);
  cursor:pointer;	
}
.custom-button-wrapper > .custom-button-suffix {
  background-color: var(--custom-button-default-color);
  border: 1px solid black;
  border-radius: 50%;
  transform: scale(1) translateX(-1rem);
  display: grid;
  place-items: center;
  width: 3rem;
  aspect-ratio: 1;
  cursor:pointer;	
}

/* Hover state */
.custom-button-wrapper:hover > .custom-button-prefix {
  transform: scale(1) translateX(1rem);
  animation-name: bounceArrow;
  animation-timing-function: ease-in-out;
  cursor:pointer;
}
.custom-button-wrapper:hover > .custom-button {
  transform: translateX(1rem);
}
.custom-button-wrapper:hover > .custom-button-suffix {
  transform: scale(0);
}
/* Hover state - up*/
.custom-button-wrapper.--up:hover > .custom-button-prefix {
  transform: scale(1) translateY(0rem) translateX(1rem);
  animation-name: bounceArrowUp;
  animation-timing-function: ease-in-out;
}
.custom-button-wrapper.--up:hover > .custom-button {
  transform: translateX(1rem);
}
.custom-button-wrapper.--up:hover > .custom-button-suffix {
  transform: scale(0);
}

@media screen and (min-width: 768px) {
  .custom-button-wrapper {
    line-height: 2rem;
    font-size: 1.25rem;
    letter-spacing: 1px;
  }

}

@media only screen and (max-width: 768px) {
  .custom-button-wrapper > .custom-button-prefix,
  .custom-button-wrapper > .custom-button-suffix {
    display: none;
  }
  .custom-button-wrapper:hover > .custom-button-prefix,
  .custom-button-wrapper:hover > .custom-button-suffix {
    display: none;
  }

  .custom-button-wrapper > .custom-button {
    display: grid;
    place-items: center;
    transform: translateX(0rem);
  }
  .custom-button-wrapper:hover > .custom-button {
    display: grid;
    place-items: center;
    transform: translateX(0rem);
  }
  .custom-button-wrapper > .custom-button-prefix {
    transform: scale(1) translateX(0);
    animation-name: none;
    animation-timing-function: ease-in-out;
  }
  .custom-button-wrapper:hover > .custom-button-prefix {
    transform: scale(1) translateX(0);
    animation-name: none;
    animation-timing-function: ease-in-out;
  }
}



@keyframes bounceArrow {
  0% {
    transform: scale(1) translateX(1rem);
  }
  50% {
    transform: scale(1) translateX(0.5rem);
  }
  100% {
    transform: scale(1) translateX(1rem);
  }
}


@keyframes bounceArrowUp {
  0% {
    transform: scale(1) translateY(0rem) translateX(1rem);
  }
  50% {
    transform: scale(1) translateY(1rem) translateX(1rem);
  }
  100% {
    transform: scale(1) translateY(0rem) translateX(1rem);
  }
}