/* errand.html 专用样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif; background: #f5f5f5; line-height: 1.6; padding-bottom: 80px; }

/* 头部 */
.header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 15px; color: #fff; }
.header-top { display: flex; align-items: center; margin-bottom: 15px; }
.header .back { font-size: 24px; margin-right: 15px; text-decoration: none; color: #fff; }
.header h1 { font-size: 18px; font-weight: 500; flex: 1; }

/* 服务类型导航 */
.service-nav { display: flex; justify-content: center; gap: 30px; }
.service-nav-item { font-size: 16px; color: rgba(255,255,255,0.7); cursor: pointer; padding: 5px 0; border-bottom: 2px solid transparent; transition: all 0.3s; }
.service-nav-item.active { color: #fff; border-bottom-color: #fff; font-weight: 500; }

/* 地址卡片 */
.address-section { background: #fff; padding: 20px; margin-bottom: 15px; }
.address-item { display: flex; align-items: flex-start; padding: 15px 0; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
.address-item:last-child { border-bottom: none; }
.address-icon { width: 44px; height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; margin-right: 12px; flex-shrink: 0; color: #fff; }
.address-icon.from { background: #667eea; }
.address-icon.to { background: #e74c3c; }
.address-content { flex: 1; }
.address-label { font-size: 13px; color: #999; margin-bottom: 4px; }
.address-text { font-size: 15px; color: #333; font-weight: 500; }
.address-text.empty { color: #999; font-weight: normal; }
.address-arrow { color: #ccc; font-size: 20px; margin-left: 10px; }

/* 分隔线 */
.divider { height: 8px; background: #f5f5f5; }

/* 提示 */
.tips-section { background: #fff; padding: 15px 20px; }
.tips-title { font-size: 14px; color: #333; margin-bottom: 10px; font-weight: 500; }
.tips-list { font-size: 13px; color: #666; line-height: 2; }
.tips-list li { margin-left: 18px; }

/* 底部提交栏 */
.bottom-bar { position: fixed; bottom: 60px; left: 0; right: 0; background: #fff; padding: 15px 20px; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); display: flex; align-items: center; justify-content: space-between; }
.price-info { display: flex; align-items: baseline; }
.price-label { font-size: 14px; color: #666; margin-right: 5px; }
.price-value { font-size: 24px; color: #e74c3c; font-weight: bold; }
.submit-btn { background: #e74c3c; color: #fff; border: none; padding: 12px 30px; border-radius: 20px; font-size: 16px; font-weight: 500; cursor: pointer; }
.submit-btn:disabled { background: #ccc; cursor: not-allowed; }

/* 底部导航 */

/* 地址选择弹窗 */
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 2000; }
.modal.active { display: block; }
.modal-content { position: absolute; bottom: 0; left: 0; right: 0; background: #fff; border-radius: 16px 16px 0 0; max-height: 80vh; overflow-y: auto; }
.modal-header { padding: 15px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 16px; color: #333; }
.close-btn { font-size: 24px; color: #999; cursor: pointer; }

/* 地址列表 */
.address-list { padding: 10px 0; }
.address-list-item { padding: 15px 20px; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
.address-list-item:hover { background: #f8f9fa; }
.address-list-item .name-phone { display: flex; align-items: center; margin-bottom: 5px; }
.address-list-item .name { font-size: 15px; font-weight: 500; color: #333; margin-right: 10px; }
.address-list-item .phone { font-size: 13px; color: #666; }
.address-list-item .address { font-size: 14px; color: #666; line-height: 1.5; }
.address-list-item .default-tag { display: inline-block; background: #e74c3c; color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 11px; margin-left: 8px; }
.add-address-btn { display: block; padding: 15px 20px; text-align: center; color: #667eea; font-size: 15px; border-top: 1px solid #eee; cursor: pointer; }

/* 商户搜索 */
.store-search-section { background: #fff; padding: 20px; margin-bottom: 10px; }
.store-search-close { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; background: #f0f0f0; border: none; font-size: 16px; color: #999; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; }
.store-search-close:hover { background: #e0e0e0; color: #333; }
.store-search-section, .specify-store-section { position: relative; }
.store-search-section.store-fullscreen { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 999; padding: 50px 20px 20px; overflow-y: auto; background: #fff; margin: 0; }
.store-search-section.store-fullscreen .store-search-box { display: flex; }
.store-search-section.store-fullscreen ~ .form-section,
.store-search-section.store-fullscreen ~ .tips-section,
.store-search-section.store-fullscreen ~ .specify-store-section { display: none !important; }
.specify-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 99999; background: #fff; padding: 50px 20px 20px; overflow-y: auto; }
.specify-overlay.show { display: block; }
.store-search-box { display: flex; gap: 10px; margin-bottom: 12px; }
.store-search-box input { flex: 1; padding: 12px 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; outline: none; }
.store-search-box input:focus { border-color: #667eea; }
.store-search-btn { padding: 12px 18px; background: #667eea; color: #fff; border: none; border-radius: 8px; font-size: 14px; cursor: pointer; white-space: nowrap; }
.store-search-btn:disabled { background: #ccc; cursor: not-allowed; }
.store-list { max-height: 320px; overflow-y: auto; }
.store-list.expanded { max-height: none; flex: 1; min-height: 200px; }
.store-search-section.expanded { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.content-full .service-content { display: flex !important; flex-direction: column; flex: 1; min-height: 0; }
.store-item { display: flex; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; }
.store-item:hover { border-color: #667eea; background: #f8f9ff; }
.store-item.selected { border-color: #667eea; background: #eef0ff; }
.store-item.saved { border-left: 3px solid #52c41a; }
.store-img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #f5f5f5; }
.store-info { flex: 1; min-width: 0; }
.store-name { font-size: 15px; font-weight: 500; color: #333; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-addr { font-size: 12px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-meta { display: flex; gap: 12px; margin-top: 4px; font-size: 12px; color: #666; }
.store-rating { color: #f57c00; }
.store-saved-tag { display: inline-block; font-size: 10px; background: #52c41a; color: #fff; padding: 1px 5px; border-radius: 3px; margin-left: 5px; vertical-align: middle; }
.store-selected-bar { background: #f0f5ff; padding: 12px 15px; border-radius: 8px; margin-top: 10px; display: none; align-items: center; gap: 10px; }
.store-selected-bar.active { display: flex; }
.store-selected-bar .sel-store-img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.store-selected-bar .sel-store-name { font-size: 14px; font-weight: 500; color: #333; flex: 1; }
.store-selected-bar .change-store-btn { font-size: 12px; color: #667eea; cursor: pointer; }
.store-menu-items { background: #f8f9fb; padding: 10px 15px; border-radius: 0 0 10px 10px; display: none; border-top: 1px solid #eee; }
.store-menu-items.active { display: block; }
.store-menu-items .smi-title { font-size: 12px; color: #999; margin-bottom: 6px; }
.store-menu-items .smi-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.store-menu-items .smi-item { font-size: 12px; background: #fff; padding: 5px 12px; border-radius: 14px; color: #333; border: 1px solid #e8e8e8; cursor: pointer; transition: all .15s; }
.store-menu-items .smi-item:active { background: #667eea; color: #fff; border-color: #667eea; }
.store-menu-items .smi-item .smi-price { color: #e74c3c; font-weight: 500; }
.store-menu-items .smi-item .smi-recommend { color: #e67e22; font-size: 10px; }
.store-menu-items .smi-empty { font-size: 12px; color: #ccc; }

/* 推荐店铺区 */
.recommended-section { background: #fff; padding: 15px 20px; margin-bottom: 10px; }
.recommended-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.recommended-list { max-height: 320px; overflow-y: auto; }
.recommended-item { display: flex; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; position: relative; }
.recommended-item:hover { border-color: #667eea; background: #f8f9ff; }
.recommended-item.rec-selected { border-color: #667eea; background: #f0f2ff; }
.recommended-item.rec-selected::after { content: '已选 ✓'; position: absolute; top: 8px; right: 8px; font-size: 11px; color: #667eea; background: #fff; padding: 2px 6px; border-radius: 4px; }
.recommended-empty { text-align:center; padding:20px; color:#999; font-size:13px; }
.recommended-loading { text-align:center; padding:12px; color:#999; font-size:13px; }
.recommended-menu { margin-top: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.recommended-menu-item { font-size: 11px; background: #f5f5f5; padding: 3px 8px; border-radius: 8px; color: #e74c3c; border: 1px solid #fee; cursor: pointer; transition: all .15s; }
.recommended-menu-item:active { background: #e74c3c; color: #fff; }
.recommended-menu-item.active { background: #667eea; color: #fff; border-color: #667eea; }
.recommended-menu-item .price-tag { color: #e74c3c; font-weight: 500; }
.recommended-menu-item.active .price-tag { color: rgba(255,255,255,0.9); }

/* 菜品菜单弹窗 */
.menu-overlay { position: fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.5); z-index:2000; display:none; align-items:flex-end; justify-content:center; }
.menu-overlay.active { display:flex; }
.menu-panel { background:#fff; border-radius:16px 16px 0 0; max-height:70vh; width:100%; max-width:500px; overflow:hidden; display:flex; flex-direction:column; }
.menu-header { padding:16px 20px; border-bottom:1px solid #f0f0f0; display:flex; justify-content:space-between; align-items:center; }
.menu-header h3 { font-size:16px; margin:0; }
.menu-header .close-btn { font-size:24px; cursor:pointer; color:#999; }
.menu-body { flex:1; overflow-y:auto; padding:10px 20px 20px; }
.menu-category { margin-bottom:15px; }
.menu-category-title { font-size:14px; font-weight:600; color:#333; padding:8px 0; border-bottom:1px solid #f0f0f0; margin-bottom:8px; }
.menu-item { display:flex; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px solid #f8f8f8; }
.menu-item:last-child { border-bottom:none; }
.menu-item-info { flex:1; }
.menu-item-name { font-size:15px; color:#333; }
.menu-item-name .recommended { display:inline-block; background:#fef3e2; color:#e67e22; font-size:11px; padding:1px 6px; border-radius:4px; margin-left:6px; }
.menu-item-desc { font-size:12px; color:#999; margin-top:2px; }
.menu-item-price { font-size:15px; color:#e74c3c; font-weight:600; margin-right:10px; }
.menu-item-ops { display:flex; align-items:center; gap:10px; }
.menu-qty-btn { width:28px; height:28px; border-radius:50%; border:1px solid #ddd; background:#fff; display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:16px; color:#333; line-height:1; }
.menu-qty-btn:active { background:#f0f0f0; }
.menu-qty-btn.disabled { opacity:0.3; }
.menu-qty-num { font-size:14px; font-weight:600; min-width:20px; text-align:center; }
.menu-footer { padding:12px 20px 16px; border-top:1px solid #f0f0f0; display:flex; justify-content:space-between; align-items:center; }
.menu-footer .total { font-size:14px; color:#333; }
.menu-footer .total strong { color:#e74c3c; font-size:16px; }
.menu-footer .confirm-btn { padding:8px 20px; background:#667eea; color:#fff; border:none; border-radius:8px; font-size:14px; cursor:pointer; }
.menu-footer .confirm-btn:disabled { background:#ccc; }
.menu-empty { text-align:center; padding:30px; color:#999; font-size:14px; }
.menu-loading { text-align:center; padding:20px; color:#999; font-size:14px; }
.store-no-result { text-align: center; padding: 20px; color: #999; font-size: 14px; }
.store-loading { text-align: center; padding: 20px; color: #999; font-size: 14px; }
.purchase-mode-btn.active { background: #667eea; color: #fff; }
.purchase-mode-btn:not(.active) { background: transparent; color: #666; }

/* 指定购买 - 路段选择 */
.street-search-box { margin-bottom: 8px; }
.street-search-box input { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; }
.street-search-box input:focus { border-color: #667eea; }
.street-list { display: none; max-height: 200px; overflow-y: auto; border: 1px solid #eee; border-radius: 8px; background: #fff; margin-bottom: 8px; }
.street-list.show { display: block; }
.street-item { padding: 10px 12px; border-bottom: 1px solid #f5f5f5; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all 0.15s; }
.street-item:last-child { border-bottom: none; }
.street-item:hover { background: #f8f9ff; }
.street-item.selected { background: #eef0ff; }
.street-item .street-icon { flex-shrink: 0; }
.street-item .street-name { font-size: 14px; color: #333; flex: 1; }
.street-item .street-arrow { color: #ccc; }
.street-loading, .street-no-result { text-align: center; padding: 12px; color: #999; font-size: 13px; }
.shop-list-section { background: #f9f9ff; border-radius: 8px; padding: 12px; }
.shop-list-section .section-title { font-size: 14px; color: #333; font-weight: 500; margin-bottom: 8px; }
.shop-item { display: flex; gap: 10px; padding: 10px; border: 1px solid #eee; border-radius: 8px; margin-bottom: 6px; cursor: pointer; transition: all 0.15s; }
.shop-item:hover { border-color: #667eea; background: #f8f9ff; }
.shop-item.selected { border-color: #667eea; background: #eef0ff; }
.shop-item .shop-name { font-size: 13px; font-weight: 500; color: #333; }
.shop-item .shop-addr { font-size: 11px; color: #999; }
.shop-item .shop-dist { font-size: 11px; color: #52c41a; }
.shop-loading, .shop-no-result { text-align: center; padding: 12px; color: #999; font-size: 13px; }
.street-back-btn { font-size: 12px; color: #667eea; cursor: pointer; display: inline-block; margin-bottom: 6px; }
.street-back-btn:hover { color: #5568d8; }

/* 通知条 */
.notify-bar { display:none; position:fixed; bottom:80px; left:50%; transform:translateX(-50%); z-index:99999; background:#333; color:#fff; padding:12px 24px; border-radius:10px; font-size:15px; max-width:85%; text-align:center; box-shadow:0 4px 12px rgba(0,0,0,.3); animation:notifyIn .3s ease; }
@keyframes notifyIn { from { opacity:0; transform:translateX(-50%) translateY(10px); } to { opacity:1; transform:translateX(-50%) translateY(0); } }
