.animated-button {
  position: relative;
  z-index: 999 !important;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0px;
  overflow: hidden;
  max-width: 400px;
  text-decoration: none;
  cursor: pointer;
  border: none !important;

  &__background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--button-bg) 75%, #dddad1 75%);
    transition: all 0.3s ease-in-out;
  }

  &__content {
    position: relative;
    padding: 0.4rem 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 400px;
    z-index: 999;
  }

  &__text {
    font-size: 0.875rem;
    font-family: var(--tertiary-font);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--button-text);
    transition: all 0.3s ease-in-out;
  }

  &__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    color: var(--button-text);
    transition: all 0.3s ease-in-out;
  }

  &__overlay {
    position: absolute;
    inset: 0;
    width: 0;
    background: var(--button-hover);
    opacity: 0.9;
    transition: all 0.3s ease-out;
    z-index: 0;
  }

  .animated-button__icon {
    transform: translateX(-6rem);
  }

  &:hover {
    .animated-button__overlay {
      width: 100%;
    }

    .animated-button__icon {
      transform: translateX(0.5rem);
    }
  }
}
