/* Custom scrollbar */
#chat-messages::-webkit-scrollbar {
    width: 6px;
}
#chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
#chat-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

/* Message bubbles */
.msg-user {
    background: #2563eb;
    color: white;
    border-radius: 1rem 1rem 0.25rem 1rem;
    padding: 0.625rem 1rem;
    max-width: 80%;
    margin-left: auto;
    word-break: break-word;
}

.msg-ai {
    background: white;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 1rem 1rem 1rem 0.25rem;
    padding: 0.625rem 1rem;
    max-width: 85%;
    word-break: break-word;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Source tags in AI response */
.msg-ai .source-tag {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    margin-top: 0.25rem;
}

/* Document chips */
.doc-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

.doc-chip button {
    color: #93c5fd;
    cursor: pointer;
    transition: color 0.15s;
}
.doc-chip button:hover {
    color: #ef4444;
}

/* Drop zone active */
#drop-zone.drag-over {
    border-color: #2563eb;
    background-color: #eff6ff;
}

/* Typing indicator */
.typing-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9ca3af;
    animation: typing 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}
