/* AI Chatbot Styles */
#travokro-chatbot {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Inter', sans-serif;
}

#chatbot-toggle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: white;
  border: none;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#chatbot-toggle-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.5);
}

#chatbot-toggle-btn svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

#chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 360px;
  height: 550px;
  max-height: calc(100vh - 120px);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
  animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#chatbot-window.active {
  display: flex;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#chatbot-header {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#chatbot-header .title {
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

#chatbot-header .title span.status {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.2);
}

#chatbot-close-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}
#chatbot-close-btn:hover { opacity: 1; }

#chatbot-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Chat Messages */
.chat-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg.ai {
  background: #ffffff;
  color: #1e293b;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
}

.chat-msg.user {
  background: #2563eb;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}

/* Markdown formatting in AI message */
.chat-msg.ai strong { font-weight: 700; color: #0f172a; }
.chat-msg.ai ul { margin-top: 8px; padding-left: 20px; list-style-type: disc; }
.chat-msg.ai li { margin-bottom: 4px; }
.chat-msg.ai a { color: #2563eb; text-decoration: underline; font-weight: 600; }

/* Pre-chat Form */
#chatbot-lead-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px;
}

#chatbot-lead-form h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 5px;
}
#chatbot-lead-form p {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 10px;
}

.chat-input-field {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chat-input-field:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.chat-submit-btn {
  background: #2563eb;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 5px;
}
.chat-submit-btn:hover { background: #1d4ed8; }

/* Chat Input Area */
#chatbot-footer {
  padding: 15px;
  background: white;
  border-top: 1px solid #f1f5f9;
  display: none;
  align-items: center;
  gap: 10px;
}

#chatbot-footer.active {
  display: flex;
}

#chat-input-msg {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 0.95rem;
  outline: none;
  background: #f8fafc;
}
#chat-input-msg:focus {
  background: #ffffff;
  border-color: #cbd5e1;
}

#chat-send-btn {
  background: #2563eb;
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}
#chat-send-btn:hover {
  transform: scale(1.05);
  background: #1d4ed8;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  align-items: center;
}
.typing-indicator span {
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out both;
}
.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

@media (max-width: 480px) {
  #chatbot-window {
    width: calc(100vw - 40px);
    right: -4px;
  }
}
