<template>
	<view class="paywall">
		<image v-if="cover" class="paywall-bg" :src="cover" mode="aspectFill" />
		<view class="paywall-dim" />
		<view class="paywall-body">
			<text class="paywall-lock">🔒</text>
			<text class="paywall-title">试看已结束</text>
			<text class="paywall-desc">支付 {{ amount }} 钻石继续观看</text>
			<view class="paywall-btn" @tap="$emit('unlock')">
				<text>立即解锁</text>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	name: 'PaywallMask',
	props: {
		cover: { type: String, default: '' },
		amount: { type: [Number, String], default: 0 }
	}
}
</script>

<style scoped>
.paywall {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 30;
}
.paywall-bg {
	position: absolute;
	width: 100%;
	height: 100%;
}
.paywall-dim {
	position: absolute;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.55);
}
.paywall-body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 160rpx;
	align-items: center;
	padding: 0 48rpx;
}
.paywall-lock {
	font-size: 80rpx;
	margin-bottom: 24rpx;
}
.paywall-title {
	color: #fff;
	font-size: 36rpx;
	font-weight: 600;
}
.paywall-desc {
	color: rgba(255, 255, 255, 0.85);
	font-size: 28rpx;
	margin: 16rpx 0 40rpx;
}
.paywall-btn {
	background: linear-gradient(90deg, #ff6b6b, #ff8e53);
	padding: 24rpx 80rpx;
	border-radius: 999rpx;
}
.paywall-btn text {
	color: #fff;
	font-size: 30rpx;
}
</style>
