/* Reset and base styles */ * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Arial', sans-serif; } body { background-color: #f5f5f5; height: 100vh; display: flex; flex-direction: column; } /* Chat container styles */ .chat-container { display: flex; flex-direction: column; height: 100vh; max-width: 100%; margin: 0 auto; background-color: white; } /* Header styles */ .chat-header { display: flex; justify-content: space-between; align-items: center; padding: 15px; background-color: white; border-bottom: 1px solid #e0e0e0; } .menu-btn, .new-chat-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; } .new-chat-btn { background-color: #f5f5f5; color: #333; } /* Chat messages area */ .chat-messages { flex-grow: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; } .welcome-message { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; color: #333; } .logo-container { width: 80px; height: 80px; margin-bottom: 20px; } .logo { width: 100%; height: 100%; object-fit: contain; } .welcome-message h2 { font-size: 1.8rem; margin-bottom: 10px; } .welcome-message p { font-size: 1.2rem; color: #666; } /* Message styles */ .message { margin-bottom: 15px; max-width: 80%; } .user-message { align-self: flex-end; background-color: #e6f2ff; border-radius: 18px 18px 4px 18px; padding: 10px 15px; } .bot-message { align-self: flex-start; background-color: #f0f0f0; border-radius: 18px 18px 18px 4px; padding: 10px 15px; } /* Input area styles */ .chat-input-container { padding: 10px; border-top: 1px solid #e0e0e0; background-color: white; } .chat-input-wrapper { display: flex; border-radius: 25px; overflow: hidden; background-color: #f5f5f5; padding: 10px 15px; margin-bottom: 10px; } .message-input { flex-grow: 1; border: none; outline: none; background: transparent; font-size: 1rem; padding: 5px; } .send-btn { background: none; border: none; cursor: pointer; font-size: 1.2rem; color: #4285f4; } /* Footer styles */ .chat-footer { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; } .footer-btn { background: none; border: none; cursor: pointer; padding: 8px 15px; border-radius: 20px; font-size: 0.9rem; color: #666; display: flex; align-items: center; gap: 5px; } .footer-btn:last-child { background-color: #4285f4; color: white; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0; } /* Message typing animation */ .typing-indicator { display: flex; align-items: center; margin: 10px 0; } .typing-indicator span { height: 8px; width: 8px; background-color: #666; border-radius: 50%; display: inline-block; margin: 0 2px; animation: typing 1s infinite ease-in-out; } .typing-indicator span:nth-child(2) { animation-delay: 0.2s; } .typing-indicator span:nth-child(3) { animation-delay: 0.4s; } @keyframes typing { 0% { transform: translateY(0); } 50% { transform: translateY(-5px); } 100% { transform: translateY(0); } } /* Responsive design */ @media (min-width: 769px) { .chat-container { max-width: 1200px; margin: 0 auto; height: 100vh; } } @media (max-width: 768px) { .chat-container { width: 100%; height: 100vh; } .message { max-width: 85%; font-size: 0.95rem; } .chat-header { padding: 10px; } .chat-input-wrapper { margin: 5px 0; } .footer-btn { padding: 6px 12px; font-size: 0.85rem; } .welcome-message h2 { font-size: 1.5rem; } .welcome-message p { font-size: 1rem; } } @media (max-width: 576px) { .message { max-width: 90%; font-size: 0.9rem; } .chat-footer { flex-wrap: wrap; gap: 5px; } .footer-btn { flex: 1; min-width: 80px; justify-content: center; } .footer-btn:last-child { flex: 0; } .chat-input-wrapper { padding: 8px 12px; } } /* Dark mode support */ @media (prefers-color-scheme: dark) { body { background-color: #1a1a1a; } .chat-container, .chat-header { background-color: #2d2d2d; color: #ffffff; } .message-input { color: #ffffff; } .chat-input-wrapper { background-color: #3d3d3d; } .user-message { background-color: #4285f4; color: #ffffff; } .bot-message { background-color: #3d3d3d; color: #ffffff; } .footer-btn { color: #ffffff; } .new-chat-btn { background-color: #3d3d3d; color: #ffffff; } } /* Accessibility improvements */ .message:focus, .message-input:focus, .footer-btn:focus { outline: 2px solid #4285f4; outline-offset: 2px; } /* Touch device optimizations */ @media (hover: none) { .footer-btn:hover { background-color: transparent; } .footer-btn:active { background-color: rgba(66, 133, 244, 0.1); } } /* Admin panel integration */ .chat-container[data-theme="dark"] { background-color: #2d2d2d; color: #ffffff; } .chat-container[data-position="top-left"] { margin: 20px 0 0 20px; } .chat-container[data-position="top-right"] { margin: 20px 20px 0 0; } .chat-container[data-position="bottom-left"] { margin: 0 0 20px 20px; } .chat-container[data-position="bottom-right"] { margin: 0 20px 20px 0; } /* Loading states */ .loading { opacity: 0.7; pointer-events: none; } /* Error states */ .error-state { border-color: #dc3545; color: #dc3545; } /* Notification system */ .notification { position: fixed; bottom: 20px; right: 20px; padding: 15px 20px; border-radius: 8px; background-color: white; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); z-index: 1000; max-width: 300px; animation: slideIn 0.3s ease-out; } @keyframes slideIn { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } } /* Code block styling */ pre { background-color: #f5f5f5; padding: 15px; border-radius: 8px; overflow-x: auto; margin: 10px 0; } code { font-family: 'Courier New', monospace; font-size: 0.9em; } @media (prefers-color-scheme: dark) { pre { background-color: #3d3d3d; } code { color: #ffffff; } } /* Status bar styling (for mobile view) */ .status-bar { display: flex; justify-content: space-between; align-items: center; padding: 5px 15px; background-color: white; font-size: 0.8rem; color: #666; } .status-bar-left, .status-bar-right { display: flex; align-items: center; gap: 5px; } /* Loading animation for API responses */ .loading-animation { display: inline-block; position: relative; width: 80px; height: 20px; } .loading-animation div { position: absolute; top: 8px; width: 13px; height: 13px; border-radius: 50%; background: #4285f4; animation-timing-function: cubic-bezier(0, 1, 1, 0); } .loading-animation div:nth-child(1) { left: 8px; animation: loading1 0.6s infinite; } .loading-animation div:nth-child(2) { left: 8px; animation: loading2 0.6s infinite; } .loading-animation div:nth-child(3) { left: 32px; animation: loading2 0.6s infinite; } .loading-animation div:nth-child(4) { left: 56px; animation: loading3 0.6s infinite; } @keyframes loading1 { 0% { transform: scale(0); } 100% { transform: scale(1); } } @keyframes loading2 { 0% { transform: translate(0, 0); } 100% { transform: translate(24px, 0); } } @keyframes loading3 { 0% { transform: scale(1); } 100% { transform: scale(0); } }