/* ─── Layout ───────────────────────────────────────────────────────────── */ .chat-page { display: flex; flex-direction: column; height: 100vh; background: var(--gray-50); overflow: hidden; } /* ─── Header ────────────────────────────────────────────────────────────── */ .chat-header { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 56px; background: white; border-bottom: 1px solid var(--gray-200); flex-shrink: 0; z-index: 10; } .header-back-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: none; background: transparent; cursor: pointer; color: var(--gray-600); border-radius: 8px; transition: background 0.15s; flex-shrink: 0; } .header-back-btn:hover { background: var(--gray-100); } .header-back-btn svg { width: 20px; height: 20px; } .header-center { flex: 1; display: flex; flex-direction: column; min-width: 0; } .header-app-name { font-size: 0.7rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em; line-height: 1; } .header-patient-name { font-size: 1rem; font-weight: 600; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; } .header-clear-btn { border: 1px solid var(--gray-300); background: transparent; border-radius: 8px; padding: 6px 14px; font-size: 0.8125rem; color: var(--gray-600); cursor: pointer; transition: all 0.15s; flex-shrink: 0; } .header-clear-btn:hover { background: var(--gray-100); border-color: var(--gray-400); } /* ─── Messages ──────────────────────────────────────────────────────────── */ .chat-messages { flex: 1; overflow-y: auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 12px; } .chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--gray-400); text-align: center; gap: 12px; margin: auto; } .chat-empty-icon svg { width: 40px; height: 40px; color: var(--gray-300); } .chat-empty p { font-size: 0.9375rem; max-width: 280px; line-height: 1.5; } .message-row { display: flex; max-width: 720px; width: 100%; } .message-row.user { align-self: flex-end; justify-content: flex-end; } .message-row.assistant { align-self: flex-start; justify-content: flex-start; } /* ─── Bubbles ────────────────────────────────────────────────────────────── */ .bubble { max-width: 85%; border-radius: 16px; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; } .user-bubble { background: var(--primary); color: white; border-bottom-right-radius: 4px; } .assistant-bubble { background: white; border: 1px solid var(--gray-200); border-bottom-left-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); max-width: 90%; } .bubble-text { font-size: 0.9375rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; margin: 0; } .user-bubble .bubble-text { color: white; } .assistant-text { color: var(--gray-800); } /* Image in user bubble */ .message-image { width: 100%; max-width: 260px; border-radius: 10px; display: block; } /* ─── Thinking indicator ─────────────────────────────────────────────────── */ .thinking { display: flex; gap: 4px; padding: 4px 0; } .dot { width: 7px; height: 7px; background: var(--gray-400); border-radius: 50%; animation: bounce 1.2s infinite; } .dot:nth-child(2) { animation-delay: 0.2s; } .dot:nth-child(3) { animation-delay: 0.4s; } @keyframes bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } } /* ─── Input bar ──────────────────────────────────────────────────────────── */ .chat-input-bar { background: white; border-top: 1px solid var(--gray-200); padding: 12px 16px; flex-shrink: 0; } .image-preview-container { position: relative; display: inline-block; margin-bottom: 10px; } .image-preview-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 2px solid var(--gray-200); display: block; } .remove-image-btn { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; background: var(--gray-700); color: white; border: none; border-radius: 50%; font-size: 0.875rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; } .input-row { display: flex; align-items: flex-end; gap: 8px; } .attach-btn { width: 38px; height: 38px; border: 1px solid var(--gray-300); background: transparent; border-radius: 10px; cursor: pointer; color: var(--gray-500); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s; } .attach-btn:hover:not(:disabled) { background: var(--gray-100); border-color: var(--gray-400); color: var(--gray-700); } .attach-btn:disabled { opacity: 0.4; cursor: not-allowed; } .attach-btn svg { width: 18px; height: 18px; } .chat-input { flex: 1; border: 1px solid var(--gray-300); border-radius: 10px; padding: 9px 14px; font-size: 0.9375rem; font-family: inherit; resize: none; line-height: 1.5; max-height: 160px; overflow-y: auto; transition: border-color 0.15s; } .chat-input:focus { outline: none; border-color: var(--primary); } .chat-input:disabled { background: var(--gray-50); color: var(--gray-400); } .send-btn { width: 38px; height: 38px; background: var(--primary); color: white; border: none; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.15s; } .send-btn:hover:not(:disabled) { background: var(--primary-hover); } .send-btn:disabled { background: var(--gray-300); cursor: not-allowed; } .send-btn svg { width: 18px; height: 18px; }