/* ========================================
   AETHONEX CHATBOT - PRODUCTION STYLING
   ======================================== */

/* Chat Bubble - Floating Button */
.chatbot-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c6a86b 0%, #a88c4a 100%);
  border: none;
  box-shadow: 0 8px 24px rgba(198, 168, 107, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 24px;
}

.chatbot-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 32px rgba(198, 168, 107, 0.4);
}

.chatbot-bubble:active {
  transform: scale(0.96);
}

/* Badge counter for unread messages */
.chatbot-bubble-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ffb4ab;
  color: #131313;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  border: 2px solid #131313;
}

/* Chat Container */
.chatbot-container {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 100%;
  max-width: 420px;
  height: 600px;
  max-height: 80vh;
  background: #131313;
  border: 1px solid rgba(198, 168, 107, 0.2);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 1px rgba(198, 168, 107, 0.3) inset;
  display: flex;
  flex-direction: column;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
}

.chatbot-container.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Chat Header */
.chatbot-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(198, 168, 107, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(198, 168, 107, 0.05);
}

.chatbot-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #e5e2e1;
  font-family: 'Syne', sans-serif;
  letter-spacing: -0.01em;
}

.chatbot-header-subtitle {
  font-size: 12px;
  color: #d0c5b5;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.chatbot-close-btn {
  background: none;
  border: none;
  color: #d0c5b5;
  cursor: pointer;
  font-size: 20px;
  padding: 0;
  transition: color 0.2s;
}

.chatbot-close-btn:hover {
  color: #e5e2e1;
}

/* Messages Container */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #131313;
}

/* Scrollbar styling */
.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: rgba(198, 168, 107, 0.05);
  border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(198, 168, 107, 0.2);
  border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(198, 168, 107, 0.3);
}

/* Message Bubble */
.chatbot-message {
  display: flex;
  gap: 8px;
  animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chatbot-message.user {
  justify-content: flex-end;
}

.chatbot-message-content {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  font-family: 'Inter', sans-serif;
}

.chatbot-message.assistant .chatbot-message-content {
  background: rgba(198, 168, 107, 0.1);
  color: #e5e2e1;
  border: 1px solid rgba(198, 168, 107, 0.15);
}

.chatbot-message.user .chatbot-message-content {
  background: linear-gradient(135deg, #c6a86b 0%, #a88c4a 100%);
  color: #131313;
  font-weight: 500;
}

/* AI Disclaimer */
.chatbot-disclaimer {
  padding: 0 20px;
  font-size: 11px;
  color: #998f81;
  text-align: center;
  font-style: italic;
  margin-top: 8px;
}

/* Suggested Prompts */
.chatbot-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px;
  margin-bottom: 12px;
}

.chatbot-suggestion-btn {
  background: rgba(198, 168, 107, 0.08);
  border: 1px solid rgba(198, 168, 107, 0.15);
  color: #d0c5b5;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.chatbot-suggestion-btn:hover {
  background: rgba(198, 168, 107, 0.15);
  border-color: rgba(198, 168, 107, 0.25);
  color: #e5e2e1;
}

/* Input Area */
.chatbot-input-area {
  padding: 16px;
  border-top: 1px solid rgba(198, 168, 107, 0.1);
  display: flex;
  gap: 8px;
  background: rgba(198, 168, 107, 0.02);
}

.chatbot-input {
  flex: 1;
  background: rgba(198, 168, 107, 0.05);
  border: 1px solid rgba(198, 168, 107, 0.15);
  color: #e5e2e1;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
  outline: none;
}

.chatbot-input:focus {
  background: rgba(198, 168, 107, 0.08);
  border-color: rgba(198, 168, 107, 0.3);
  box-shadow: 0 0 0 3px rgba(198, 168, 107, 0.1);
}

.chatbot-input::placeholder {
  color: #998f81;
}

.chatbot-send-btn {
  background: linear-gradient(135deg, #c6a86b 0%, #a88c4a 100%);
  border: none;
  color: #131313;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 16px;
  font-weight: bold;
}

.chatbot-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(198, 168, 107, 0.3);
}

.chatbot-send-btn:active {
  transform: translateY(0);
}

.chatbot-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Call-to-Action Button */
.chatbot-cta-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin: 12px 20px;
  background: linear-gradient(135deg, #c6a86b 0%, #a88c4a 100%);
  color: #131313;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  font-family: 'Syne', sans-serif;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.chatbot-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(198, 168, 107, 0.3);
}

/* Loading indicator */
.chatbot-loading {
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  background: rgba(198, 168, 107, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(198, 168, 107, 0.15);
}

.chatbot-loading-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c6a86b;
  animation: dotPulse 1.4s infinite;
}

.chatbot-loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.chatbot-loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-6px);
  }
}

/* Responsive Design */
@media (max-width: 480px) {
  .chatbot-bubble {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .chatbot-container {
    bottom: 80px;
    right: 12px;
    left: 12px;
    max-width: none;
    width: auto;
    height: 500px;
    border-radius: 12px;
  }

  .chatbot-header h3 {
    font-size: 15px;
  }

  .chatbot-message-content {
    max-width: 90%;
    font-size: 13px;
  }

  .chatbot-input {
    font-size: 13px;
  }
}

/* Dark mode support (already dark, but ensure consistency) */
@media (prefers-color-scheme: dark) {
  .chatbot-bubble {
    background: linear-gradient(135deg, #c6a86b 0%, #a88c4a 100%);
  }

  .chatbot-container {
    background: #131313;
  }
}

/* Print styles */
@media print {
  .chatbot-bubble,
  .chatbot-container {
    display: none !important;
  }
}
