#ai-chat-widget { position: fixed; bottom: 24px; right: 24px; z-index: 9999; font-family: 'DM Sans', sans-serif; }
#ai-chat-btn { width: 60px; height: 60px; border-radius: 50%; background: var(--accent, #e63946); color: white; font-size: 28px; border: none; cursor: pointer; box-shadow: 0 4px 16px rgba(230,57,70,0.4); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); display: flex; justify-content: center; align-items: center; }
#ai-chat-btn:hover { transform: scale(1.1); }

#ai-chat-box { position: absolute; bottom: 80px; right: 0; width: 360px; height: 480px; background: var(--bg, #fff); border-radius: 16px; box-shadow: 0 12px 32px rgba(0,0,0,0.15); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border, #eee); transition: all 0.3s ease; transform-origin: bottom right; }
#ai-chat-box.hidden { transform: scale(0.5); opacity: 0; pointer-events: none; }

.chat-header { background: var(--accent, #e63946); color: white; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; }
.chat-header h3 { margin: 0; font-size: 1.05rem; font-weight: 600; letter-spacing: 0.5px; }
#ai-close-btn { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; line-height: 1; transition: opacity 0.2s; }
#ai-close-btn:hover { opacity: 0.7; }

.chat-body { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background: var(--bg2, #fafafa); scroll-behavior: smooth; }
.message { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 0.9rem; line-height: 1.5; color: var(--text, #333); word-wrap: break-word; }
.message.ai { background: var(--card, #fff); border: 1px solid var(--border, #eee); align-self: flex-start; border-bottom-left-radius: 4px; }
.message.user { background: var(--accent, #e63946); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }

.chat-footer { padding: 12px; background: var(--bg, #fff); border-top: 1px solid var(--border, #eee); display: flex; gap: 8px; }
#ai-chat-input { flex: 1; padding: 12px 16px; border: 1.5px solid var(--border, #ddd); border-radius: 24px; outline: none; font-family: inherit; font-size: 0.9rem; background: var(--bg, #fff); color: var(--text, #333); transition: border-color 0.2s; }
#ai-chat-input:focus { border-color: var(--accent, #e63946); }
#ai-send-btn { padding: 8px 18px; background: var(--accent, #e63946); color: white; border: none; border-radius: 24px; cursor: pointer; font-weight: 600; transition: opacity 0.2s; }
#ai-send-btn:disabled { opacity: 0.6; cursor: not-allowed; }