

.skeleton,
.skeleton-dark {
  display: flex;
  width: 100%;
  padding: 15px;

  &-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-left: 12px;

    &-line,
    &-title {
      position: relative;
      z-index: 1;
      width: 100%;
      height: 14px;
      margin-bottom: 14px;
      overflow: hidden;
      background: rgba(224, 224, 224, 1);
      border-radius: 10px;

      &::after {
        position: absolute;
        top: 0;
        left: -100%;
        z-index: 2;
        width: 100%;
        height: 100%;
        background: linear-gradient(
          90deg,
          hsla(0, 0%, 100%, 0),
          hsla(0, 0%, 100%, 0.3),
          hsla(0, 0%, 100%, 0)
        );
        animation: 1.2s skeleton-transform linear infinite normal;
        content: '';
      }
    }

    &-title {
      width: 50%;
    }
  }

  &-avatar {
    position: relative;
    z-index: 1;
    width: var(--skeleton-container-avatar-size);
    height: var(--skeleton-container-avatar-size);
    overflow: hidden;
    background: rgba(224, 224, 224, 1);
    border-radius: 50%;

    &::after {
      position: absolute;
      top: 0;
      left: -100%;
      z-index: 2;
      width: 100%;
      height: 100%;
      background: linear-gradient(
        90deg,
        hsla(0, 0%, 100%, 0),
        hsla(0, 0%, 100%, 0.3),
        hsla(0, 0%, 100%, 0)
      );
      animation: 1.2s skeleton-transform linear infinite normal;
      content: '';
    }
  }
}

.skeleton-dark {
  &-avatar,
  &-container-title,
  &-container-line {
    background: #ffffff1f;

    &::after {
      background: linear-gradient(
        90deg,
        hsla(0deg, 0%, 100%, 0%),
        hsla(0deg, 0%, 100%, 30%),
        hsla(0deg, 0%, 100%, 0%)
      );
    }
  }
}

@keyframes skeleton-transform {
  75% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}
