@import '../../styles/abstracts/variables';

.dot-flashing {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 100px;
  background-color: rgba(#ffffff, 0.4);
  color: rgba(#ffffff, 0.4);
  animation: dotFlashingLighten 1s infinite linear alternate;
  animation-delay: 0.5s;

  &::before {
    content: '';
    display: inline-block;
    position: absolute;
    top: 0;
    left: -24px;
    width: 12px;
    height: 12px;
    border-radius: 100px;
    background-color: rgba(#ffffff, 0.4);
    color: rgba(#ffffff, 0.4);
    animation: dotFlashingLighten 1s infinite alternate;
    animation-delay: 0s;
  }

  &::after {
    content: '';
    display: inline-block;
    position: absolute;
    top: 0;
    left: 24px;
    width: 12px;
    height: 12px;
    border-radius: 100px;
    background-color: rgba(#ffffff, 0.4);
    color: rgba(#ffffff, 0.4);
    animation: dotFlashingLighten 1s infinite alternate;
    animation-delay: 1s;
  }

  &.darken {
    background-color: rgba(#121212, 0.4);
    color: rgba(#121212, 0.4);
    animation: dotFlashingDarken 1s infinite linear alternate;
    animation-delay: 0.5s;

    &::before {
      background-color: rgba(#121212, 0.4);
      color: rgba(#121212, 0.4);
      animation: dotFlashingDarken 1s infinite alternate;
      animation-delay: 0s;
    }

    &::after {
      background-color: rgba(#121212, 0.4);
      color: rgba(#121212, 0.4);
      animation: dotFlashingDarken 1s infinite alternate;
      animation-delay: 1s;
    }
  }
}

@keyframes dotFlashingLighten {
  0% {
    background-color: rgba(#ffffff, 0.4);
  }
  50%,
  100% {
    background-color: rgba(#ffffff, 0.2);
  }
}

@keyframes dotFlashingDarken {
  0% {
    background-color: rgba(#121212, 0.4);
  }
  50%,
  100% {
    background-color: rgba(#121212, 0.2);
  }
}

.snippet {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: center;
}
