<template>
	<u-popup :show="show && !!countdown" round="20rpx" mode="center" zIndex="10076" bgColor="transparent"
		@close="$emit('close')">
		<view class="lottery-popup-v2">
			<image class="lottery-close-button-v2"
				src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/close_white.png"
				@click.stop="$emit('close')" />
			<image class="lottery-top-image"
				src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/pop_top.png"
				mode="widthFix" />
			<image class="lottery-background-v2"
				src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/pop2.png" />
			<view class="lottery-content-v2">
				<view class="lottery-header-v2">
					<image class="lottery-header-decoration-left"
						src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/top_left.png"
						mode="widthFix" />
					<view class="lottery-header-title">恭喜您可以</view>
					<image class="lottery-header-decoration-right"
						src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/top_right.png"
						mode="widthFix" />
				</view>
				<view class="lottery-text-v2">参与抽奖</view>
				<view class="lottery-text-v2">赢好礼</view>
				<view class="lottery-action-button-v2" @click="$emit('confirm')">确认</view>
			</view>
		</view>
	</u-popup>
</template>

<script>
export default {
	name: 'LiveLotteryConfirmPanel',
	props: {
		show: { type: Boolean, default: false },
		countdown: { type: [Object, Boolean], default: null }
	}
}
</script>

<style scoped lang="scss">
.lottery-popup-v2 {
	width: 504rpx;
	position: relative;
	text-align: center;
	height: 556rpx;
	display: flex;
	align-items: center;

	.lottery-close-button-v2 {
		position: absolute;
		right: 0;
		top: -180rpx;
		width: 64rpx;
		height: 64rpx;
		z-index: 9;
	}

	.lottery-top-image {
		position: absolute;
		top: -214rpx;
		width: 100%;
	}

	.lottery-background-v2 {
		width: 100%;
		height: 100%;
	}

	.lottery-content-v2 {
		position: absolute;
		top: 0;
		left: 50%;
		transform: translateX(-50%);
		display: flex;
		flex-direction: column;
		align-items: center;

		.lottery-header-v2 {
			margin-top: 68rpx;
			display: flex;
			align-items: center;

			.lottery-header-decoration-left,
			.lottery-header-decoration-right {
				width: 44rpx;
				height: 20rpx;
			}

			.lottery-header-title {
				margin: 22rpx 12rpx 0;
				font-size: 28rpx;
				color: #FFF1BC;
			}
		}

		.lottery-text-v2 {
			font-weight: 600;
			font-size: 80rpx;
			color: #FFF1BC;

			&:last-of-type {
				margin-bottom: 56rpx;
			}
		}

		.lottery-action-button-v2 {
			width: 424rpx;
			height: 96rpx;
			line-height: 96rpx;
			background: linear-gradient(180deg, #FBF1CA 0%, #FFD684 100%);
			border-radius: 48rpx;
			font-weight: 600;
			font-size: 36rpx;
			color: #F12E2C;
			margin-bottom: 52rpx;
		}
	}
}
</style>
