/* Chatbot Styles */
.chatbot-toggler {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 50px;
  height: 50px;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  border: none;
  outline: none;
}
.chatbot-toggler:hover {
  transform: scale(1.05);
}
.chatbot-toggler svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.chatbot-window {
  position: fixed;
  bottom: 90px;
  left: 24px;
  width: 350px;
  max-width: calc(100vw - 48px);
  background: var(--bg, #ffffff);
  color: var(--text, #1e293b);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.3s ease;
  overflow: hidden;
  border: 1px solid var(--border, rgba(0,0,0,0.1));
}

[data-theme="dark"] .chatbot-window {
  background: #0f172a;
  color: #f8fafc;
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.chatbot-window.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.chatbot-header {
  background: #3b82f6;
  color: white;
  padding: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chatbot-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chatbot-action-btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.chatbot-action-btn:hover {
  background: rgba(255,255,255,0.2);
}

.chatbot-body {
  padding: 16px;
  height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chatbot-message {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.chatbot-message a {
  color: #3b82f6;
  text-decoration: underline;
}

[data-theme="dark"] .chatbot-message a {
  color: #60a5fa;
}

.chatbot-message.bot {
  align-self: flex-start;
  background: var(--surface, #f1f5f9);
  color: var(--text, #1e293b);
  border-bottom-left-radius: 2px;
}
[data-theme="dark"] .chatbot-message.bot {
  background: #1e293b;
  color: #f8fafc;
}

.chatbot-message.user {
  align-self: flex-end;
  background: #3b82f6;
  color: white;
  border-bottom-right-radius: 2px;
}

/* Typing Indicator */
.chatbot-typing {
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  align-items: center;
}
.chatbot-typing .dot {
  width: 6px;
  height: 6px;
  background-color: #94a3b8;
  border-radius: 50%;
  animation: chatbotBounce 1.4s infinite ease-in-out both;
}
.chatbot-typing .dot:nth-child(1) {
  animation-delay: -0.32s;
}
.chatbot-typing .dot:nth-child(2) {
  animation-delay: -0.16s;
}
@keyframes chatbotBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chatbot-suggestion-btn {
  background: var(--surface, #e2e8f0);
  border: 1px solid var(--border, #cbd5e1);
  color: var(--text, #334155);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chatbot-suggestion-btn:hover {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

[data-theme="dark"] .chatbot-suggestion-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
[data-theme="dark"] .chatbot-suggestion-btn:hover {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.chatbot-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border, rgba(0,0,0,0.1));
  display: flex;
  gap: 8px;
}
[data-theme="dark"] .chatbot-footer {
  border-top-color: rgba(255,255,255,0.1);
}

.chatbot-input {
  flex: 1;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.9rem;
  outline: none;
  background: var(--bg, #ffffff);
  color: var(--text, #1e293b);
  font-family: inherit;
}
[data-theme="dark"] .chatbot-input {
  border-color: #334155;
  background: #0f172a;
  color: #f8fafc;
}
.chatbot-input:focus {
  border-color: #3b82f6;
}

.chatbot-send {
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.chatbot-send:hover {
  background: #2563eb;
}
.chatbot-send svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}