@use '../../variables' as *;
.skeleton {
  position: relative;
  background-color: rgba(var(--color-neutral-100-rgb), var(--opacity-level-light));
  color: transparent;
  min-height: 1em;

  &:before {
    animation: 3000ms ease-in-out skeleton infinite;
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(var(--color-neutral-100-rgb), var(--opacity-level-light));
    content: '';
  }
}

.root {
  h1,
  h2,
  h3,
  h4,
  h5 {
    width: 50%;
  }

  p {
    width: 90%;
  }
}

@keyframes skeleton {
  0% {
    right: auto;
    left: 0;
    width: 0;
    opacity: 0.3;
  }
  20% {
    right: auto;
    left: 0;
    width: 100%;
    opacity: 1;
  }
  28% {
    right: 0;
    left: auto;
    width: 100%;
  }
  51% {
    right: 0;
    left: auto;
    width: 0;
  }
  58% {
    right: 0;
    left: auto;
    width: 0;
  }
  82% {
    right: 0;
    left: auto;
    width: 100%;
  }
  83% {
    right: auto;
    left: 0;
    width: 100%;
  }
  96% {
    right: auto;
    left: 0;
    width: 0;
  }
  100% {
    right: auto;
    left: 0;
    width: 0;
    opacity: 0.3;
  }
}
