/* BUDGET LLD, Hybrid Chat Widget CSS */
#ago-ai-widget { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 14px; line-height: 1.5; }

/* Toggle button */
.ago-ai-toggle { position: fixed; bottom: 20px; z-index: 99998; width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer; box-shadow: 0 6px 20px rgba(245, 125, 20, 0.45); display: flex; align-items: center; justify-content: center; transition: transform 0.2s, box-shadow 0.2s; }
.ago-ai-toggle:hover { transform: scale(1.08); box-shadow: 0 8px 25px rgba(245, 125, 20, 0.6); }
.ago-ai-toggle svg { width: 28px; height: 28px; fill: #fff; }
.ago-ai-toggle.right { right: 20px; }
.ago-ai-toggle.left { left: 20px; }
.ago-ai-toggle.ago-offset-1 { bottom: 100px; }
.ago-ai-toggle.ago-offset-2 { bottom: 180px; }

/* Chat window */
.ago-ai-window { position: fixed; bottom: 92px; z-index: 99999; width: 390px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 115px); border-radius: 16px; background: #fff; box-shadow: 0 10px 38px rgba(0,0,0,0.22); display: none; flex-direction: column; overflow: hidden; border: 1px solid rgba(0,0,0,0.06); }
.ago-ai-window.right { right: 20px; }
.ago-ai-window.left { left: 20px; }
.ago-ai-window.ago-offset-1 { bottom: 170px; }
.ago-ai-window.ago-offset-2 { bottom: 250px; }
.ago-ai-window.open { display: flex; animation: agoFadeUp 0.2s ease-out; }

@keyframes agoFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.ago-ai-header { padding: 14px 16px; display: flex; align-items: center; gap: 10px; color: #fff; }
.ago-ai-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,0.2); padding: 2px; }
.ago-ai-header-info { flex: 1; min-width: 0; }
.ago-ai-header-info h3 { margin: 0; font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 0.2px; }
.ago-ai-header-info span { font-size: 11.5px; opacity: 0.92; display: flex; align-items: center; gap: 5px; }
.ago-online-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; display: inline-block; box-shadow: 0 0 6px #4ade80; }
.ago-ai-reset, .ago-ai-close { background: rgba(255,255,255,0.15); border: none; color: #fff; width: 28px; height: 28px; border-radius: 50%; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s; padding: 0; }
.ago-ai-close { font-size: 20px; }
.ago-ai-reset:hover, .ago-ai-close:hover { background: rgba(255,255,255,0.3); }

/* Messages */
.ago-ai-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #f8f9fa; }
.ago-ai-msg { max-width: 84%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; word-break: break-word; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.ago-ai-msg.user { align-self: flex-end; color: #fff; border-bottom-right-radius: 4px; }
.ago-ai-msg.bot { align-self: flex-start; background: #fff; color: #1d2327; border-bottom-left-radius: 4px; border: 1px solid #eceef0; }
.ago-ai-msg.thinking { color: #666; font-style: italic; }

/* Suggestions chips */
.ago-ai-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ago-ai-chip { background: #fff; border: 1px solid #f57d14; color: #d96400; border-radius: 16px; padding: 6px 12px; font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all 0.15s ease; text-align: left; line-height: 1.3; font-family: inherit; }
.ago-ai-chip:hover { background: #f57d14; color: #fff; transform: translateY(-1px); }

/* Quick contact bar */
.ago-ai-quickbar { display: flex; justify-content: space-between; gap: 8px; padding: 7px 14px; background: #fff7f0; border-top: 1px solid #fde3cc; font-size: 12px; }
.ago-quick-link { color: #c75b00 !important; text-decoration: none !important; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.ago-quick-link:hover { text-decoration: underline !important; }

/* Input */
.ago-ai-input-area { padding: 10px 12px; border-top: 1px solid #eee; display: flex; gap: 8px; background: #fff; align-items: center; }
.ago-ai-input { flex: 1; border: 1px solid #dcdcde; border-radius: 22px; padding: 9px 15px; font-size: 13.5px; outline: none; font-family: inherit; transition: border-color 0.2s; }
.ago-ai-input:focus { border-color: #f57d14; }
.ago-ai-send { border: none; border-radius: 50%; width: 38px; height: 38px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: opacity 0.2s; flex-shrink: 0; }
.ago-ai-send:hover { opacity: 0.9; }
.ago-ai-send svg { width: 18px; height: 18px; fill: #fff; }

/* Typing dots */
.ago-dots span { animation: agoBlink 1.4s infinite both; font-weight: bold; font-size: 16px; }
.ago-dots span:nth-child(2) { animation-delay: 0.2s; }
.ago-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes agoBlink { 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } }

/* Markdown in bot messages */
.ago-ai-msg.bot strong { font-weight: 600; color: #111; }
.ago-ai-msg.bot em { font-style: italic; }
.ago-ai-msg.bot ul { margin: 6px 0; padding-left: 18px; }
.ago-ai-msg.bot li { margin: 3px 0; }
.ago-ai-msg.bot a { color: #d96400; font-weight: 600; text-decoration: underline; }

@media (max-width: 480px) {
    .ago-ai-window { width: 100%; max-width: 100%; bottom: 0; right: 0; left: 0; height: 100vh; max-height: 100vh; border-radius: 0; }
    .ago-ai-toggle { bottom: 16px; }
}
