/* 채팅 버블 */
.chat-bubble { display: flex; gap: 0.5rem; max-width: 80%; animation: fadeIn 0.3s ease; }
.chat-bubble.user { margin-left: auto; flex-direction: row-reverse; }
.bubble-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.bubble-content { padding: 0.75rem 1rem; border-radius: 16px; font-size: 0.9rem; line-height: 1.6; }
.chat-bubble.user .bubble-content { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-bubble.assistant .bubble-content { background: var(--bg-soft); border-bottom-left-radius: 4px; }
.chat-bubble.assistant .bubble-content a { color: var(--primary); text-decoration: underline; }
.chat-bubble.crisis .bubble-content { background: #FEF2F2; border: 1px solid var(--error); }

/* 타이핑 애니메이션 */
.typing .bubble-content { display: flex; gap: 4px; padding: 1rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray-300); animation: bounce 1.4s infinite ease-in-out both; }
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

/* 입력 영역 */
.chat-input-area { padding: 1rem; border-top: 1px solid var(--border-light); }
.chat-form { display: flex; gap: 0.5rem; }
.chat-form input { flex: 1; padding: 0.75rem 1rem; border: 1px solid var(--border-light); border-radius: var(--radius); font-size: 0.9rem; }
.chat-form input:focus { outline: none; border-color: var(--primary); }
.chat-form .btn { padding: 0.75rem 1.25rem; white-space: nowrap; }
.chat-disclaimer { font-size: 0.7rem; color: var(--gray-500); text-align: center; margin-top: 0.5rem; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

@media (max-width: 768px) {
    .chat-bubble { max-width: 90%; }
    .chat-container { margin-top: 60px; height: calc(100vh - 60px); }
}
