/* 足迹页面样式 */

/* 足迹页面容器 */
.history-page-container {
    width: 100%;
    min-height: calc(100vh - 60px);
    background: #f8f9fa;
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    box-sizing: border-box;
}

/* Header部分 */
.history-header {
    background: white;
    padding: calc(20px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 20px max(16px, env(safe-area-inset-left));
    border-bottom: 1px solid #e5e7eb;
}

.history-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    text-align: center;
}

.history-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 16px 0;
    text-align: center;
}

.history-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-count {
    font-size: 13px;
    color: #6b7280;
}

.history-clear-btn {
    padding: 6px 16px;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    color: #1f2937;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.history-clear-btn:hover {
    background: #e5e7eb;
}

.history-clear-btn:active {
    transform: scale(0.95);
}

/* 足迹列表 */
.history-list {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 足迹项 */
.history-item {
    background: white;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.history-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.history-item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
    position: relative;
}

.history-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-item-image-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}

.history-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.history-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.history-item-details {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item-price {
    font-size: 16px;
    font-weight: 700;
    color: #ef4444;
}

.history-item-time {
    font-size: 11px;
    color: #9ca3af;
}

.history-item-delete {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: 8px;
    color: #ef4444;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0.7;
    z-index: 10;
}

.history-item:hover .history-item-delete {
    opacity: 1;
    background: rgba(239, 68, 68, 0.15);
}

.history-item-delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

.history-item-delete:active {
    transform: scale(0.9);
}

/* 空状态 */
.history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.history-empty i {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 16px;
}

.history-empty p {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 8px 0;
}

.history-empty-desc {
    font-size: 13px;
    color: #9ca3af;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .history-header {
        padding: 16px 12px;
    }
    
    .history-title {
        font-size: 22px;
    }
    
    .history-list {
        padding: 12px;
        gap: 10px;
    }
    
    .history-item {
        padding: 10px;
    }
    
    .history-item-image {
        width: 90px;
        height: 90px;
    }
    
    .history-item-title {
        font-size: 13px;
    }
    
    .history-item-details {
        font-size: 11px;
    }
    
    .history-item-price {
        font-size: 15px;
    }
}

