UNPKG

@jutech-devs/agent-sdk

Version:

Modern embeddable AI agent chat widget with voice support and payment integration

476 lines 9.79 kB
/* src/styles/widget.css */ .agent-widget { position: fixed !important; bottom: 24px !important; right: 24px !important; z-index: 999999 !important; font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; } .agent-widget-bubble { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient( 135deg, #667eea 0%, #764ba2 100%); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35), 0 3px 10px rgba(0, 0, 0, 0.1); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: fixed; bottom: 24px; right: 24px; z-index: 999999; } .agent-widget-bubble:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4), 0 5px 15px rgba(0, 0, 0, 0.15); } .agent-widget-bubble svg { width: 24px; height: 24px; color: white; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2)); } .agent-widget-badge { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; background: linear-gradient( 135deg, #ef4444, #dc2626); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; border: 2px solid white; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4); animation: pulse 2s infinite; } @keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.8; transform: scale(1.05); } } .agent-widget-window { position: fixed !important; bottom: 96px !important; right: 24px !important; width: 400px; height: 600px; max-width: calc(100vw - 48px); max-height: calc(100vh - 140px); background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 20px; box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 10px 25px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.1); display: flex; flex-direction: column; overflow: hidden; transform-origin: bottom right; animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1); z-index: 999999 !important; } @keyframes slideInUp { from { opacity: 0; transform: translateY(30px) scale(0.9) rotateX(10deg); filter: blur(8px); } to { opacity: 1; transform: translateY(0) scale(1) rotateX(0deg); filter: blur(0px); } } .agent-widget-header { padding: 24px; background: linear-gradient( 135deg, #667eea 0%, #764ba2 100%); color: white; display: flex; align-items: center; justify-content: space-between; position: relative; border-radius: 20px 20px 0 0; } .agent-widget-header::before { content: ""; position: absolute; inset: 0; background: linear-gradient( 135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%); border-radius: inherit; } .agent-widget-header-content { z-index: 1; } .agent-widget-title { font-size: 18px; font-weight: 600; margin: 0 0 4px 0; letter-spacing: -0.01em; } .agent-widget-subtitle { font-size: 14px; opacity: 0.9; margin: 0; font-weight: 400; } .agent-widget-close { background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; z-index: 1; } .agent-widget-close:hover { background: rgba(255, 255, 255, 0.25); transform: scale(1.1); } .agent-widget-close svg { width: 14px; height: 14px; color: white; } .agent-widget-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; padding: 40px 20px; } .agent-widget-empty-icon { width: 64px; height: 64px; border-radius: 50%; background: rgba(102, 126, 234, 0.1); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; } .agent-widget-empty-icon svg { width: 32px; height: 32px; color: #9ca3af; } .agent-widget-empty-title { font-size: 18px; font-weight: 600; color: #374151; margin: 0 0 8px 0; } .agent-widget-empty-subtitle { font-size: 14px; color: #6b7280; margin: 0 0 4px 0; } .agent-widget-empty-text { font-size: 12px; color: #9ca3af; margin: 0; } .agent-widget-error { background: rgba(254, 242, 242, 0.9); border: 1px solid rgba(252, 165, 165, 0.6); border-radius: 12px; padding: 16px; margin: 16px 0; } .agent-widget-error-content { display: flex; align-items: center; gap: 8px; } .agent-widget-error-content svg { width: 20px; height: 20px; color: #ef4444; flex-shrink: 0; } .agent-widget-error-content p { font-size: 14px; color: #dc2626; margin: 0; } .agent-widget-messages { flex: 1; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; background: linear-gradient( 180deg, rgba(248, 250, 252, 0.5) 0%, rgba(255, 255, 255, 0.8) 100%); } .agent-widget-messages::-webkit-scrollbar { width: 4px; } .agent-widget-messages::-webkit-scrollbar-track { background: transparent; } .agent-widget-messages::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.3); border-radius: 2px; } .agent-widget-message { max-width: 80%; padding: 14px 18px; border-radius: 18px; font-size: 14px; line-height: 1.5; animation: messageSlideIn 0.3s ease-out; position: relative; word-wrap: break-word; font-weight: 400; } @keyframes messageSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .agent-widget-message.user { align-self: flex-end; background: linear-gradient( 135deg, #667eea 0%, #764ba2 100%); color: white; border-bottom-right-radius: 6px; box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25); } .agent-widget-message.bot { align-self: flex-start; background: white; color: #374151; border: 1px solid rgba(229, 231, 235, 0.6); border-bottom-left-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); } .agent-widget-input-area { padding: 20px 24px; background: rgba(255, 255, 255, 0.95); border-top: 1px solid rgba(229, 231, 235, 0.3); display: flex; gap: 12px; align-items: flex-end; backdrop-filter: blur(10px); } .agent-widget-input { flex: 1; min-height: 44px; max-height: 120px; padding: 12px 16px; border: 1px solid rgba(229, 231, 235, 0.6); border-radius: 22px; font-size: 14px; font-family: inherit; resize: none; outline: none; background: white; transition: all 0.2s ease; } .agent-widget-input:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); } .agent-widget-input::placeholder { color: #9ca3af; } .agent-widget-send { width: 44px; height: 44px; border-radius: 50%; border: none; background: linear-gradient( 135deg, #667eea 0%, #764ba2 100%); color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; flex-shrink: 0; box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25); } .agent-widget-send:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35); } .agent-widget-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; } .agent-widget-send svg { width: 16px; height: 16px; } .agent-widget-typing { align-self: flex-start; background: white; border: 1px solid rgba(229, 231, 235, 0.6); border-radius: 18px; border-bottom-left-radius: 6px; padding: 12px 16px; display: flex; gap: 4px; align-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); } .agent-widget-typing-dot { width: 6px; height: 6px; border-radius: 50%; background: #9ca3af; animation: typingPulse 1.4s infinite ease-in-out; } .agent-widget-typing-dot:nth-child(2) { animation-delay: 0.2s; } .agent-widget-typing-dot:nth-child(3) { animation-delay: 0.4s; } @keyframes typingPulse { 0%, 60%, 100% { transform: scale(1); opacity: 0.5; } 30% { transform: scale(1.2); opacity: 1; } } @media (max-width: 480px) { .agent-widget { bottom: 16px !important; right: 16px !important; } .agent-widget-bubble { bottom: 16px; right: 16px; width: 56px; height: 56px; } .agent-widget-bubble svg { width: 20px; height: 20px; } .agent-widget-window { bottom: 80px !important; right: 16px !important; left: 16px !important; width: auto; max-width: none; height: 500px; border-radius: 16px; } .agent-widget-header { padding: 20px; border-radius: 16px 16px 0 0; } .agent-widget-messages { padding: 20px; gap: 12px; } .agent-widget-input-area { padding: 16px 20px; gap: 10px; } .agent-widget-input { min-height: 40px; padding: 10px 14px; font-size: 14px; border-radius: 20px; } .agent-widget-send { width: 40px; height: 40px; } .agent-widget-send svg { width: 14px; height: 14px; } .agent-widget-badge { width: 20px; height: 20px; font-size: 10px; } .agent-widget-empty { padding: 30px 16px; } .agent-widget-empty-icon { width: 56px; height: 56px; margin-bottom: 12px; } .agent-widget-empty-icon svg { width: 28px; height: 28px; } .agent-widget-empty-title { font-size: 16px; } .agent-widget-empty-subtitle { font-size: 13px; } .agent-widget-empty-text { font-size: 11px; } } /*# sourceMappingURL=index.css.map */