/* AI Chat Bubble + Panel */
#ai-chat-bubble {
  position: fixed; bottom: 24px; right: 80px; width: 48px; height: 48px;
  border-radius: 50%; background: linear-gradient(135deg,#3b82f6,#2563eb);
  color: #fff; border: none; font-size: 1.3em; cursor: pointer;
  box-shadow: 0 4px 16px rgba(59,130,246,.4); z-index: 999;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
#ai-chat-bubble:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(59,130,246,.5); }

#ai-chat-panel {
  position: fixed; bottom: 80px; right: 80px; width: 380px; height: 500px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3); z-index: 999; display: none;
  flex-direction: column; overflow: hidden; backdrop-filter: blur(20px);
}

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

#ai-chat-header {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: .9em;
}

#ai-chat-messages {
  flex: 1; overflow-y: auto; padding: 12px 16px; display: flex;
  flex-direction: column; gap: 8px;
}

.ai-msg {
  padding: 10px 14px; border-radius: 12px; font-size: .82em;
  line-height: 1.5; max-width: 85%; animation: fadeSlide .2s ease;
}
.ai-user { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ai-bot { background: var(--bg-card); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.ai-bot-icon { margin-right: 4px; }

#ai-chat-input-row {
  display: flex; gap: 8px; padding: 10px 12px;
  border-top: 1px solid var(--border);
}
#ai-chat-input {
  flex: 1; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg-input); color: var(--text);
  font-size: .85em; outline: none; font-family: inherit;
}
#ai-chat-input:focus { border-color: var(--primary); }
#ai-chat-send {
  padding: 10px 16px; border: none; border-radius: 8px;
  background: var(--primary); color: #fff; font-weight: 600;
  cursor: pointer; font-family: inherit; font-size: .85em;
}
#ai-chat-send:disabled { opacity: .5; cursor: not-allowed; }

/* Address autocomplete dropdown */
.ac-container { position: relative; }
.ac-dropdown-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 100;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 0 0 8px 8px; max-height: 200px; overflow-y: auto;
  display: none; box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.ac-dropdown-list.open { display: block; }
.ac-item {
  padding: 8px 12px; font-size: .82em; cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: var(--primary-light); color: var(--primary); }
