:root {
  --ds-900: #0f172a;
  --ds-800: #1e293b;
  --ds-accent: #1d4ed8;
  --ds-accent-soft: #eff6ff;
}

#ds-ai-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

#ds-ai-chat .ds-fab {
  background: var(--ds-accent);
  color: #fff;
  border: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.35);
  cursor: pointer;
  font-size: 24px;
}

#ds-ai-chat .ds-chat-window {
  width: min(380px, calc(100vw - 28px));
  max-height: 72vh;
  display: none;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

#ds-ai-chat.ds-chat-open .ds-chat-window { display: flex; }

#ds-ai-chat .ds-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
}

#ds-ai-chat .ds-chat-title {
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 0.95rem;
}

#ds-ai-chat .ds-btn-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  opacity: 0.85;
  line-height: 1;
}

#ds-ai-chat .ds-chat-messages {
  padding: 12px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  overflow: auto;
  flex: 1;
  min-height: 180px;
  scroll-behavior: smooth;
}

.ds-msg {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  align-items: flex-start;
}

.ds-msg .ds-avatar {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eef2f7;
  font-size: 14px;
  flex-shrink: 0;
}

.ds-msg-bot .ds-avatar { background: var(--ds-accent-soft); }

.ds-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #eef2f7;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  font-size: 14px;
  line-height: 1.4;
  color: #0f172a;
}

.ds-bubble ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.ds-msg-user { justify-content: flex-end; }
.ds-msg-user .ds-bubble {
  background: var(--ds-accent-soft);
  border-color: #bfdbfe;
}

.ds-suggest-bar {
  border-top: 1px solid #eef2f7;
  background: #f8fafc;
  padding: 8px 10px 6px;
  flex-shrink: 0;
}

.ds-suggest-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.ds-chat-input {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #eef2f7;
  background: #fff;
  flex-shrink: 0;
}

.ds-chat-input input {
  flex: 1;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}

.ds-chat-input input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.ds-btn-send {
  background: var(--ds-accent);
  color: #fff;
  border: 0;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.ds-chat-hidden .ds-chat-window { display: none; }
#ds-ai-chat.ds-chat-open .ds-fab { display: none; }
#ds-ai-chat.ds-chat-hidden .ds-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ds-suggestions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.ds-suggestions button {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  color: #1e293b;
  white-space: nowrap;
  flex-shrink: 0;
}

.ds-suggestions button:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.ds-typing {
  font-size: 12px;
  color: #64748b;
  padding: 0 4px 8px;
}
