/* ===== CHATBOT ===== */
#chatbot-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  font-family: "Poppins", sans-serif;
}

/* Chat Toggle Button */
.chat-toggle {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #e235da, #9b2d8f);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 25px rgba(226, 53, 218, 0.4);
  position: relative;
  padding: 0;
}

.chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 35px rgba(226, 53, 218, 0.6);
}

.chat-toggle-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.chat-logo-img {
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.chat-toggle-text {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.chat-badge {
  position: absolute;
  top: 0.3rem;
  right: 0.5rem;
  width: 1rem;
  height: 1rem;
  background: #4caf50;
  border-radius: 50%;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Chat Window */
.chat-window {
  position: absolute;
  bottom: 7.5rem;
  right: 0;
  width: 38rem;
  max-width: 90vw;
  height: 52rem;
  max-height: 70vh;
  background: var(--bg2);
  border: 2px solid var(--pink);
  border-radius: 1.6rem;
  display: none;
  flex-direction: column;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(226, 53, 218, 0.15);
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.chat-window.open {
  display: flex;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Chat Header */
.chat-header {
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, rgba(226, 53, 218, 0.15), rgba(155, 45, 143, 0.05));
  border-bottom: 1px solid rgba(226, 53, 218, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.chat-logo-small {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pink);
}

.chat-header-left h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pink);
  margin: 0;
  line-height: 1.2;
}

.chat-header-left p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.2;
}

.chat-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 2.8rem;
  cursor: pointer;
  transition: 0.3s;
  line-height: 1;
  padding: 0 0.5rem;
}

.chat-close:hover {
  color: var(--pink);
  transform: rotate(90deg);
}

/* Chat Messages */
.chat-messages {
  flex: 1;
  padding: 1.5rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  background: var(--bg);
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--pink);
  border-radius: 4px;
}

.chat-message {
  display: flex;
  gap: 0.8rem;
  animation: messageIn 0.3s ease;
}

.chat-message.bot {
  align-items: flex-start;
}

.chat-message.user {
  align-items: flex-end;
  flex-direction: row-reverse;
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-avatar {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--pink);
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-bubble {
  max-width: 80%;
  padding: 1rem 1.4rem;
  border-radius: 1.2rem;
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--text);
  word-wrap: break-word;
}

.chat-message.bot .chat-bubble {
  background: rgba(226, 53, 218, 0.08);
  border: 1px solid rgba(226, 53, 218, 0.15);
  border-bottom-left-radius: 0.4rem;
}

.chat-message.user .chat-bubble {
  background: var(--pink);
  color: #000;
  border-bottom-right-radius: 0.4rem;
}

.chat-bubble ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.chat-bubble ul li {
  margin-bottom: 0.3rem;
}

.chat-bubble strong {
  color: var(--pink);
}

.chat-message.user .chat-bubble strong {
  color: #000;
}

/* Chat Input */
.chat-input-area {
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid rgba(226, 53, 218, 0.1);
  flex-shrink: 0;
  background: var(--bg2);
}

.chat-input-wrapper {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(226, 53, 218, 0.2);
  border-radius: 2.5rem;
  padding: 1rem 1.8rem;
  font-size: 1.3rem;
  color: var(--text);
  font-family: "Poppins", sans-serif;
  outline: none;
  transition: 0.3s;
}

.chat-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.chat-input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 15px rgba(226, 53, 218, 0.1);
}

.chat-send {
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 50%;
  background: var(--pink);
  border: none;
  color: #000;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-send:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(226, 53, 218, 0.4);
}

.chat-send svg {
  width: 2.2rem;
  height: 2.2rem;
  fill: #000;
}

.chat-footer-text {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.25);
  margin: 0.6rem 0 0;
  letter-spacing: 0.05em;
}

/* Typing indicator */
.chat-typing {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.4rem;
  background: rgba(226, 53, 218, 0.08);
  border: 1px solid rgba(226, 53, 218, 0.15);
  border-radius: 1.2rem;
  border-bottom-left-radius: 0.4rem;
  max-width: 8rem;
}

.chat-typing.show {
  display: flex;
}

.chat-typing span {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--pink);
  animation: typingDot 1.4s infinite both;
}

.chat-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Mobile Responsive */
@media (max-width: 600px) {
  #chatbot-container {
    bottom: 1.5rem;
    right: 1.5rem;
  }
  
  .chat-toggle {
    width: 6rem;
    height: 6rem;
  }
  
  .chat-logo-img {
    width: 6rem;
    height: 6rem;
  }
  
  .chat-toggle-text {
    font-size: 0.7rem;
  }
  
  .chat-window {
    bottom: 6.8rem;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    height: 60vh;
    max-height: 65vh;
    border-radius: 1.2rem;
  }
  
  .chat-header {
    padding: 1.2rem 1.5rem;
  }
  
  .chat-logo-small {
    width: 3.8rem;
    height: 3.8rem;
  }
  
  .chat-messages {
    padding: 1.2rem 1.5rem;
  }
  
  .chat-input-area {
    padding: 0.8rem 1.5rem 1.2rem;
  }
  
  .chat-bubble {
    font-size: 1.2rem;
    max-width: 90%;
  }
}