/* ✨ ORIUMAI ADVANCED CHAT WIDGET STYLES ✨ */
#ai-chat-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border: 3px solid white;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.5);
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  animation: chatPulse 2.5s ease-in-out infinite;
  overflow: visible;
  pointer-events: auto;
  position: relative;
}

#ai-chat-button::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
  border-radius: 50%;
}

#ai-chat-button .bot-logo {
  width: 36px;
  height: 36px;
  position: relative;
  z-index: 1;
}

#ai-chat-button:hover {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.7);
}

@keyframes chatPulse {
  0%, 100% {
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.5);
  }
  50% {
    box-shadow: 0 12px 48px rgba(59, 130, 246, 0.8), 0 0 0 20px rgba(59, 130, 246, 0.15);
  }
}

.ai-chat-widget {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 400px;
  height: 650px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(59, 130, 246, 0.1);
  z-index: 9998;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  pointer-events: auto;
  transform: translateY(20px);
  opacity: 0;
}

.ai-chat-widget.active {
  display: flex;
  animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Notification dot for unread messages */
.chat-notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 12px;
  height: 12px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid white;
  animation: notificationPulse 2s ease-in-out infinite;
}

@keyframes notificationPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

/* Animate pulse on avatar */
.animate-pulse {
  animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Fade in animation */
.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

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

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

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.chat-avatar::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
  border-radius: 50%;
}

.chat-avatar .bot-icon {
  width: 22px;
  height: 22px;
  position: relative;
  z-index: 1;
}

.chat-header h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.chat-header p {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
}

.chat-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.chat-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8fafc;
}

.chat-message {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  animation: messageSlide 0.3s ease-out;
}

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

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-message .message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border: 2px solid rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.chat-message .message-avatar::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
  border-radius: 50%;
}

.chat-message .message-avatar .bot-icon {
  width: 16px;
  height: 16px;
  position: relative;
  z-index: 1;
}

.chat-message.user .message-avatar {
  background: #e5e7eb;
  border-color: #d1d5db;
  color: #1e293b;
}

.message-content {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 16px;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  line-height: 1.6;
  font-size: 14px;
}

.chat-message.user .message-content {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: white;
}

.message-content ul {
  margin: 8px 0;
  padding-left: 20px;
}

.message-content li {
  margin: 4px 0;
}

.quick-actions {
  display: flex;
  gap: 8px;
  padding: 0 20px 12px 20px;
  flex-wrap: wrap;
  background: #f8fafc;
}

.quick-action {
  padding: 8px 14px;
  background: white;
  border: 1.5px solid #e5e7eb;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  color: #3b82f6;
  font-weight: 600;
}

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

.chat-input-container {
  padding: 16px;
  background: white;
  border-top: 1px solid #e5e7eb;
}

.typing-indicator {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 8px 0;
  margin-bottom: 8px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-10px);
  }
}

.chat-input-wrapper {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

#chat-input {
  flex: 1;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  resize: none;
  max-height: 120px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}

#chat-input:focus {
  outline: none;
  border-color: #3b82f6;
}

#chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

#chat-send:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Express CTA in Chat */
.express-cta {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0;
  color: white;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

.express-cta-content {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.express-cta i {
  font-size: 32px;
}

.express-cta strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.express-cta p {
  margin: 0;
  font-size: 13px;
  opacity: 0.95;
}

.express-cta-button {
  display: block;
  width: 100%;
  padding: 12px;
  background: white;
  color: #f59e0b;
  text-align: center;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}

.express-cta-button:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .ai-chat-widget {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    z-index: 850;
    max-height: 100vh;
    max-height: -webkit-fill-available;
  }
  
  #ai-chat-button {
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    z-index: 900;
    touch-action: manipulation;
  }
  
  #ai-chat-button .bot-logo {
    width: 30px;
    height: 30px;
  }
}
