// palette: https://coolors.co/1c1d2a-8d99ae-edf2f4-ef233c-d90429
@import url(https://fonts.googleapis.com/css?family=Lato);

body {
  display: flex;
  height: 100vh;
  justify-content: center;
  align-items: center;
  background: #ECEFFC;
}

.btn-share {
  --btn-inner-color: #E6E9ED;
  --btn-overlay-color: #1F1E1E;
  --icon-color: #1c1d2a;
  position: relative;
  display: flex;
  font-size: 100%;
  font-family: Lato, sans-serif;
  color: white;
  letter-spacing: 2px;
  background: var(--btn-inner-color);
  border: none;
  border-radius: 80px;
  outline: none;
  cursor: pointer;
  overflow: hidden;
  transform: rotate(0);
  transition: 0.2s ease-in-out;

  .btn-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: var(--btn-overlay-color);
    border-radius: inherit;
    transition: 0.6s linear;
  }

  a {
    padding: 14px;
    color: var(--icon-color);
    opacity: 0;
    transform: translateX(-100%);
    transition: 0.3s;

    @for $i from 1 through 4 {
      &:nth-child(#{$i}) {
        transition-delay: 1s - 0.2s * ($i - 1);
      }
    }
  }

  &:hover {
    transform: scale(1.1);

    .btn-overlay {
      transform: translateX(-100%);
      transition-delay: 0.25s;
    }

    a {
      opacity: 1;
      transform: translateX(0);
    }
  }
}
