/* AI Onboarding Modal Styles */

#onboardingModal {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#onboardingModal [id$="Screen"]:not(.hidden) {
  animation: fadeIn 0.5s ease-out;
}

/* Progress Bar Animation */
#progressBar {
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Persona Card Hover Effect */
#personaCards > div {
  transition: all 0.3s ease;
}

#personaCards > div:hover {
  transform: translateY(-4px);
}

/* Text Truncation */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Button Disabled State */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Loading Spinner */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Pulse Animation for Welcome Icon */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Bounce Animation for Completion Icon */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-bounce {
  animation: bounce 1s ease-in-out infinite;
}

/* Scrollbar Styling */
#onboardingModal textarea {
  scrollbar-width: thin;
  scrollbar-color: #a855f7 #f3f4f6;
}

#onboardingModal textarea::-webkit-scrollbar {
  width: 8px;
}

#onboardingModal textarea::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 4px;
}

#onboardingModal textarea::-webkit-scrollbar-thumb {
  background: #a855f7;
  border-radius: 4px;
}

#onboardingModal textarea::-webkit-scrollbar-thumb:hover {
  background: #9333ea;
}

/* LINE-style Chat Bubble Styles */
.chat-message {
  display: flex;
  margin-bottom: 16px;
  animation: slideIn 0.3s ease-out;
}

.chat-message.lisa {
  justify-content: flex-start;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: bold;
  font-size: 16px;
  color: white;
}

.chat-avatar.lisa {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  margin-right: 8px;
}

.chat-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 18px;
  word-wrap: break-word;
  line-height: 1.5;
  font-size: 14px;
}

.chat-bubble.lisa {
  background-color: white;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 4px;
}

.chat-bubble.user {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-bottom-right-radius: 4px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Chat History Scrollbar */
#chatHistory {
  scrollbar-width: thin;
  scrollbar-color: #a855f7 #f3f4f6;
}

#chatHistory::-webkit-scrollbar {
  width: 6px;
}

#chatHistory::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 3px;
}

#chatHistory::-webkit-scrollbar-thumb {
  background: #a855f7;
  border-radius: 3px;
}

#chatHistory::-webkit-scrollbar-thumb:hover {
  background: #9333ea;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  #onboardingModal .max-w-3xl {
    max-width: 95%;
    margin: 1rem;
  }

  #onboardingModal h2 {
    font-size: 1.75rem;
  }

  #onboardingModal h3 {
    font-size: 1.5rem;
  }

  #onboardingModal .p-8 {
    padding: 1.5rem;
  }

  .chat-bubble {
    max-width: 80%;
    font-size: 13px;
  }

  .chat-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

/* Persona Card Mobile Layout */
@media (max-width: 640px) {
  #personaCards > div {
    padding: 1rem;
  }

  #personaCards .w-16 {
    width: 3rem;
    height: 3rem;
  }

  #personaCards .text-xl {
    font-size: 1.125rem;
  }
}
