* { margin: 0; padding: 0; box-sizing: border-box; font-family: "Segoe UI", sans-serif; } body { background-color: #0b0f1a; height: 100vh; display: flex; justify-content: center; align-items: center; } .page-wrapper { width: 100%; display: flex; justify-content: center; } .chat-container { width: 420px; height: 680px; background-color: #ffffff; border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); } /* ── Header ──────────────────────────────────────────────────────── */ .chat-header { background: #111827; color: white; padding: 16px 18px 12px; text-align: center; } .chat-header h2 { font-size: 18px; font-weight: 600; } .chat-subtitle { font-size: 12px; color: #9ca3af; margin-top: 3px; } /* ── Message list ─────────────────────────────────────────────────── */ .chat-box { flex: 1; padding: 20px; overflow-y: auto; background: #f5f7fa; display: flex; flex-direction: column; gap: 12px; } .message { max-width: 75%; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.5; word-break: break-word; white-space: pre-wrap; /* preserve line breaks in agent replies */ } .user-message { align-self: flex-end; background-color: #111827; color: white; border-bottom-right-radius: 4px; } .bot-message { align-self: flex-start; background-color: #e5e7eb; color: #111827; border-bottom-left-radius: 4px; } .error-message { align-self: flex-start; background-color: #fee2e2; color: #b91c1c; border-bottom-left-radius: 4px; font-size: 13px; } /* Inline image in chat bubble */ .chat-image { max-width: 100%; max-height: 200px; border-radius: 10px; display: block; } /* ── Typing indicator ─────────────────────────────────────────────── */ .typing-indicator { display: flex; align-items: center; gap: 5px; padding: 10px 20px; background: #f5f7fa; } .typing-indicator.hidden { display: none; } .typing-indicator span { width: 8px; height: 8px; background: #9ca3af; border-radius: 50%; animation: bounce 1.2s infinite; } .typing-indicator span:nth-child(2) { animation-delay: 0.2s; } .typing-indicator span:nth-child(3) { animation-delay: 0.4s; } @keyframes bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } } /* ── Image preview bar ────────────────────────────────────────────── */ .image-preview-bar { display: flex; align-items: center; gap: 10px; padding: 8px 15px; background: #f0f0f0; border-top: 1px solid #ddd; } .image-preview-bar.hidden { display: none; } .image-preview-bar img { height: 60px; border-radius: 8px; object-fit: cover; } .image-preview-bar button { background: #e74c3c; color: white; border: none; border-radius: 50%; width: 24px; height: 24px; font-size: 14px; cursor: pointer; line-height: 1; } /* ── Input row ───────────────────────────────────────────────────── */ .chat-input-container { display: flex; align-items: center; padding: 15px; background: #ffffff; border-top: 1px solid #ddd; gap: 8px; } .chat-input-container input[type="text"] { flex: 1; padding: 12px; border-radius: 10px; border: 1px solid #ccc; outline: none; font-size: 14px; } .chat-input-container input[type="text"]:focus { border-color: #111827; } .chat-input-container button { padding: 12px 14px; border-radius: 10px; border: none; background-color: #111827; color: white; cursor: pointer; font-size: 16px; white-space: nowrap; transition: background 0.2s; } .chat-input-container button:hover { background-color: #1f2937; } .chat-input-container button:disabled { background-color: #6b7280; cursor: not-allowed; }