/* AI 对话面板样式 */
.floating-panel-ai-chat {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ai-chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    background-color: #f5f5f5;
    min-height: 200px;
}

.ai-chat-msg {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.ai-chat-msg-user {
    align-items: flex-end;
}

.ai-chat-msg-ai {
    align-items: flex-start;
}

.ai-chat-sender {
    font-size: 11px;
    color: #888;
    margin-bottom: 2px;
    padding: 0 8px;
}

.ai-chat-bubble {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.ai-chat-bubble-user {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ai-chat-bubble-ai {
    background-color: #fff;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.ai-chat-actions {
    margin-top: 4px;
    padding-left: 8px;
    display: flex;
    gap: 4px;
}

.ai-chat-action-btn {
    font-size: 11px;
    padding: 2px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    color: #666;
    cursor: pointer;
}

.ai-chat-action-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.ai-chat-action-btn-primary {
    border-color: #667eea;
    color: #667eea;
}

.ai-chat-action-btn-primary:hover {
    background: #667eea;
    color: #fff;
}

.ai-chat-input-area {
    flex-shrink: 0;
    display: flex;
    padding: 8px;
    border-top: 1px solid #e0e0e0;
    background-color: #fff;
    gap: 6px;
}

.ai-chat-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 18px;
    font-size: 14px;
    outline: none;
}

.ai-chat-input:focus {
    border-color: #667eea;
}

.ai-chat-send-btn {
    padding: 6px 16px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.ai-chat-send-btn:hover {
    opacity: 0.9;
}

.ai-chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 加载动画 */
.ai-chat-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
}

.ai-chat-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #999;
    animation: ai-chat-bounce 1.2s infinite;
}

.ai-chat-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-chat-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes ai-chat-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-6px);
    }
}

/* 面板顶部操作按钮 */
.ai-chat-header-btns {
    display: flex;
    gap: 2px;
    align-items: center;
}

.ai-chat-header-btn {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    padding: 0 4px;
    color: #666;
}

.ai-chat-header-btn:hover {
    color: #333;
}

.ai-chat-mode-btn {
    font-size: 12px;
    padding: 2px 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    color: #666;
}

.ai-chat-mode-btn:hover {
    background: #f5f5f5;
}

.ai-chat-mode-btn-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
}

/* AI数据导入面板样式 */
.ai-import-text {
    font-family: Consolas, Monaco, monospace;
}

.ai-import-text:focus {
    outline: none;
    border-color: #667eea;
}

.ai-import-btn {
    font-size: 12px;
    padding: 6px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #666;
    cursor: pointer;
}

.ai-import-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.ai-import-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
}

.ai-import-btn-primary:hover {
    opacity: 0.9;
}

.ai-import-result {
    border: 1px solid #eee;
    border-radius: 3px;
    background: #fafafa;
}

.ai-import-result.success {
    color: #27ae60;
    border-color: #d5f5e3;
    background: #ebfaf1;
}

.ai-import-result.error {
    color: #e74c3c;
    border-color: #fadbd8;
    background: #fef5f5;
}
