$facebook: #1877f2;
$twitter: #1da1f2;
$telegram: #0088cc;
$whatsapp: #25d366;

.ed-share {
  position: relative;
  &__icon-svg {
    width: 20px;
    height: 20px;
    color: white;
    font-size: 1.5rem;
  }
  .share-plugin {
    display: block;
  }
  span {
    // width: 200px;
    line-height: 45px;
    display: flex;
    align-items: center;
    font-weight: 600;
    position: absolute;
    text-align: center;
    left: 73%;
    margin-left: -100px;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
    color: white;
  }
  &__items {
    font-size: 0;
  }
  &__icon {
    line-height: 50px;
    height: 45px;
    width: 45px;
    text-align: center;
    display: inline-block;
    overflow: hidden;
    opacity: 1;
    transition: all 0.3s ease-in-out;
    background-color: rgba(0, 0, 0, 0.2);
    will-change: auto;
    &:nth-child(1) {
      border-radius: 8px 0 0 8px;
    }

    &:nth-child(2):hover {
      background-color: transparent;
    }

    &:nth-child(3):hover {
      background-color: transparent;
    }

    &:nth-child(4) {
      border-radius: 0 8px 8px 0;
      margin-right: 0;
    }
  }

  &:hover,
  &.hover {
    span {
      opacity: 0;
    }
    .ed-share__icon {
      border-radius: 50%;
      margin: 0 5px;
      color: white;
      font-size: 1rem;
      cursor: pointer;
      &.facebook {
        background-color: $facebook;
        &:hover {
          background-color: darken($facebook, 5);
        }
      }

      &.whatsapp {
        background-color: $whatsapp;
        &:hover {
          background-color: darken($whatsapp, 5);
        }
      }

      &.twitter {
        background-color: $twitter;
        &:hover {
          background-color: darken($twitter, 5);
        }
      }

      &.telegram {
        background-color: $telegram;
        &:hover {
          background-color: darken($telegram, 5);
        }
      }
    }
  }
}
@media (max-width: 768px) {
  .ed-share {
    span {
      display: none;
    }
    &__items {
      width: 100%;
      font-size: 1rem;
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      margin-top: 1rem;
    }
    &__icon {
      border-radius: 50%;
      margin: 0 5px;
      color: white;
      font-size: 1rem;
      &:nth-child(1) {
        border-radius: 50%;
      }

      &:nth-child(4) {
        border-radius: 50%;
        margin-right: 0;
      }

      &.facebook {
        background-color: $facebook;
      }

      &.whatsapp {
        background-color: $whatsapp;
      }

      &.twitter {
        background-color: $twitter;
      }

      &.telegram {
        background-color: $telegram;
      }
    }
  }
}
