/* Hawthorn Consulting Chatbot Widget - Dark Theme with Gold Accents */
:root {
  --hc-gold: #C8A951;
  --hc-gold-dark: #A68A42;
  --hc-dark-bg: #1a1a2e;
  --hc-dark-card: #16213e;
  --hc-text-primary: #f8fafc;
  --hc-text-secondary: #94a3b8;
  --hc-border: rgba(200, 169, 81, 0.2);
  --hc-shadow: rgba(0, 0, 0, 0.3);
  --hc-glow: rgba(200, 169, 81, 0.15);
}

/* Chatbot Bubble */
.chatbot-bubble {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--hc-gold) 0%, var(--hc-gold-dark) 100%);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--hc-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--hc-dark-bg);
  transition: all 0.3s ease;
  z-index: 10000;
  user-select: none;
}

.chatbot-bubble:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px var(--hc-glow);
}

.chatbot-bubble.active {
  background: var(--hc-gold-dark);
  transform: rotate(45deg);
}

/* Chatbot Container */
.chatbot-container {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 380px;
  height: 500px;
  background: var(--hc-dark-bg);
  border: 1px solid var(--hc-border);
  border-radius: 16px;
  box-shadow: 0 10px 40px var(--hc-shadow);
  display: none;
  flex-direction: column;
  z-index: 10000;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  animation: chatbot-slide-up 0.3s ease-out;
}

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

.chatbot-container.show {
  display: flex;
}

/* Header */
.chatbot-header {
  background: linear-gradient(135deg, var(--hc-gold) 0%, var(--hc-gold-dark) 100%);
  color: var(--hc-dark-bg);
  padding: 16px 20px;
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
}

.chatbot-close {
  background: none;
  border: none;
  color: var(--hc-dark-bg);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.chatbot-close:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

/* Messages Area */
.chatbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: var(--hc-dark-bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Message Bubbles */
.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.message.bot {
  background: var(--hc-dark-card);
  border: 1px solid var(--hc-border);
  color: var(--hc-text-primary);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.message.user {
  background: var(--hc-gold);
  color: var(--hc-dark-bg);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Button Groups */
.chatbot-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.chatbot-btn {
  background: var(--hc-dark-card);
  border: 1px solid var(--hc-border);
  color: var(--hc-text-primary);
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  transition: all 0.2s;
}

.chatbot-btn:hover {
  background: var(--hc-gold);
  color: var(--hc-dark-bg);
  border-color: var(--hc-gold);
}

.chatbot-btn.primary {
  background: var(--hc-gold);
  color: var(--hc-dark-bg);
  border-color: var(--hc-gold);
}

.chatbot-btn.primary:hover {
  background: var(--hc-gold-dark);
  border-color: var(--hc-gold-dark);
}

/* Input Area */
.chatbot-input-area {
  padding: 16px 20px;
  background: var(--hc-dark-card);
  border-radius: 0 0 16px 16px;
  border-top: 1px solid var(--hc-border);
}

.chatbot-input {
  width: 100%;
  background: var(--hc-dark-bg);
  border: 1px solid var(--hc-border);
  color: var(--hc-text-primary);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
}

.chatbot-input:focus {
  border-color: var(--hc-gold);
}

.chatbot-input::placeholder {
  color: var(--hc-text-secondary);
}

/* Form Elements */
.chatbot-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.chatbot-form input {
  background: var(--hc-dark-bg);
  border: 1px solid var(--hc-border);
  color: var(--hc-text-primary);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.chatbot-form input:focus {
  border-color: var(--hc-gold);
}

.chatbot-form input::placeholder {
  color: var(--hc-text-secondary);
}

/* Quote Display */
.quote-summary {
  background: var(--hc-dark-card);
  border: 1px solid var(--hc-border);
  border-radius: 8px;
  padding: 16px;
  margin: 12px 0;
  font-size: 13px;
}

.quote-summary h4 {
  color: var(--hc-gold);
  margin-bottom: 8px;
  font-size: 14px;
}

.quote-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.quote-item:last-child {
  border-bottom: none;
  font-weight: 600;
  color: var(--hc-gold);
  margin-top: 8px;
}

/* Loading Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: var(--hc-dark-card);
  border: 1px solid var(--hc-border);
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  max-width: 60px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--hc-text-secondary);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

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

/* Scrollbar Styling */
.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: var(--hc-border);
  border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: var(--hc-gold);
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .chatbot-container {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: 80px;
  }
  
  .chatbot-bubble {
    right: 10px;
    bottom: 10px;
  }
}