:root {
  --dh-primary: #1a56db;
  --dh-primary-dark: #1440a8;
  --dh-primary-light: #e8f0ff;
  --dh-accent: #16a34a;
  --dh-text: #1f2937;
  --dh-text-light: #6b7280;
  --dh-bg: #ffffff;
  --dh-bg-soft: #f8faff;
  --dh-border: #e5e7eb;
  --dh-radius: 16px;
  --dh-shadow: 0 10px 40px rgba(26, 86, 219, 0.15);
}

.ai-chat-widget-root {
  display: contents;
}
.ai-chat-button {
    position: fixed;
    bottom: 102px;
    right: 30px;
}
.inline-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px 4px;
}

.inline-suggestions button {
  background: var(--dh-primary-light);
  color: var(--dh-primary-dark);
  border: 1px solid var(--dh-border);
  padding: 5px 10px;
  border-radius: 14px;
  font-size: 11.5px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.inline-suggestions button:hover {
  background: var(--dh-primary);
  color: #fff;
}
.ai-chat-box {
  position: fixed;
  bottom: 160px;   /* button bottom + button height + gap */
  right: 24px;
}
/* Floating Button */
.ai-chat-button {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--dh-primary), var(--dh-primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--dh-shadow);
  z-index: 1000;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-chat-button:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 48px rgba(26, 86, 219, 0.25);
}

/* Chat Box */
.ai-chat-box {
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 140px);
  background: var(--dh-bg);
  border-radius: var(--dh-radius);
  box-shadow: var(--dh-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  font-family: "Inter", "Segoe UI", sans-serif;
  animation: dh-slide-up 0.25s ease-out;
}

@keyframes dh-slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-header {
  background: linear-gradient(135deg, var(--dh-primary), var(--dh-primary-dark));
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-header > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
}

.ai-header .online {
  font-size: 12px;
  color: #b9f6ca;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ai-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--dh-bg-soft);
}

.ai-body::-webkit-scrollbar {
  width: 6px;
}
.ai-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.bot-msg,
.user-msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  word-wrap: break-word;
}

.bot-msg {
  align-self: flex-start;
  background: #fff;
  color: var(--dh-text);
  border: 1px solid var(--dh-border);
  border-bottom-left-radius: 4px;
}

.user-msg {
  align-self: flex-end;
  background: var(--dh-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-link {
  color: var(--dh-primary);
  text-decoration: underline;
  word-break: break-all;
}

.user-msg .chat-link {
  color: #dbeafe;
}

.quick-buttons {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  flex-wrap: wrap;
  background: var(--dh-bg-soft);
  border-top: 1px solid var(--dh-border);
}

.quick-buttons button {
  background: var(--dh-primary-light);
  color: var(--dh-primary-dark);
  border: 1px solid transparent;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.quick-buttons button:hover {
  background: var(--dh-primary);
  color: #fff;
}

.ai-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #fff;
  border-top: 1px solid var(--dh-border);
}

.ai-input input {
  flex: 1;
  border: 1px solid var(--dh-border);
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease;
}

.ai-input input:focus {
  border-color: var(--dh-primary);
}

.ai-input button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--dh-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.ai-input button:hover {
  background: var(--dh-primary-dark);
}

/* ================================
   AI DRIVEN PAGE THEME (dark/futuristic)
   ================================ */

.ai-driven-theme {
  --dh-primary: #7c3aed;
  --dh-primary-dark: #5b21b6;
  --dh-primary-light: #f3e8ff;
  --dh-accent: #22d3ee;
  --dh-text: #e5e7eb;
  --dh-bg: #0f0a1f;
  --dh-bg-soft: #150f2e;
  --dh-border: #2e2452;
  --dh-shadow: 0 10px 50px rgba(124, 58, 237, 0.35);
}

.ai-driven-theme .ai-chat-button {
  background: linear-gradient(135deg, #7c3aed, #22d3ee);
  box-shadow: var(--dh-shadow);
}

.ai-driven-theme .ai-chat-button:hover {
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.5);
}

.ai-driven-theme .ai-chat-box {
  background: var(--dh-bg);
  border: 1px solid var(--dh-border);
}

.ai-driven-theme .ai-header {
  background: linear-gradient(135deg, #7c3aed, #4338ca);
  border-bottom: 1px solid var(--dh-border);
}

.ai-driven-theme .ai-header .online {
  color: #22d3ee;
}

.ai-driven-theme .ai-body {
  background: var(--dh-bg);
}

.ai-driven-theme .bot-msg {
  background: var(--dh-bg-soft);
  color: var(--dh-text);
  border: 1px solid var(--dh-border);
}

.ai-driven-theme .user-msg {
  background: linear-gradient(135deg, #7c3aed, #22d3ee);
  color: #fff;
}

.ai-driven-theme .chat-link {
  color: #22d3ee;
}

.ai-driven-theme .user-msg .chat-link {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.6);
}

.ai-driven-theme .quick-buttons {
  background: var(--dh-bg-soft);
  border-top: 1px solid var(--dh-border);
}

.ai-driven-theme .quick-buttons button {
  background: rgba(124, 58, 237, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.ai-driven-theme .quick-buttons button:hover {
  background: linear-gradient(135deg, #7c3aed, #22d3ee);
  color: #fff;
}

.ai-driven-theme .ai-input {
  background: var(--dh-bg-soft);
  border-top: 1px solid var(--dh-border);
}

.ai-driven-theme .ai-input input {
  background: var(--dh-bg);
  border: 1px solid var(--dh-border);
  color: var(--dh-text);
}

.ai-driven-theme .ai-input input::placeholder {
  color: #6b7280;
}

.ai-driven-theme .ai-input input:focus {
  border-color: #22d3ee;
}

.ai-driven-theme .ai-input button {
  background: linear-gradient(135deg, #7c3aed, #22d3ee);
}