/* Chats page - Two column layout: chat list + active chat window */ .chats-main { flex: 1; padding: 20px 32px; background: transparent; } /* Chat container (flex, two columns) */ .chat-container { display: flex; gap: 24px; background: #fff; border-radius: 18px; box-shadow: 0 2px 8px rgba(59, 130, 246, 0.06); overflow: hidden; height: calc(100vh - 120px); /* Adjust based on topbar height */ min-height: 500px; } /* LEFT COLUMN: Chat list */ .chat-list { width: 320px; border-right: 1px solid #eef2f7; display: flex; flex-direction: column; background: #fff; } .chat-list-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #eef2f7; } .chat-list-header h2 { font-size: 1.2rem; font-weight: 700; margin: 0; } .new-chat-btn { background: none; border: none; border-radius: 999px; font-size: 1.2rem; color: #3b82f6; cursor: pointer; padding: 8px; } .new-chat-btn:hover, .new-chat-btn[aria-expanded="true"] { background: #eef2ff; } .new-chat-panel { border-bottom: 1px solid #eef2f7; padding: 14px 16px; } .new-chat-panel input { width: 100%; border: 1px solid #dbe2ea; border-radius: 12px; padding: 10px 12px; font: inherit; } .creator-search-results { display: grid; gap: 8px; margin-top: 10px; max-height: 260px; overflow-y: auto; } .creator-result { align-items: center; background: #f8fafc; border: 1px solid transparent; border-radius: 12px; color: inherit; cursor: pointer; display: flex; gap: 10px; padding: 10px; text-align: left; width: 100%; } .creator-result:hover, .creator-result:focus-visible { background: #eef2ff; border-color: #c7d2fe; } .creator-result img { border-radius: 50%; height: 36px; object-fit: cover; width: 36px; } .creator-result span { display: grid; } .creator-result small, .creator-result-empty, .chat-empty { color: #64748b; font-size: 0.82rem; } .creator-result-empty, .chat-empty { padding: 18px; text-align: center; } .chat-list-items { flex: 1; overflow-y: auto; } .chat-item { background: transparent; border: 0; border-bottom: 1px solid #f0f2f5; color: inherit; display: flex; align-items: center; gap: 12px; font: inherit; text-align: left; padding: 16px 20px; cursor: pointer; transition: background 0.2s; width: 100%; } .chat-item:hover, .chat-item:focus-visible { background: #f8fafc; } .chat-item.active { background: #eef2ff; border-left: 3px solid #3b82f6; } .chat-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; } .chat-item-info { flex: 1; min-width: 0; } .chat-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; } .chat-last-msg { font-size: 0.8rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .chat-time { font-size: 0.7rem; color: #94a3b8; } /* RIGHT COLUMN: Active chat */ .chat-active { flex: 1; display: flex; flex-direction: column; background: #fff; } .chat-header { display: flex; align-items: center; gap: 16px; padding: 16px 24px; border-bottom: 1px solid #eef2f7; } .chat-avatar-large { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; } .chat-header-info { flex: 1; } .chat-header-name { font-weight: 700; font-size: 1rem; } .chat-header-status { font-size: 0.75rem; display: flex; align-items: center; gap: 6px; } .online-dot { display: inline-block; width: 8px; height: 8px; background-color: #10b981; border-radius: 50%; } /* Chat messages area */ .chat-messages { flex: 1; padding: 20px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; background: #fafcff; } .message { display: flex; flex-direction: column; max-width: 70%; } .message.received { align-items: flex-start; } .message.sent { align-items: flex-end; margin-left: auto; } .message-bubble { padding: 10px 14px; border-radius: 18px; font-size: 0.9rem; line-height: 1.4; background: #f1f5f9; color: #1e293b; } .message.sent .message-bubble { background: var(--gradient); color: white; } .message-time { font-size: 0.7rem; color: #94a3b8; margin-top: 4px; padding: 0 8px; } /* Input area */ .chat-input-area { display: flex; gap: 12px; padding: 16px 24px; border-top: 1px solid #eef2f7; background: #fff; margin: 0; } .chat-input-area input { flex: 1; padding: 12px 16px; border: 1px solid #e2e8f0; border-radius: 30px; font-size: 0.9rem; outline: none; } .chat-input-area input:focus { border-color: #3b82f6; } .chat-input-area input:disabled { background: #f8fafc; cursor: not-allowed; } .send-btn { background: var(--gradient); border: none; padding: 0 24px; border-radius: 30px; color: white; font-weight: 600; cursor: pointer; transition: opacity 0.2s; } .send-btn:hover { opacity: 0.85; } .send-btn:disabled { opacity: 0.5; cursor: not-allowed; } /* Responsive */ @media (max-width: 768px) { .chats-main { padding: 16px; } .chat-list { width: 280px; } } @media (max-width: 640px) { .chat-container { flex-direction: column; height: auto; } .chat-list { width: 100%; border-right: none; border-bottom: 1px solid #eef2f7; } .chat-active { height: 500px; } }