/* Nadi Demo Styles */
.nadi-demo-container {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  height: 500px;
  display: flex;
  flex-direction: column;
}

.nadi-demo-header {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
  padding: 1rem;
  text-align: center;
}

.nadi-demo-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: bold;
}

.nadi-demo-header p {
  margin: 0.25rem 0 0 0;
  font-size: 0.875rem;
  opacity: 0.9;
}

.nadi-demo-messages {
  flex: 1;
  padding: 1rem;
  background: #f8fafc;
  overflow-y: scroll !important;
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE and Edge */
}

/* Force hide scrollbar - override any global styles */
.nadi-demo-messages::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.nadi-demo-messages::-webkit-scrollbar-track {
  display: none !important;
  background: transparent !important;
}

.nadi-demo-messages::-webkit-scrollbar-thumb {
  display: none !important;
  background: transparent !important;
}

.nadi-demo-messages::-webkit-scrollbar-corner {
  display: none !important;
  background: transparent !important;
}

.message {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  margin-bottom: 0.75rem;
}

.message.user {
  align-self: flex-end;
}

.message.bot {
  align-self: flex-start;
}

.message-content {
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.message.user .message-content {
  background: #dc2626;
  color: white;
  border-bottom-right-radius: 0.25rem;
}

.message.bot .message-content {
  background: white;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 0.25rem;
}

.message-time {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
  text-align: right;
}

.message.bot .message-time {
  text-align: left;
}

/* Typing indicator */
.typing {
  opacity: 0.7;
}

.typing-dots {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.typing-dots span {
  width: 0.5rem;
  height: 0.5rem;
  background: #6b7280;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dots span: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;
  }
}

/* Quick actions */
.nadi-demo-quick-actions {
  padding: 0.75rem 1rem;
  background: white;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quick-action-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 0.5rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-action-btn:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
  transform: translateY(-1px);
}

/* Input area */
.nadi-demo-input-area {
  padding: 1rem;
  background: white;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nadi-demo-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.nadi-demo-input:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.nadi-demo-send {
  background: #dc2626;
  color: white;
  border: none;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nadi-demo-send:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

.nadi-demo-send:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

/* Clear conversation button */
.nadi-demo-clear {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 0.5rem;
}

.nadi-demo-clear:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

/* Responsive design */
@media (max-width: 768px) {
  .nadi-demo-container {
    height: 400px;
  }
  
  .message {
    max-width: 90%;
  }
  
  .nadi-demo-quick-actions {
    padding: 0.5rem;
  }
  
  .quick-action-btn {
    font-size: 0.7rem;
    padding: 0.4rem 0.6rem;
  }
  
  .nadi-demo-input-area {
    padding: 0.75rem;
  }
}

/* Animation for new messages */
.message {
  animation: messageSlideIn 0.3s ease-out;
}

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