/* ========================================
   chatbot.css - Floating Chatbot Widget
   ======================================== */

.chatbot-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
}

.chatbot-toggle {
  width: 65px;
  height: 65px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.chatbot-toggle:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6);
}

.chatbot-panel {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  background: var(--white);
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--primary);
  animation: slideIn 0.3s ease;
}

.chatbot-panel.open {
  display: flex;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chatbot-header {
  background: var(--primary);
  color: var(--black);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.chatbot-header h4 {
  margin: 0;
  font-size: 1.1rem;
}

.chatbot-header button {
  background: none;
  border: none;
  color: var(--black);
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s;
  padding: 0 5px;
}

.chatbot-header button:hover {
  transform: scale(1.2);
}

.chatbot-messages {
  height: 300px;
  overflow-y: auto;
  padding: 1rem;
  background: #f9f9f9;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message {
  display: flex;
  margin-bottom: 5px;
}

.message.bot {
  justify-content: flex-start;
}

.message.user {
  justify-content: flex-end;
}

.message-content {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.message.bot .message-content {
  background: var(--primary);
  color: var(--black);
  border-bottom-left-radius: 4px;
}

.message.user .message-content {
  background: var(--black);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.chatbot-input {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ddd;
  background: var(--white);
  gap: 8px;
}

.chatbot-input input {
  flex: 1;
  padding: 10px 15px;
  border: 2px solid #eee;
  border-radius: 25px;
  outline: none;
  font-size: 0.9rem;
  transition: border-color 0.3s;
}

.chatbot-input input:focus {
  border-color: var(--primary);
}

.chatbot-input button {
  background: var(--primary);
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  color: var(--black);
  font-size: 1.1rem;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-input button:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .chatbot-panel {
    width: 300px;
    right: -10px;
    bottom: 75px;
  }

  .chatbot-toggle {
    width: 55px;
    height: 55px;
    font-size: 24px;
  }
}