.btn_border_animation {
  position: relative;
  &::after,
  &::before {
    position: absolute;
    content: "";
    transition: all 0.3s ease-in-out;
  }
  &::before {
    background-color: #fff;
    top: 0;
    right: 0;
    width: 0%;
    height: 2px;
  }
  &::after {
    background-color: #fff;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
  }

  span {
    &::after,
    &::before {
      position: absolute;
      content: "";
      transition: all 0.3s ease-in-out;
    }
    &::before {
      background-color: #fff;
      top: 0;
      left: 0;
      width: 2px;
      height: 0%;
    }
    &::after {
      background-color: #fff;
      bottom: 0;
      right: 0;
      width: 2px;
      height: 0%;
    }
  }

  &:hover::before,
  &:hover::after {
    width: 100%;
  }

  &:hover span::before,
  &:hover span::after {
    height: 100%;
    transition-delay: 0.2s;
  }
}
