@import '../../scss/mixin';

.root {
  --radius: 6px;
  height: clampValue(375, 800);
  padding: clampValue(20, 60);
}

.skeleton {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: clip;
  border-radius: var(--radius);
  background-color: rgba(0, 0, 0, 0.05);
  outline: 1px solid rgba(0, 0, 0, 0.1);

  &:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
    animation: skeleton 1.5s infinite;
  }
}

.progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: var(--radius);
  width: 100%;
  background: linear-gradient(90deg, var(--llm-color-accent-foreground), color-mix(in srgb, var(--llm-color-accent-foreground), transparent 80%));
  z-index: 100;
  animation: progress 6s ease infinite;
}

@keyframes skeleton {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes progress {
  0% {
    width: 0%;
    opacity: 1;
  }

  50% {
    width: 80%;
    opacity: 1;
  }

  90% {
    width: 100%;
    opacity: 1;
  }

  100% {
    width: 100%;
    opacity: 0;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}
