/**
 * Function Calling 结果卡片样式
 * 用于展示 AI 调用工具后的结果（问诊建议、商品推荐、疫苗记录、宠物档案）
 */

/* ========== 结果卡片基础样式 ========== */
.result-card {
    margin: 15px 10px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    animation: cardSlideIn 0.4s ease-out;
    max-width: 90%;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card .card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 15px;
}

.result-card .card-icon {
    font-size: 18px;
}

.result-card .card-title {
    flex: 1;
}

.result-card .card-body {
    padding: 16px;
    background: #fff;
}

.result-card .card-body p {
    margin: 8px 0;
    line-height: 1.6;
    color: #333;
}

.result-card .card-body strong {
    color: #667eea;
}

.result-card .card-footer {
    padding: 12px 16px;
    background: linear-gradient(135deg, #f5f7fa, #e4e8ec);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.result-card .card-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.result-card .card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.result-card .card-btn:active {
    transform: translateY(0);
}

/* ========== 问诊建议卡片 ========== */
.consultation-card .card-header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
}

.consultation-card .card-body {
    background: linear-gradient(135deg, #fff5f5, #fff);
}

/* ========== 商品推荐卡片 ========== */
.product-card .card-header {
    background: linear-gradient(135deg, #51cf66, #40c057);
    color: white;
}

.product-card .product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.product-card .product-item:last-child {
    border-bottom: none;
}

.product-card .product-name {
    font-weight: 500;
    color: #333;
}

.product-card .product-price {
    color: #ff6b6b;
    font-weight: 600;
    font-size: 16px;
}

/* ========== 疫苗记录卡片 ========== */
.vaccine-card .card-header {
    background: linear-gradient(135deg, #74c0fc, #339af0);
    color: white;
}

.vaccine-card .card-body {
    background: linear-gradient(135deg, #f0f7ff, #fff);
}

/* ========== 宠物档案卡片 ========== */
.profile-card .card-header {
    background: linear-gradient(135deg, #ffa94d, #ff922b);
    color: white;
}

.profile-card .card-body {
    background: linear-gradient(135deg, #fff9f0, #fff);
}

/* ========== 错误卡片 ========== */
.error-card .card-header {
    background: linear-gradient(135deg, #868e96, #495057);
    color: white;
}

.error-card .card-body {
    color: #868e96;
    text-align: center;
}

/* ========== 多按钮布局 ========== */
.card-footer.multi-btn {
    flex-wrap: wrap;
}

.card-footer .card-btn.secondary {
    background: linear-gradient(135deg, #868e96, #495057);
    box-shadow: 0 2px 10px rgba(134, 142, 150, 0.3);
}

/* ========== 移动端优化 ========== */
@media (max-width: 480px) {
    .result-card {
        margin: 12px 8px;
        max-width: 95%;
    }
    
    .result-card .card-header {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .result-card .card-body {
        padding: 14px;
    }
    
    .result-card .card-footer {
        padding: 10px 14px;
    }
    
    .result-card .card-btn {
        padding: 7px 16px;
        font-size: 13px;
    }
}

/* ========== 暗黑模式支持（可选） ========== */
@media (prefers-color-scheme: dark) {
    .result-card .card-body {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .result-card .card-body p {
        color: #e0e0e0;
    }
    
    .result-card .card-body strong {
        color: #74c0fc;
    }
    
    .product-card .product-item {
        border-bottom-color: #333;
    }
    
    .product-card .product-name {
        color: #e0e0e0;
    }
}
