/* Chatbot Styles */
:root {
  --chat-primary: #125B29;
  --chat-secondary: #FFCC00;
  --chat-bg: rgba(255, 255, 255, 0.95);
  --chat-text: #1a1a1a;
  --chat-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.chatbot-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  font-family: 'Inter', sans-serif;
}

.chatbot-toggle {
  width: 60px;
  height: 60px;
  background: var(--chat-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--chat-shadow);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.chatbot-toggle:hover {
  transform: scale(1.1) rotate(5deg);
  background: #0d461f;
}

.chatbot-toggle .notification-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 15px;
  height: 15px;
  background: var(--chat-secondary);
  border: 2px solid white;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 500px;
  background: var(--chat-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(18, 91, 41, 0.1);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--chat-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow: hidden;
}

.chatbot-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chatbot-header {
  background: var(--chat-primary);
  color: white;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-header img {
  width: 35px;
  height: 35px;
  background: white;
  border-radius: 50%;
  padding: 4px;
}

.chatbot-header-info h4 {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  color: white;
}

.chatbot-header-info p {
  margin: 0;
  font-size: 0.75rem;
  opacity: 0.8;
}

.chatbot-close {
  margin-left: auto;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.chatbot-close:hover {
  opacity: 1;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 15px;
  font-size: 0.9rem;
  line-height: 1.4;
  position: relative;
  animation: messageAppear 0.3s ease-out;
}

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

.message.bot {
  background: #f0f4f1;
  color: var(--chat-text);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.message.user {
  background: var(--chat-primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.message.bot::before {
  content: 'NPSL Bot';
  position: absolute;
  top: -18px;
  left: 5px;
  font-size: 0.65rem;
  color: #888;
  font-weight: 600;
}

.chatbot-input-area {
  padding: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  gap: 10px;
}

.chatbot-input-area input {
  flex: 1;
  border: 1px solid #e0e0e0;
  border-radius: 25px;
  padding: 8px 15px;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.chatbot-input-area input:focus {
  border-color: var(--chat-primary);
}

.chatbot-send {
  background: var(--chat-primary);
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

.chatbot-send:hover {
  background: #0d461f;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 10px 15px;
  background: #f0f4f1;
  border-radius: 15px;
  width: fit-content;
  align-self: flex-start;
  margin-bottom: 10px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: #888;
  border-radius: 50%;
  animation: typing 1s infinite alternate;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  from { opacity: 0.3; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.1); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(255, 204, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 204, 0, 0); }
}

@media (max-width: 480px) {
  .chatbot-window {
    width: calc(100vw - 40px);
    height: 450px;
    right: -10px;
  }
}
