/* Chatbot Container */
.chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Chat Button */
.chat-button {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #007bff, #0056b3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.chat-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.chat-button i {
  color: white;
  font-size: 24px;
  transition: transform 0.3s ease;
}

.chat-button:hover i {
  transform: scale(1.1);
}

/* Chat Notification */
.chat-notification {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: #333;
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.chat-button:hover .chat-notification {
  opacity: 1;
}

.chat-notification::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: #333;
}

/* Chat Window */
.chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 500px;
  background: #1a1a1a;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #333;
}

.chat-window.show {
  display: flex;
  animation: slideUp 0.3s ease;
}

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

/* Chat Header */
.chat-header {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
}

.chat-title i {
  font-size: 18px;
}

.close-chat {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

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

/* Chat Body */
.chat-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #1a1a1a;
}

.chat-body::-webkit-scrollbar {
  width: 4px;
}

.chat-body::-webkit-scrollbar-track {
  background: #2a2a2a;
}

.chat-body::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 2px;
}

/* Messages */
.message {
  margin-bottom: 16px;
}

.message-content {
  display: flex;
  gap: 10px;
}

.bot-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #007bff, #0056b3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bot-avatar i {
  color: white;
  font-size: 14px;
}

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

.user-message .message-text {
  background: #007bff;
  color: white;
  max-width: 70%;
}

.message-text {
  background: #2a2a2a;
  color: #e0e0e0;
  padding: 12px 16px;
  border-radius: 16px;
  max-width: 70%;
  line-height: 1.4;
  font-size: 14px;
}

.bot-message .message-text {
  border-bottom-left-radius: 4px;
}

.user-message .message-text {
  border-bottom-right-radius: 4px;
}

/* Service Plans */
.service-plan {
  background: #2a2a2a;
  border: 1px solid #404040;
  border-radius: 12px;
  padding: 16px;
  margin: 8px 0;
  transition: all 0.3s ease;
}

.service-plan:hover {
  border-color: #007bff;
  background: #333;
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.plan-name {
  font-weight: 600;
  color: #007bff;
  font-size: 16px;
}

.plan-price {
  font-weight: 700;
  color: #00ff88;
  font-size: 18px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.plan-features li {
  padding: 4px 0;
  color: #ccc;
  font-size: 13px;
}

.plan-features li:before {
  content: "✓ ";
  color: #00ff88;
  font-weight: bold;
}

/* Chat Footer */
.chat-footer {
  padding: 16px 20px;
  background: #1a1a1a;
  border-top: 1px solid #333;
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-reply-btn {
  background: #2a2a2a;
  color: #e0e0e0;
  border: 1px solid #404040;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.quick-reply-btn i {
  font-size: 10px;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.typing-dots {
  display: flex;
  gap: 3px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: #666;
  border-radius: 50%;
  animation: typingAnimation 1.4s infinite;
}

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

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

@keyframes typingAnimation {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .chatbot-container {
    bottom: 15px;
    right: 15px;
  }
  
  .chat-window {
    width: calc(100vw - 30px);
    height: 70vh;
    bottom: 80px;
    right: -15px;
  }
  
  .chat-notification {
    display: none;
  }
  
  .quick-replies {
    justify-content: center;
  }
  
  .quick-reply-btn {
    font-size: 11px;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  .chat-window {
    width: calc(100vw - 20px);
    height: 75vh;
    right: -10px;
  }
  
  .message-text {
    max-width: 85%;
    font-size: 13px;
  }
}
