




.chatbot-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-primary), var(--teal-dark));
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(9,20,40,0.35);
  z-index: 9000;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s ease;
}
.chatbot-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 32px rgba(9,20,40,0.45);
}
.chatbot-fab:active { transform: scale(0.96); }
.chatbot-fab-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(14,165,233,0.4);
  animation: chatPulse 2.4s ease-out infinite;
}
@keyframes chatPulse {
  0%   { transform: scale(1); opacity: 0.8; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { opacity: 0; }
}
.chatbot-fab-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  background: #e53e3e;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  color: #fff;
}
.chatbot-fab-badge.show { display: flex; }


.chatbot-window {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 370px;
  max-height: 560px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(9,20,40,0.2);
  z-index: 9001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.25s ease;
}
.chatbot-window.hidden {
  transform: scale(0.7) translateY(24px);
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 767px) {
  .chatbot-fab {
    bottom: calc(76px + env(safe-area-inset-bottom)) !important;
    right: 16px !important;
  }
  .chatbot-window {
    bottom: calc(148px + env(safe-area-inset-bottom)) !important;
    right: 16px !important;
  }
}

@media (max-width: 480px) {
  .chatbot-window {
    width: calc(100vw - 24px);
    right: 12px;
    max-height: 70vh;
  }
}


.chatbot-header {
  background: linear-gradient(135deg, var(--teal-primary), var(--teal-dark));
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.chatbot-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chatbot-header-info { flex: 1; }
.chatbot-header-name { font-size: 15px; font-weight: 700; }
.chatbot-header-status {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
}
.chatbot-status-dot {
  width: 7px; height: 7px;
  background: #4ade80;
  border-radius: 50%;
  animation: statusBlink 2s ease-in-out infinite;
}
@keyframes statusBlink {
  0%,100% { opacity: 1; } 50% { opacity: 0.4; }
}
.chatbot-header-close {
  background: none; border: none; color: rgba(255,255,255,0.7);
  cursor: pointer; padding: 4px; border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.chatbot-header-close:hover { color: #fff; background: rgba(255,255,255,0.1); }


.chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 14px 6px;
  flex-shrink: 0;
  border-bottom: 1px solid #f0f0f0;
}
.chatbot-chip {
  padding: 5px 11px;
  border-radius: 99px;
  border: 1.5px solid var(--border-default);
  background: var(--teal-light);
  color: var(--teal-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.chatbot-chip:hover { background: var(--teal-primary); color: #fff; border-color: var(--teal-primary); }


.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.chatbot-messages::-webkit-scrollbar { width: 4px; }
.chatbot-messages::-webkit-scrollbar-track { background: transparent; }
.chatbot-messages::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }


.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  animation: msgIn 0.25s ease;
}
@keyframes msgIn {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
.chat-msg.user { flex-direction: row-reverse; }
.chat-msg-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-primary), var(--teal-dark));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-msg-bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #1a1a2e;
}
.chat-msg.bot .chat-msg-bubble {
  background: #f4f6f9;
  border-bottom-left-radius: 4px;
}
.chat-msg.user .chat-msg-bubble {
  background: var(--teal-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg-time {
  font-size: 10px;
  color: #a0aab4;
  margin-top: 2px;
  text-align: right;
}


.chat-typing { display: flex; gap: 4px; align-items: center; padding: 8px 4px; }
.chat-typing span {
  width: 7px; height: 7px;
  background: #a0aab4;
  border-radius: 50%;
  animation: typingDot 1.4s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%,60%,100% { transform: translateY(0); }
  30%          { transform: translateY(-6px); }
}


.chatbot-input-area {
  padding: 12px 14px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.chatbot-input {
  flex: 1;
  border: 1.5px solid #e0e4eb;
  border-radius: 12px;
  padding: 9px 13px;
  font-size: 13.5px;
  font-family: inherit;
  color: #1a1a2e;
  resize: none;
  min-height: 40px;
  max-height: 100px;
  outline: none;
  transition: border-color 0.15s;
  line-height: 1.4;
}
.chatbot-input:focus { border-color: var(--teal-primary); }
.chatbot-send-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--teal-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}
.chatbot-send-btn:hover { background: var(--teal-dark); transform: scale(1.05); }
.chatbot-send-btn:active { transform: scale(0.95); }
