/* Reset & Base */ * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Tajawal', sans-serif; } body { font-family: 'Tajawal', sans-serif; background: #f8fafc; overflow-x: hidden; } /* Chat Widget Container */ #alolo-chat-widget { position: fixed; bottom: 30px; left: 30px; z-index: 9999; font-family: 'Tajawal', sans-serif; } /* Chat Toggle Button */ .chat-toggle { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #8b5cf6); border: none; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4); transition: all 0.3s ease; position: relative; } .chat-toggle:hover { transform: scale(1.08); box-shadow: 0 12px 30px rgba(99, 102, 241, 0.6); } .chat-toggle i { font-size: 24px; } .chat-toggle .notification-badge { position: absolute; top: -5px; right: -5px; background: #ef4444; color: white; border-radius: 50%; width: 20px; height: 20px; font-size: 12px; display: flex; align-items: center; justify-content: center; } /* Chat Window */ .chat-window { position: absolute; bottom: 80px; left: 0; width: 380px; height: 580px; background: white; border-radius: 20px; box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15); display: none; flex-direction: column; overflow: hidden; border: 1px solid #e2e8f0; } .chat-window.active { display: flex; animation: slideUp 0.3s ease; } @keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } /* Chat Header */ .chat-header { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; padding: 20px; display: flex; align-items: center; justify-content: space-between; border-radius: 20px 20px 0 0; } .chat-header-info { display: flex; align-items: center; gap: 12px; } .chat-avatar { width: 40px; height: 40px; border-radius: 50%; background: white; display: flex; align-items: center; justify-content: center; color: #6366f1; font-weight: bold; } .chat-header-text h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; } .chat-header-text p { font-size: 13px; opacity: 0.9; margin: 0; } .chat-actions { display: flex; gap: 10px; } .chat-actions button { background: rgba(255, 255, 255, 0.2); border: none; color: white; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; } .chat-actions button:hover { background: rgba(255, 255, 255, 0.3); } /* Chat Body */ .chat-body { flex: 1; padding: 20px; overflow-y: auto; background: #f8fafc; display: flex; flex-direction: column; gap: 16px; } /* Messages */ .message { display: flex; flex-direction: column; max-width: 85%; } .message.user { align-self: flex-end; } .message.assistant { align-self: flex-start; } .message-bubble { padding: 14px 18px; border-radius: 20px; font-size: 15px; line-height: 1.5; word-wrap: break-word; } .message.user .message-bubble { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; border-radius: 20px 20px 4px 20px; } .message.assistant .message-bubble { background: white; border: 1px solid #e2e8f0; color: #1f2937; border-radius: 20px 20px 20px 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); } .message-time { font-size: 12px; color: #9ca3af; margin-top: 5px; text-align: right; } .message.assistant .message-time { text-align: left; } /* Quick Questions */ .quick-questions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; } .quick-question { background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 20px; padding: 10px 16px; font-size: 14px; color: #4b5563; cursor: pointer; transition: all 0.2s; } .quick-question:hover { background: #e5e7eb; } /* Chat Footer */ .chat-footer { padding: 20px; border-top: 1px solid #e5e7eb; background: white; } .chat-input-container { display: flex; gap: 10px; } .chat-input { flex: 1; border: 1px solid #d1d5db; border-radius: 50px; padding: 14px 20px; font-size: 15px; outline: none; transition: border 0.3s; } .chat-input:focus { border-color: #6366f1; } .send-button { background: linear-gradient(135deg, #6366f1, #8b5cf6); border: none; color: white; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s; } .send-button:hover { transform: scale(1.05); box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4); } .send-button i { font-size: 20px; } /* Typing Indicator */ .typing-indicator { display: flex; align-items: center; gap: 5px; padding: 10px 18px; background: white; border-radius: 20px; width: fit-content; border: 1px solid #e5e7eb; } .typing-dot { width: 8px; height: 8px; background: #9ca3af; border-radius: 50%; animation: typingAnimation 1.4s infinite; } .typing-dot:nth-child(1) { animation-delay: 0s; } .typing-dot:nth-child(2) { animation-delay: 0.2s; } .typing-dot:nth-child(3) { animation-delay: 0.4s; } @keyframes typingAnimation { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } } /* Streaming Indicator */ .streaming-indicator { display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: linear-gradient(135deg, #f0f9ff, #e0f2fe); border-radius: 16px; border: 1px solid #bae6fd; color: #0369a1; font-size: 14px; font-weight: 500; } .streaming-text { flex: 1; } .streaming-dots { display: flex; gap: 4px; } .streaming-dot { width: 6px; height: 6px; background: #0ea5e9; border-radius: 50%; animation: streamingPulse 1.5s infinite; } .streaming-dot:nth-child(1) { animation-delay: 0s; } .streaming-dot:nth-child(2) { animation-delay: 0.3s; } .streaming-dot:nth-child(3) { animation-delay: 0.6s; } @keyframes streamingPulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } } /* Enhanced Message Bubbles */ .message.assistant .message-bubble { background: white; border: 1px solid #e2e8f0; color: #1f2937; border-radius: 20px 20px 20px 4px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); position: relative; overflow: hidden; } .message.assistant .message-bubble::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: linear-gradient(to bottom, #6366f1, #8b5cf6); } .message.user .message-bubble { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; border-radius: 20px 20px 4px 20px; position: relative; overflow: hidden; } .message.user .message-bubble::after { content: ''; position: absolute; bottom: 0; right: 0; width: 30px; height: 30px; background: rgba(255, 255, 255, 0.1); border-radius: 50%; } /* Performance Badge */ .performance-badge { display: inline-block; background: #10b981; color: white; font-size: 10px; padding: 2px 8px; border-radius: 10px; margin-right: 8px; animation: badgePulse 2s infinite; } @keyframes badgePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } } /* Quick Response Animation */ @keyframes quickResponse { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .message.assistant { animation: quickResponse 0.3s ease-out; } /* Responsive */ @media (max-width: 640px) { #alolo-chat-widget { bottom: 20px; left: 20px; } .chat-window { width: calc(100vw - 40px); height: 70vh; left: 0; } .chat-toggle { width: 56px; height: 56px; } }