/* 
   KaamReady AI — Animations Stylesheet
   Pure CSS micro-animations for interface responsiveness
*/

/* Typing Dots Animation */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-brand-blue);
  border-radius: 50%;
  opacity: 0.3;
  animation: typing-bounce 1s infinite alternate;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-bounce {
  to {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* Voice Waveform Animation */
.waveform-container {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 32px;
}

.waveform-bar {
  width: 3px;
  height: 4px;
  background-color: var(--color-brand-blue);
  border-radius: 2px;
  animation: waveform-pulse 1.2s ease-in-out infinite alternate;
}

.waveform-bar:nth-child(1) { height: 12px; animation-delay: 0.1s; }
.waveform-bar:nth-child(2) { height: 24px; animation-delay: 0.3s; }
.waveform-bar:nth-child(3) { height: 18px; animation-delay: 0.5s; }
.waveform-bar:nth-child(4) { height: 8px;  animation-delay: 0.2s; }
.waveform-bar:nth-child(5) { height: 28px; animation-delay: 0.4s; }
.waveform-bar:nth-child(6) { height: 14px; animation-delay: 0.6s; }
.waveform-bar:nth-child(7) { height: 20px; animation-delay: 0.1s; }
.waveform-bar:nth-child(8) { height: 10px; animation-delay: 0.3s; }

@keyframes waveform-pulse {
  0% {
    transform: scaleY(0.3);
  }
  100% {
    transform: scaleY(1);
  }
}

/* QR Poster Scanline Sweep Animation */
.qr-container {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background-color: var(--color-white);
  display: inline-block;
  padding: 16px;
}

.qr-sweep-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-action-green);
  box-shadow: none; /* No drop shadows */
  animation: qr-sweep 3s ease-in-out infinite;
}

@keyframes qr-sweep {
  0% {
    top: 0%;
  }
  50% {
    top: 100%;
  }
  100% {
    top: 0%;
  }
}

/* Live NLU Demo Progress Load Bars */
.load-bar-track {
  width: 100%;
  height: 8px;
  background-color: var(--color-mist-tint);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  margin-top: 8px;
}

.load-bar-fill {
  height: 100%;
  background-color: var(--color-brand-blue);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 4px;
}

.load-bar-fill.active {
  background-color: var(--color-action-green);
}

/* Fade In Transition utility */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}
