/**
 * Smart Freight Quote - 前台样式
 * Version: 1.0.0
 */

/* === 主容器 === */
.sfq-container {
    max-width: 960px;
    margin: 20px auto;
    padding: 0 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* === 步骤区块 === */
.sfq-step {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.sfq-step-title {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

/* === 行列布局 === */
.sfq-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 16px;
}

.sfq-col {
    flex: 1;
    min-width: 200px;
}

.sfq-col-full {
    flex: 1 1 100%;
}

/* === 标签 === */
.sfq-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.sfq-required {
    color: #f56c6c;
}

/* === 邮编区域 === */
.sfq-postal-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sfq-postal-wrapper .el-input {
    flex: 1;
}

.sfq-remote-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #e6a23c;
}

/* === 货物表格 === */
.sfq-cargo-table {
    margin-bottom: 12px;
}

.sfq-cargo-actions {
    margin-top: 10px;
}

.sfq-auto-calc {
    font-weight: 600;
    color: #409eff;
}

/* === 汇总区 === */
.sfq-summary-step {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.sfq-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 20px;
    justify-content: center;
}

.sfq-summary-item {
    text-align: center;
}

.sfq-summary-label {
    display: block;
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 4px;
}

.sfq-summary-value {
    font-size: 24px;
    font-weight: 700;
}

.sfq-submit-bar {
    text-align: center;
}

/* Element Plus 按钮在深色背景上需要调整 */
.sfq-summary-step .el-button--primary {
    background: #fff;
    color: #667eea;
    border-color: #fff;
}

.sfq-summary-step .el-button--primary:hover {
    background: #f0f0f0;
}

.sfq-summary-step .el-button:not(.el-button--primary) {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

.sfq-summary-step .el-button:not(.el-button--primary):hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

/* === 报价结果 === */
.sfq-quote-result-inline {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 24px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    animation: sfq-fade-in 0.4s ease;
}

@keyframes sfq-fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.sfq-result-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.sfq-result-card {
    flex: 1;
    min-width: 150px;
    background: #f5f7fa;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.sfq-result-highlight {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.sfq-result-card-label {
    font-size: 13px;
    margin-bottom: 6px;
    opacity: 0.85;
}

.sfq-result-card-value {
    font-size: 22px;
    font-weight: 700;
}

.sfq-price {
    color: #f56c6c;
}

.sfq-result-highlight .sfq-price {
    color: #fff;
}

/* === 渠道卡片 === */
.sfq-channels-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sfq-channel-card {
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.2s;
    background: #fff;
}

.sfq-channel-card:hover {
    border-color: #409eff;
    box-shadow: 0 4px 12px rgba(64,158,255,0.15);
}

.sfq-channel-card.sfq-best {
    border-color: #f56c6c;
    background: linear-gradient(to right, #fff5f5, #fff);
}

.sfq-channel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.sfq-channel-name {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sfq-channel-price {
    font-size: 24px;
    font-weight: 700;
    color: #f56c6c;
}

.sfq-channel-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: #666;
    font-size: 14px;
}

.sfq-detail-item {
    white-space: nowrap;
}

.sfq-channel-extras {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e8e8e8;
}

.sfq-extra-section ul {
    margin: 6px 0 0 20px;
    padding: 0;
    color: #666;
    font-size: 13px;
}

.sfq-extra-section li {
    margin-bottom: 4px;
}

.sfq-channel-footer {
    margin-top: 12px;
    text-align: right;
}

/* === 报价结果页（独立页面） === */
.sfq-result-page {
    max-width: 960px;
    margin: 20px auto;
    padding: 0 15px;
}

.sfq-result-header {
    text-align: center;
    margin-bottom: 30px;
}

.sfq-result-meta {
    display: flex;
    gap: 20px;
    justify-content: center;
    color: #666;
    margin-top: 10px;
    flex-wrap: wrap;
}

.sfq-result-channels {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sfq-channel-rank {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    background: #e0e0e0;
    color: #666;
    border-radius: 50%;
    font-weight: 700;
    margin-bottom: 10px;
}

.sfq-best .sfq-channel-rank {
    background: #f56c6c;
    color: #fff;
}

.sfq-price-adjustment {
    margin-top: 8px;
}

.sfq-no-result {
    padding: 60px 20px;
    text-align: center;
}

/* === 响应式 === */
@media screen and (max-width: 768px) {
    .sfq-row {
        flex-direction: column;
        gap: 12px;
    }

    .sfq-col {
        min-width: 100%;
    }

    .sfq-summary {
        gap: 16px;
    }

    .sfq-summary-value {
        font-size: 20px;
    }

    .sfq-channel-details {
        gap: 8px;
    }

    .sfq-result-card {
        min-width: 100%;
    }

    .sfq-channel-header {
        flex-direction: column;
    }
}
