/* Altared Alchemie AI Chatbot Styles */

#aa-chatbot-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: system-ui, -apple-system, sans-serif;
}

#aa-chatbot-container.aa-chatbot-hidden {
  display: none;
}

/* Floating Toggle Button */
#aa-chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E82D05 0%, #E11D48 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(232, 45, 5, 0.4), 
              0 8px 32px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #FFFFFF;
}

#aa-chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(232, 45, 5, 0.5), 
              0 12px 40px rgba(0, 0, 0, 0.4);
}

#aa-chatbot-toggle:active {
  transform: scale(0.95);
}

#aa-chatbot-toggle svg {
  width: 28px;
  height: 28px;
}

/* Chat Window */
#aa-chatbot-window {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 48px);
  height: 600px;
  max-height: calc(100vh - 100px);
  background: #1a1a1a;
  border: 1px solid rgba(232, 45, 5, 0.2);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: bottom right;
}

#aa-chatbot-window.aa-chatbot-window-hidden {
  opacity: 0;
  transform: scale(0.8) translateY(20px);
  pointer-events: none;
}

/* Header */
.aa-chatbot-header {
  background: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aa-chatbot-header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.aa-chatbot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E82D05 0%, #E11D48 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.aa-chatbot-title {
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.aa-chatbot-status {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.aa-chatbot-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #E82D05;
  animation: aa-pulse 2s infinite;
}

@keyframes aa-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

#aa-chatbot-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#aa-chatbot-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

#aa-chatbot-close svg {
  width: 20px;
  height: 20px;
}

/* Messages Container */
.aa-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #1a1a1a;
}

.aa-chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.aa-chatbot-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.aa-chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(232, 45, 5, 0.3);
  border-radius: 3px;
}

.aa-chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(232, 45, 5, 0.5);
}

/* Message Bubbles */
.aa-chatbot-message {
  display: flex;
  animation: aa-message-in 0.3s ease;
}

@keyframes aa-message-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.aa-chatbot-message-bot {
  justify-content: flex-start;
}

.aa-chatbot-message-user {
  justify-content: flex-end;
}

.aa-chatbot-message-content {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.aa-chatbot-message-bot .aa-chatbot-message-content {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom-left-radius: 4px;
}

.aa-chatbot-message-user .aa-chatbot-message-content {
  background: linear-gradient(135deg, #E82D05 0%, #E11D48 100%);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}

.aa-chatbot-message-content a {
  color: #E82D05;
  text-decoration: underline;
  font-weight: 500;
}

.aa-chatbot-message-user .aa-chatbot-message-content a {
  color: #FFFFFF;
  opacity: 0.9;
}

/* Quick Actions */
.aa-chatbot-quick-actions {
  padding: 12px 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 30, 30, 0.6);
}

.aa-chatbot-quick-btn {
  padding: 8px 14px;
  background: rgba(232, 45, 5, 0.1);
  border: 1px solid rgba(232, 45, 5, 0.3);
  border-radius: 20px;
  color: #E82D05;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.aa-chatbot-quick-btn:hover {
  background: rgba(232, 45, 5, 0.2);
  border-color: rgba(232, 45, 5, 0.5);
  transform: translateY(-1px);
}

.aa-chatbot-quick-btn:active {
  transform: translateY(0);
}

/* Input Container */
.aa-chatbot-input-container {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  background: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#aa-chatbot-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 12px 16px;
  color: #FFFFFF;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

#aa-chatbot-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

#aa-chatbot-input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(232, 45, 5, 0.4);
  box-shadow: 0 0 0 3px rgba(232, 45, 5, 0.1);
}

#aa-chatbot-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E82D05 0%, #E11D48 100%);
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

#aa-chatbot-send:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(232, 45, 5, 0.4);
}

#aa-chatbot-send:active {
  transform: scale(0.95);
}

#aa-chatbot-send svg {
  width: 20px;
  height: 20px;
}

/* Footer */
.aa-chatbot-footer {
  padding: 8px 20px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(26, 26, 26, 0.6);
}

/* Mobile Responsive */
@media (max-width: 480px) {
  #aa-chatbot-window {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }
  
  #aa-chatbot-toggle {
    bottom: 20px;
    right: 20px;
  }
  
  .aa-chatbot-message-content {
    max-width: 85%;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  #aa-chatbot-window,
  #aa-chatbot-toggle,
  .aa-chatbot-message {
    animation: none;
    transition: none;
  }
  
  .aa-chatbot-status-dot {
    animation: none;
  }
}

/* Dark mode optimization (already dark, but for consistency) */
@media (prefers-color-scheme: dark) {
  #aa-chatbot-window {
    background: #1a1a1a;
  }
}

