/* Bindi Chat Widget - Floating chat bubble with AI-powered responses */
.bindi-chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e2a84b, #d4942e);
  border: 3px solid white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: bindi-bounce 3s ease-in-out infinite;
}
.bindi-chat-launcher:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(0,0,0,0.35);
}
.bindi-chat-launcher .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #e53e3e;
  color: white;
  font-size: 0.65rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

@keyframes bindi-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Chat Window */
.bindi-chat-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 9998;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 480px;
  max-height: calc(100vh - 140px);
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Nunito', sans-serif;
}
.bindi-chat-window.open {
  display: flex;
  animation: bindi-slide-up 0.3s ease;
}

@keyframes bindi-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Chat Header */
.bindi-chat-header {
  background: linear-gradient(135deg, #e2a84b, #d4942e);
  color: white;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bindi-chat-header img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid white;
  object-fit: cover;
}
.bindi-chat-header .info {
  flex: 1;
}
.bindi-chat-header .info h4 {
  font-size: 0.95rem;
  margin: 0;
  font-weight: 800;
}
.bindi-chat-header .info small {
  font-size: 0.75rem;
  opacity: 0.9;
}
.bindi-chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.bindi-chat-close:hover { opacity: 1; }

/* Chat Messages */
.bindi-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f7fafc;
}
.bindi-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  word-wrap: break-word;
}
.bindi-msg.bot {
  background: white;
  border: 1px solid #e2e8f0;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.bindi-msg.user {
  background: linear-gradient(135deg, #e2a84b, #d4942e);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.bindi-msg.bot .emoji {
  display: inline-block;
  margin-right: 4px;
}
.bindi-typing {
  align-self: flex-start;
  padding: 10px 14px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  font-size: 0.85rem;
  color: #718096;
  animation: bindi-pulse 1.2s infinite;
}
@keyframes bindi-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Quick Replies */
.bindi-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 8px;
  background: #f7fafc;
}
.bindi-quick-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid #e2a84b;
  background: white;
  color: #d4942e;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.bindi-quick-btn:hover {
  background: #e2a84b;
  color: white;
}

/* Input Area */
.bindi-chat-input {
  display: flex;
  padding: 12px;
  border-top: 1px solid #e2e8f0;
  background: white;
  gap: 8px;
}
.bindi-chat-input input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  font-size: 0.88rem;
  outline: none;
  font-family: 'Nunito', sans-serif;
}
.bindi-chat-input input:focus { border-color: #e2a84b; }
.bindi-chat-input button {
  background: linear-gradient(135deg, #e2a84b, #d4942e);
  border: none;
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s;
}
.bindi-chat-input button:hover { transform: scale(1.1); }

/* Mobile */
@media (max-width: 480px) {
  .bindi-chat-window {
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .bindi-chat-launcher { bottom: 16px; right: 16px; width: 56px; height: 56px; font-size: 1.5rem; }
}

/* Respect reduced motion and calm mode */
@media (prefers-reduced-motion: reduce) {
  .bindi-chat-launcher { animation: none; }
  .bindi-chat-window.open { animation: none; }
  .bindi-typing { animation: none; opacity: 1; }
}
body.calm-mode .bindi-chat-launcher { animation: none; }
body.calm-mode .bindi-chat-window.open { animation: none; }
body.calm-mode .bindi-typing { animation: none; opacity: 1; }
