SkinProAI / web /src /pages /ChatPage.css
cgoodmaker's picture
Add RAG Phase 4 management guidance, rebuild guidelines index (286 chunks), post-analysis hint UI
5241b71
raw
history blame
7.67 kB
/* ─── Layout ───────────────────────────────────────────────────────────── */
.chat-page {
display: flex;
flex-direction: column;
height: 100vh;
background: #fafafa;
overflow: hidden;
}
/* ─── Header ────────────────────────────────────────────────────────────── */
.chat-header {
display: flex;
align-items: center;
gap: 12px;
padding: 0 16px;
height: 56px;
background: rgba(255, 255, 255, 0.7);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
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: #555555;
border-radius: 8px;
transition: background 0.15s;
flex-shrink: 0;
}
.header-back-btn:hover {
background: rgba(0, 0, 0, 0.05);
}
.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: #999999;
text-transform: uppercase;
letter-spacing: 0.05em;
line-height: 1;
}
.header-patient-name {
font-size: 1rem;
font-weight: 600;
color: #111111;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.3;
}
.header-clear-btn {
border: 1px solid rgba(0, 0, 0, 0.1);
background: transparent;
border-radius: 8px;
padding: 6px 14px;
font-size: 0.8125rem;
color: #777777;
cursor: pointer;
transition: all 0.15s;
flex-shrink: 0;
}
.header-clear-btn:hover {
background: rgba(0, 0, 0, 0.04);
border-color: rgba(0, 0, 0, 0.15);
}
/* ─── Messages ──────────────────────────────────────────────────────────── */
.chat-messages {
flex: 1;
overflow-y: auto;
padding: 28px 24px;
display: flex;
flex-direction: column;
gap: 24px;
max-width: 760px;
width: 100%;
margin: 0 auto;
}
.chat-empty {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #aaaaaa;
text-align: center;
gap: 12px;
margin: auto;
}
.chat-empty-icon svg {
width: 40px;
height: 40px;
color: #cccccc;
}
.chat-empty p {
font-size: 0.9375rem;
max-width: 280px;
line-height: 1.5;
}
.message-row {
display: flex;
width: 100%;
}
.message-row.user {
justify-content: flex-end;
}
.message-row.assistant {
justify-content: flex-start;
}
/* ─── User message ───────────────────────────────────────────────────────── */
.user-message {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 4px;
max-width: 75%;
}
.user-bubble {
background: #111111;
color: #ffffff;
border-radius: 18px;
border-bottom-right-radius: 4px;
padding: 12px 16px;
display: flex;
flex-direction: column;
gap: 8px;
}
.bubble-text {
font-size: 0.9375rem;
line-height: 1.6;
white-space: pre-wrap;
word-break: break-word;
margin: 0;
color: #ffffff;
}
.message-image {
width: 100%;
max-width: 260px;
border-radius: 12px;
display: block;
}
/* ─── Assistant message - no card, just text ──────────────────────────────── */
.assistant-message {
display: flex;
flex-direction: column;
gap: 6px;
max-width: 90%;
}
.assistant-text {
color: #333333;
font-size: 0.9375rem;
line-height: 1.65;
}
/* ─── Timestamps ─────────────────────────────────────────────────────────── */
.msg-time {
font-size: 0.6875rem;
color: #bbbbbb;
padding: 0 4px;
}
/* ─── Thinking indicator ─────────────────────────────────────────────────── */
.thinking {
display: flex;
gap: 4px;
padding: 8px 0;
}
.dot {
width: 7px;
height: 7px;
background: #bbbbbb;
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); }
}
/* ─── Post-analysis hint ─────────────────────────────────────────────────── */
.post-analysis-hint {
font-size: 0.8125rem;
color: #999999;
font-style: italic;
padding: 6px 0;
margin: 0;
}
/* ─── Input bar ──────────────────────────────────────────────────────────── */
.chat-input-bar {
background: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-top: 1px solid rgba(0, 0, 0, 0.06);
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: 12px;
border: 1px solid rgba(0, 0, 0, 0.08);
display: block;
}
.remove-image-btn {
position: absolute;
top: -8px;
right: -8px;
width: 22px;
height: 22px;
background: #333333;
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;
max-width: 760px;
margin: 0 auto;
width: 100%;
}
.attach-btn {
width: 38px;
height: 38px;
border: 1px solid rgba(0, 0, 0, 0.1);
background: transparent;
border-radius: 12px;
cursor: pointer;
color: #777777;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: all 0.15s;
}
.attach-btn:hover:not(:disabled) {
background: rgba(0, 0, 0, 0.04);
border-color: rgba(0, 0, 0, 0.15);
color: #444444;
}
.attach-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.attach-btn svg {
width: 18px;
height: 18px;
}
.chat-input {
flex: 1;
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 12px;
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;
background: rgba(255, 255, 255, 0.6);
}
.chat-input:focus {
outline: none;
border-color: rgba(0, 0, 0, 0.25);
}
.chat-input:disabled {
background: rgba(0, 0, 0, 0.03);
color: #aaaaaa;
}
.send-btn {
width: 38px;
height: 38px;
background: #111111;
color: white;
border: none;
border-radius: 12px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: background 0.15s;
}
.send-btn:hover:not(:disabled) {
background: #333333;
}
.send-btn:disabled {
background: #cccccc;
cursor: not-allowed;
}
.send-btn svg {
width: 18px;
height: 18px;
}