/* ============================================================
   JIMÉNEZ AUTO REPAIR — CHATBOT CSS
   ============================================================ */

/* Toggle Button */
.chatbot-toggle {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 901;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A1A1A, #2E2E2E);
  border: 2px solid #F5C800;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), var(--glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #F5C800;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
}
.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 32px rgba(0,0,0,0.5), 0 0 40px rgba(245,200,0,0.5);
}
.chatbot-toggle .notif-dot {
  position: absolute;
  top: 3px; right: 3px;
  width: 12px; height: 12px;
  background: #F5C800;
  border-radius: 50%;
  border: 2px solid #0D0D0D;
  animation: notifPulse 2s infinite;
}
@keyframes notifPulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* Chat Window */
.chatbot-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 902;
  width: min(380px, calc(100vw - 32px));
  height: min(580px, calc(100vh - 130px));
  background: #1A1A1A;
  border: 1px solid #2E2E2E;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(245,200,0,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
  transform-origin: bottom right;
}
.chatbot-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Header */
.chat-header {
  background: linear-gradient(135deg, #F5C800, #D4A900);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.chat-header-avatar {
  width: 42px; height: 42px;
  background: rgba(0,0,0,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.chat-header-info { flex: 1; }
.chat-header-info h4 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #0D0D0D;
  line-height: 1.2;
}
.chat-header-info small {
  font-size: 0.75rem;
  color: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  gap: 4px;
}
.chat-status-dot {
  width: 6px; height: 6px;
  background: #1A7A1A;
  border-radius: 50%;
}
.chat-close-btn {
  width: 28px; height: 28px;
  background: rgba(0,0,0,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: rgba(0,0,0,0.7);
  transition: all 0.2s;
}
.chat-close-btn:hover {
  background: rgba(0,0,0,0.3);
  color: #0D0D0D;
}

/* Messages area */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: #2E2E2E transparent;
}
.chat-message {
  display: flex;
  gap: 8px;
  max-width: 90%;
  animation: chatMsgIn 0.3s ease both;
}
@keyframes chatMsgIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-message.bot { align-self: flex-start; }
.chat-message.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #F5C800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #0D0D0D;
  flex-shrink: 0;
  margin-top: 2px;
}
.chat-bubble {
  background: #2E2E2E;
  color: #F5F5F5;
  padding: 10px 14px;
  border-radius: 16px 16px 16px 4px;
  font-size: 0.88rem;
  line-height: 1.6;
  border: 1px solid rgba(255,255,255,0.05);
}
.chat-message.user .chat-bubble {
  background: linear-gradient(135deg, #F5C800, #D4A900);
  color: #0D0D0D;
  border-radius: 16px 16px 4px 16px;
  font-weight: 500;
  border: none;
}
.chat-message.user .chat-msg-avatar {
  background: #2E2E2E;
  color: #F5C800;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 10px 14px;
  background: #2E2E2E;
  border-radius: 16px 16px 16px 4px;
  width: fit-content;
}
.typing-dot {
  width: 6px; height: 6px;
  background: rgba(245,200,0,0.6);
  border-radius: 50%;
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%,60%,100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Quick replies */
.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
}
.quick-reply-btn {
  background: rgba(245,200,0,0.1);
  border: 1px solid rgba(245,200,0,0.3);
  color: #F5C800;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}
.quick-reply-btn:hover {
  background: #F5C800;
  color: #0D0D0D;
}

/* Input area */
.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid #2E2E2E;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
  background: #1A1A1A;
}
.chat-input {
  flex: 1;
  background: #2E2E2E;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 10px 14px;
  color: #F5F5F5;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  resize: none;
  min-height: 40px;
  max-height: 100px;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: rgba(245,200,0,0.4); }
.chat-send-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #F5C800;
  color: #0D0D0D;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all 0.2s;
}
.chat-send-btn:hover {
  background: #D4A900;
  transform: scale(1.1);
}
.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .chatbot-toggle { bottom: 90px; right: 16px; width: 54px; height: 54px; }
  .chatbot-window { right: 12px; bottom: 80px; width: calc(100vw - 24px); }
}
