/* AI配置页面样式 */

/* 提供商网格 */
.provider-section {
    margin-bottom: 24px;
}

.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.provider-card {
    background: #fafafa;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.provider-card:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.provider-card.selected {
    border-color: #1890ff;
    background: #e6f7ff;
}

.provider-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.provider-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.provider-desc {
    font-size: 12px;
    color: #999;
}

/* 当前配置显示 */
.config-display {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #fafafa;
    border-radius: 6px;
}

.config-info {
    flex: 1;
}

.config-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.config-details {
    font-size: 14px;
    color: #666;
}

.config-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
}

.config-badge.default {
    background: #f6ffed;
    color: #52c41a;
}

.config-badge.active {
    background: #e6f7ff;
    color: #1890ff;
}

/* 配置表单 */
.config-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.form-checkbox input {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.form-error {
    padding: 12px 16px;
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #ff4d4f;
    border-radius: 4px;
    margin-bottom: 16px;
}

.form-success {
    padding: 12px 16px;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
    border-radius: 4px;
    margin-bottom: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

/* 配置列表 */
.list-content {
    max-height: 400px;
    overflow-y: auto;
}

.config-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #fafafa;
    border-radius: 6px;
    margin-bottom: 12px;
    transition: background 0.3s;
}

.config-item:hover {
    background: #f0f0f0;
}

.config-item:last-child {
    margin-bottom: 0;
}

.config-item-main {
    flex: 1;
}

.config-item-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.config-item-details {
    font-size: 13px;
    color: #666;
}

.config-item-actions {
    display: flex;
    gap: 8px;
}

.config-item-btn {
    padding: 6px 12px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.config-item-btn.edit {
    background: #e6f7ff;
    color: #1890ff;
}

.config-item-btn.edit:hover {
    background: #bae7ff;
}

.config-item-btn.delete {
    background: #fff2f0;
    color: #ff4d4f;
}

.config-item-btn.delete:hover {
    background: #ffccc7;
}

.config-item-btn.default {
    background: #f6ffed;
    color: #52c41a;
    cursor: default;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 20px;
}

.test-result {
    text-align: center;
}

.test-result.test-success {
    color: #52c41a;
}

.test-result.test-error {
    color: #ff4d4f;
}

.test-message {
    font-size: 16px;
    margin-bottom: 12px;
}

.test-metadata {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.test-metadata div {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.loading {
    text-align: center;
    color: #999;
    padding: 20px;
}

.empty-state {
    text-align: center;
    padding: 30px 20px;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state p {
    color: #666;
    margin: 8px 0;
}

.text-muted {
    color: #999;
}
