#chatbot-toggle-btn {
  position: fixed; 
  bottom: 32px; 
  left: 32px; /* Changed from right to left */
  z-index: 9999;
}

#chatbot-toggle-btn button {
  background: linear-gradient(135deg, #1A376B, #2a4a7f);
  color: #fff;
  padding: 14px 24px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(26, 55, 107, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#chatbot-toggle-btn button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(26, 55, 107, 0.4);
  background: linear-gradient(135deg, #FBB705, #ffd700);
  color: #121212;
}

#chatbot-window {
  display: none;
  position: fixed;
  bottom: 100px;
  left: 32px; /* Changed from right to left */
  width: 370px;
  height: 520px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  overflow: hidden;
  border: none;
  display: flex;
  flex-direction: column;
  font-family: 'Segoe UI', Arial, sans-serif;
  animation: chatbot-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes chatbot-pop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.chatbot-header {
  background: linear-gradient(90deg, #1A376B, #2a4a7f);
  color: #fff;
  padding: 18px 20px;
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(251, 183, 5, 0.2);
}

.chatbot-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  margin-left: 10px;
  opacity: 0.9;
  transition: all 0.2s;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-close:hover { 
  opacity: 1;
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

#chat-content {
  padding: 20px 16px 14px 16px;
  flex: 1;
  overflow-y: auto;
  font-size: 15px;
  background: #F4F6F9;
  background-image: radial-gradient(circle at 50% 50%, rgba(26, 55, 107, 0.05) 0%, transparent 70%);
}

.chatbot-bubble-bot {
  background: linear-gradient(135deg, #ffffff, #F4F6F9);
  color: #121212;
  border-radius: 14px 14px 14px 4px;
  padding: 12px 18px;
  margin: 8px 0 14px 0;
  max-width: 85%;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  display: inline-block;
  text-align: left;
  animation: bot-bubble 0.4s ease;
  border-left: 3px solid #1A376B;
}

@keyframes bot-bubble {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.chatbot-bubble-user {
  background: linear-gradient(135deg, #1A376B, #2a4a7f);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
  padding: 12px 18px;
  margin: 8px 0 14px 0;
  max-width: 85%;
  box-shadow: 0 3px 10px rgba(26, 55, 107, 0.2);
  display: inline-block;
  text-align: right;
  animation: user-bubble 0.4s ease;
  border-right: 3px solid #FBB705;
}

@keyframes user-bubble {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.chatbot-btn-row {
  margin: 8px 0 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: fade-in 0.6s ease;
}

@keyframes fade-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.chatbot-btn {
  background: linear-gradient(to bottom, #ffffff, #F4F6F9);
  color: #1A376B;
  border: 1px solid rgba(26, 55, 107, 0.2);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 14.5px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(26, 55, 107, 0.1);
}

.chatbot-btn:hover {
  background: linear-gradient(to bottom, #FBB705, #ffd700);
  color: #121212;
  border-color: #FBB705;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(251, 183, 5, 0.2);
}

.chatbot-input {
  width: 92%;
  padding: 12px 14px;
  border-radius: 50px;
  border: 2px solid rgba(26, 55, 107, 0.2);
  margin: 10px 0 0 0;
  font-size: 15px;
  background: white;
  color: #121212;
  outline: none;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.chatbot-input:focus {
  border-color: #1A376B;
  box-shadow: 0 2px 12px rgba(26, 55, 107, 0.15);
}

@media (max-width: 600px) {
  #chatbot-toggle-btn { 
    left: 16px; /* Changed from right to left */
    bottom: 20px; 
  }
  
  #chatbot-toggle-btn button {
    padding: 12px 20px;
  }
  
  #chatbot-window { 
    left: 2vw; /* Changed from right to left */
    width: 96vw; 
    min-width: 0; 
    border-radius: 16px;
    bottom: 80px;
    height: 65vh;
    max-height: 500px;
  }
}
