/**
 * 门店智能推送样式
 * 文件: store-push.css
 * 创建时间: 2025-12-18
 * 版本: v1.0
 */

/* 模态框容器 */
.store-push-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 模态框内容 */
.store-push-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 头部 */
.store-push-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.store-push-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.store-push-header .close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-push-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* 内容区域 */
.store-push-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

/* 步骤容器 */
.push-step {
    animation: stepFadeIn 0.5s ease;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.push-step h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.form-group .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-group .form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #999;
    font-size: 12px;
}

/* 按钮样式 */
.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #e0e0e0;
    color: #555;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

/* 推荐门店列表 */
#recommendedShopsList {
    margin-bottom: 20px;
}

.no-shops {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* 门店卡片 */
.shop-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s;
    display: flex;
    gap: 20px;
}

.shop-card:hover {
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.shop-card.rank-1 {
    border-color: #ffd700;
    background: linear-gradient(135deg, #fffef5 0%, #fff9e6 100%);
}

.shop-card.rank-2 {
    border-color: #c0c0c0;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

.shop-card.rank-3 {
    border-color: #cd7f32;
    background: linear-gradient(135deg, #fff8f0 0%, #ffeee0 100%);
}

/* 门店排名 */
.shop-rank {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.rank-badge {
    font-size: 32px;
    margin-bottom: 8px;
}

.rank-text {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

/* 门店信息 */
.shop-info {
    flex: 1;
    min-width: 0;
}

.shop-info h5 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.shop-info p {
    margin: 6px 0;
    font-size: 13px;
    color: #666;
}

.shop-stats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.shop-stats span {
    font-size: 12px;
    color: #666;
    padding: 4px 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
}

/* 门店评分 */
.shop-score {
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.score-bar {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.score-bar .score-label {
    font-size: 12px;
    color: #666;
}

.score-bar .score-value {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
}

.score-bar.total-score .score-value {
    font-size: 18px;
    color: #764ba2;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.6s ease;
    border-radius: 4px;
}

/* 算法说明 */
.algorithm-note {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 16px;
    margin-top: 20px;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
}

.algorithm-note strong {
    color: #667eea;
}

/* 推送操作按钮 */
.push-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

/* 推送状态 */
.push-status-header {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: center;
}

.push-status-header h5 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
}

.push-status-header p {
    margin: 0;
    font-size: 13px;
    opacity: 0.8;
}

.status-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.status-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.status-danger {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    color: white;
}

.status-pending {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 推送详情列表 */
.push-details-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.push-detail-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
}

.push-detail-card.detail-accepted {
    border-color: #38ef7d;
    background: linear-gradient(135deg, #f0fff4 0%, #e6ffed 100%);
}

.push-detail-card.detail-rejected {
    border-color: #ff6a00;
    background: linear-gradient(135deg, #fff5f0 0%, #ffe6e0 100%);
}

.push-detail-card.detail-timeout {
    border-color: #f5576c;
    background: linear-gradient(135deg, #fff0f3 0%, #ffe0e6 100%);
}

.push-detail-card.detail-pending {
    border-color: #667eea;
    background: linear-gradient(135deg, #f5f7ff 0%, #e6eeff 100%);
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.detail-header h6 {
    margin: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.detail-status {
    font-size: 13px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.1);
}

.detail-info p {
    margin: 6px 0;
    font-size: 13px;
    color: #666;
}

.reject-reason {
    color: #ff6a00 !important;
    font-weight: 500;
    padding: 8px;
    background: rgba(255, 106, 0, 0.1);
    border-radius: 6px;
    margin-top: 8px !important;
}

/* 接单/分配信息 */
.accepted-shop-info,
.assigned-shop-info {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 24px;
}

.assigned-shop-info {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.accepted-shop-info h6,
.assigned-shop-info h6 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.accepted-shop-info p,
.assigned-shop-info p {
    margin: 6px 0;
    font-size: 13px;
    opacity: 0.9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .store-push-modal {
        padding: 10px;
    }

    .store-push-content {
        max-height: 95vh;
    }

    .store-push-header {
        padding: 16px 20px;
    }

    .store-push-header h3 {
        font-size: 18px;
    }

    .store-push-body {
        padding: 20px;
    }

    .shop-card {
        flex-direction: column;
        gap: 16px;
    }

    .shop-rank {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .rank-badge {
        font-size: 24px;
        margin-bottom: 0;
    }

    .shop-score {
        min-width: 100%;
    }

    .push-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary,
    .btn-danger {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* 滚动条样式 */
.store-push-body::-webkit-scrollbar {
    width: 8px;
}

.store-push-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.store-push-body::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.store-push-body::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* 加载动画 */
.btn-primary:disabled::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
