/* Webflow Chatbot Styles */
.chatbot-container {
  max-width: 1200px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Welcome Screen */
[data-chatbot="welcome-screen"] {
  background: linear-gradient(135deg, #f8f7ff 0%, #f1efff 100%);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.welcome-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #594fab;
  margin-bottom: 20px;
}

.welcome-subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 40px;
}

/* Registration Form */
[data-chatbot="register-form"] {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 500px;
  margin: 0 auto;
}

[data-chatbot="register-form"] input {
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

[data-chatbot="register-form"] input:focus {
  outline: none;
  border-color: #594fab;
}

[data-chatbot="register-form"] button {
  grid-column: 1 / -1;
  background: #594fab;
  color: white;
  padding: 15px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

[data-chatbot="register-form"] button:hover {
  background: #4a3f8a;
}

/* Chat Interface */
[data-chatbot="chat-interface"] {
  display: none;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.chat-header {
  background: linear-gradient(135deg, #594fab 0%, #4a3f8a 100%);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
}

/* Chat Area */
[data-chatbot="chat-area"] {
  height: 400px;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
}

.chat-message {
  margin-bottom: 15px;
  display: flex;
}

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

.bot-message {
  justify-content: flex-start;
}

.message-content {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
}

.user-message .message-content {
  background: #594fab;
  color: white;
  border-bottom-right-radius: 4px;
}

.bot-message .message-content {
  background: white;
  color: #333;
  border: 1px solid #e0e0e0;
  border-bottom-left-radius: 4px;
}

.message-text {
  font-size: 14px;
  line-height: 1.4;
}

.message-time {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 4px;
}

/* Chat Input Area */
.chat-input-area {
  padding: 20px;
  background: white;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 10px;
  align-items: center;
}

[data-chatbot="chat-input"] {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
}

[data-chatbot="chat-input"]:focus {
  border-color: #594fab;
}

[data-chatbot="send-button"] {
  background: #594fab;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

[data-chatbot="send-button"]:hover {
  background: #4a3f8a;
}

[data-chatbot="send-button"] svg {
  width: 18px;
  height: 18px;
}

/* Quick Actions */
.quick-actions {
  padding: 20px;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

[data-chatbot="quick-action"] {
  background: white;
  border: 2px solid #e0e0e0;
  padding: 12px 16px;
  border-radius: 25px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

[data-chatbot="quick-action"]:hover {
  border-color: #594fab;
  background: #f8f7ff;
  transform: translateY(-2px);
}

/* Loading and Error States */
[data-chatbot="loading"],
[data-chatbot="error"] {
  display: none;
  padding: 15px;
  border-radius: 10px;
  margin: 10px 0;
  text-align: center;
  font-size: 14px;
}

[data-chatbot="loading"] {
  background: #e3f2fd;
  color: #1976d2;
}

[data-chatbot="error"] {
  background: #ffebee;
  color: #d32f2f;
}

/* Typing Indicator */
[data-chatbot="typing-indicator"] {
  display: none;
  padding: 12px 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  max-width: 70%;
  margin-bottom: 15px;
}

.typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: #999;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

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

@keyframes typing {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .chatbot-container {
    margin: 10px;
  }
  
  [data-chatbot="welcome-screen"] {
    padding: 20px;
  }
  
  .welcome-title {
    font-size: 2rem;
  }
  
  [data-chatbot="register-form"] {
    grid-template-columns: 1fr;
  }
  
  [data-chatbot="chat-area"] {
    height: 300px;
  }
  
  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Course-specific styling */
.course-bscai .welcome-title {
  color: #594fab;
}

.course-pgdai .welcome-title {
  color: #2e7d32;
}

.course-iitjde .welcome-title {
  color: #1565c0;
}

.course-genaiiitr .welcome-title {
  color: #7b1fa2;
} 