/* 推荐结果页样式 */

.result-page {
    background: var(--bg-secondary);
    padding-bottom: 100px;
}

/* 顶部导航 */
.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.result-header .back-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.share-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
}

/* 推荐概览 */
.result-summary {
    padding: 16px;
    background: white;
    margin-bottom: 12px;
}

.summary-card {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 16px;
    padding: 20px 16px;
    color: white;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.summary-value.price {
    color: var(--gold-color);
}

.summary-label {
    font-size: 12px;
    opacity: 0.9;
}

.summary-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
}

/* 菜品列表 */
.dishes-list {
    padding: 0 16px;
}

.category-section {
    margin-bottom: 20px;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-left: 8px;
}

.category-icon {
    font-size: 18px;
}

.category-dishes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 菜品卡片 */
.dish-card {
    display: flex;
    gap: 12px;
    background: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.dish-card .dish-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    font-size: 36px;
}

.dish-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dish-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.dish-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dish-name .portion {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 400;
}

.dish-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
}

.dish-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.dish-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dish-tags .tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.dish-tags .tag.signature {
    background: rgba(196, 18, 48, 0.1);
    color: var(--primary-color);
}

.dish-tags .tag.seasonal {
    background: rgba(212, 168, 75, 0.15);
    color: #B8860B;
}

/* 底部操作栏 */
.result-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 12px 16px 20px;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.footer-count {
    color: var(--text-secondary);
}

.footer-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.footer-actions {
    display: flex;
    gap: 12px;
}

.footer-actions .btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.footer-actions .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.footer-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(196, 18, 48, 0.3);
}

.footer-actions .btn:active {
    transform: scale(0.98);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* 动画 */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-section {
    animation: slideUp 0.5s ease forwards;
}

.category-section:nth-child(2) {
    animation-delay: 0.1s;
}

.category-section:nth-child(3) {
    animation-delay: 0.2s;
}

.category-section:nth-child(4) {
    animation-delay: 0.3s;
}

/* ========== 紧凑模式（给服务员看的列表视图） ========== */
.compact-mode .dishes-list {
    padding: 0 12px;
}

.compact-mode .category-section {
    margin-bottom: 12px;
}

.compact-mode .category-title {
    font-size: 14px;
    margin-bottom: 8px;
    padding-left: 4px;
}

.compact-mode .category-dishes {
    gap: 1px;
    background: var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.compact-mode .dish-card {
    flex-direction: row;
    align-items: center;
    padding: 10px 12px;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--border-color);
    gap: 8px;
}

.compact-mode .dish-card:last-child {
    border-bottom: none;
}

.compact-mode .dish-card .dish-img {
    width: 32px;
    height: 32px;
    font-size: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

.compact-mode .dish-info {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.compact-mode .dish-header {
    flex: 1;
    margin-bottom: 0;
    align-items: center;
}

.compact-mode .dish-name {
    font-size: 14px;
    font-weight: 500;
}

.compact-mode .dish-price {
    font-size: 14px;
    font-weight: 600;
}

.compact-mode .dish-desc,
.compact-mode .dish-tags {
    display: none;
}

/* 紧凑模式切换按钮 */
.view-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: 20px;
    margin: 0 16px 12px;
}

.view-toggle-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    background: transparent;
    font-size: 13px;
    color: var(--text-secondary);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-toggle-btn.active {
    background: white;
    color: var(--primary-color);
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 打印/截图优化 */
@media print {
    .result-header,
    .result-footer,
    .view-toggle {
        display: none;
    }
    
    .result-page {
        padding-bottom: 20px;
    }
    
    .dishes-list {
        padding: 0 12px;
    }
    
    .dish-card {
        break-inside: avoid;
    }
}
