/* BotforBizz Embeddable Chat Widget */
#botforbizz-chat-root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --bg: #09090b;
  --surface: #18181b;
  --surface-2: #27272a;
  --border: #3f3f46;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --radius: 16px;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

#botforbizz-chat-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgb(59 130 246 / 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  z-index: 9998;
  transition: transform 0.2s, box-shadow 0.2s;
}

#botforbizz-chat-button:hover {
  transform: scale(1.08);
  box-shadow: 0 15px 30px -5px rgb(59 130 246 / 0.55);
}

#botforbizz-chat-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 140px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#botforbizz-chat-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

#botforbizz-chat-header {
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

#botforbizz-chat-header .title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

#botforbizz-chat-header .status {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
}

#botforbizz-chat-header .actions {
  display: flex;
  gap: 6px;
}

#botforbizz-chat-header button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

#botforbizz-chat-header button:hover {
  background: var(--surface-2);
  color: var(--text);
}

#botforbizz-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

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

.message strong {
  font-weight: 600;
  color: #93c5fd;          /* light blue for bold text */
}

.message em {
  font-style: italic;
}

.message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.bot {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.message.bot.typing {
  color: var(--text-muted);
  font-style: italic;
}

.code-block {
  position: relative;
  background: #1e1e1e;
  border-radius: 8px;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid #333;
}

.code-block pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.55;
  color: #e5e5e5;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  z-index: 2;
}

.copy-btn:hover {
  background: #555;
}

.inline-code {
  background: #2a2a2a;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
}

#botforbizz-chat-input-area {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

#botforbizz-chat-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  resize: none;
  max-height: 100px;
  outline: none;
  transition: border-color 0.15s;
}

#botforbizz-chat-input:focus {
  border-color: var(--primary);
}

#botforbizz-chat-send {
  background: var(--primary);
  color: white;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.15s;
  flex-shrink: 0;
}

#botforbizz-chat-send:hover {
  background: var(--primary-hover);
}

#botforbizz-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile */
@media (max-width: 480px) {
  #botforbizz-chat-window {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  #botforbizz-chat-button {
    bottom: 20px;
    right: 20px;
  }
}

