/* ============================================
   URBot Streaming Chat — CSS
   Cursor blink, thinking dots, streaming bubble
   ============================================ */

/* Blinking text cursor shown during streaming */
.streaming-cursor {
  display: inline-block;
  animation: urbot-blink 0.8s step-start infinite;
  color: #7c3aed;
  font-weight: bold;
  line-height: 1;
  vertical-align: text-bottom;
}

@keyframes urbot-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Message bubble actively receiving streamed words */
.urbot-chat-msg.bot.streaming {
  border-left: 2px solid #7c3aed;
  transition: border-left 0.3s;
}

/* Three-dot thinking indicator */
.thinking-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 6px 0;
}

.thinking-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7c3aed;
  animation: urbot-thinking-bounce 1.2s ease-in-out infinite;
  display: inline-block;
}

.thinking-indicator span:nth-child(1) { animation-delay: 0s;    }
.thinking-indicator span:nth-child(2) { animation-delay: 0.2s;  }
.thinking-indicator span:nth-child(3) { animation-delay: 0.4s;  }

@keyframes urbot-thinking-bounce {
  0%, 80%, 100% { transform: scale(0);   opacity: 0.4; }
  40%           { transform: scale(1.0); opacity: 1;   }
}

/* "Thinking..." label inside the thinking bubble */
.thinking-text {
  color: #64748b;
  font-style: italic;
  font-size: 0.88em;
}

/* Free-messages remaining warning */
.uss-preview-warning {
  margin: 6px 8px;
  padding: 8px 12px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 8px;
  font-size: 0.82em;
  color: #c4b5fd;
  text-align: center;
}

.uss-preview-warning a {
  color: #7c3aed;
  font-weight: 600;
  text-decoration: none;
}

.uss-preview-warning a:hover {
  text-decoration: underline;
}

/* Upgrade / limit message inside chat */
.uss-limit-msg {
  color: #a78bfa;
}

.uss-limit-msg a {
  color: #7c3aed;
  font-weight: 600;
}

/* Respect reduced-motion — disable all streaming animations */
@media (prefers-reduced-motion: reduce) {
  .streaming-cursor {
    animation: none;
    opacity: 1;
  }
  .thinking-indicator span {
    animation: none;
    opacity: 1;
    transform: scale(1);
  }
  .urbot-chat-msg.bot.streaming {
    border-left: none;
  }
}
