.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

/* Chat Toggle Button */
.chat-toggle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

/* Chat Container */
.chat-container {
  position: absolute;
  bottom: 10px;
  right: 0;
  width: 350px;
  height: 500px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: none; /* Hidden by default */
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.chat-container.active {
  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, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.close-chat {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.close-chat:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Chat Messages Area */
.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #fff;
}

.message {
  margin-bottom: 15px;
  max-width: 80%;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-message {
  margin-left: auto;
}

.user-message p {
  background: #667eea;
  color: white;
  padding: 10px 15px;
  border-radius: 18px 18px 5px 18px;
  margin: 0;
}

.bot-message p {
  background: #f5f6f7;
  color: #333;
  padding: 10px 15px;
  border-radius: 18px 18px 18px 5px;
  margin: 0;
  border: 1px solid #e0e0e0;
}

/* Chat Input */
.chat-input {
  padding: 15px;
  border-top: 1px solid transparent;
  background: white;
  display: flex;
  gap: 10px;
}

.chat-input input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 25px;
  outline: none;
  font-size: 14px;
  background-color: #e6e9ed;
}

.chat-input input:focus {
  border-color: #667eea;
}

.chat-input button {
  background: #667eea;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s ease;
}

.chat-input button:hover {
  background: #5a6fd8;
}

/* Responsive Design */
@media (max-width: 480px) {
  .chat-container {
    width: 300px;
    height: 400px;
    right: 10px;
    bottom: 10px;
  }
  
  .chat-widget {
    bottom: 10px;
    right: 10px;
  }
}