/* LangChain Agent-Fox Client 前端样式 */

#lafc-chat-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 头部样式 */
.lafc-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #e1e5e9;
    padding-bottom: 20px;
}

.lafc-header h2 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.lafc-description {
    color: #7f8c8d;
    margin: 0;
    font-size: 16px;
}

/* 消息区域 */
.lafc-messages {
    height: 500px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #f8f9fa;
}

.lafc-message {
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

.lafc-message-meta {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lafc-message-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lafc-message-content {
    padding: 15px;
    border-radius: 8px;
    line-height: 1.6;
}

/* 不同类型消息的样式 */
.lafc-system-message .lafc-message-content {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    color: #1565c0;
}

.lafc-user-message .lafc-message-content {
    background: #e8f5e8;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.lafc-assistant-message .lafc-message-content {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    color: #ef6c00;
}

.lafc-error-message .lafc-message-content {
    background: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
}

/* 迭代详情样式 */
.lafc-iteration {
    margin: 15px 0;
    padding: 15px;
    background: #f0f2f5;
    border-radius: 8px;
    border-left: 4px solid #6c5ce7;
}

.lafc-iteration h4 {
    margin: 0 0 10px 0;
    color: #6c5ce7;
    font-size: 16px;
}

.lafc-iteration-details {
    font-size: 14px;
}

.lafc-iteration-details > div {
    margin-bottom: 8px;
}

.lafc-reasoning {
    color: #74b9ff;
    font-style: italic;
}

/* 输入区域 */
.lafc-input-container {
    background: #fff;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
}

.lafc-input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#lafc-query-input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease;
}

#lafc-query-input:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.lafc-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.lafc-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lafc-options label {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

#lafc-max-iterations {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.lafc-send-button {
    background: #6c5ce7;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.lafc-send-button:hover:not(:disabled) {
    background: #5a4fcf;
    transform: translateY(-1px);
}

.lafc-send-button:disabled {
    background: #b0b7c3;
    cursor: not-allowed;
    transform: none;
}

/* 加载动画 */
.lafc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 状态栏 */
.lafc-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2c3e50;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    #lafc-chat-container {
        margin: 10px;
        padding: 15px;
        border-radius: 8px;
    }
    
    .lafc-header h2 {
        font-size: 24px;
    }
    
    .lafc-messages {
        height: 400px;
        padding: 15px;
    }
    
    .lafc-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .lafc-send-button {
        width: 100%;
    }
    
    .lafc-options {
        justify-content: center;
    }
}

/* 滚动条样式 */
.lafc-messages::-webkit-scrollbar {
    width: 8px;
}

.lafc-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.lafc-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.lafc-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 最终答案样式 */
.lafc-final-answer {
    background: #f8f9fa;
    border: 2px solid #6c5ce7;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.lafc-final-answer h3 {
    color: #6c5ce7;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.lafc-final-answer p {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* 工具结果展示 */
.lafc-tool-result {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin: 10px 0;
    font-size: 13px;
    max-height: 200px;
    overflow-y: auto;
}

.lafc-tool-result pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
} 