<template>
	<view class="tabbar-container">
		<view class="tabbar-item left" @click="handleClick()">
			<view class="item-left">
				<i class="custom-icon custom-icon-before"></i>
			</view>
			<view class="item-right">
				<text>上一题</text>
			</view>
		</view>
		<view class="tabbar-item center" @click="handleClick()">
			<view class="center_content">
				题卡
			</view>
		</view>
		<view class="tabbar-item right" @click="handleClick()">
			<view class="item-left">
				<text>下一题</text>
			</view>
			<view class="item-right">
				<i class="custom-icon custom-icon-next"></i>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "QuestionTabbar",
		props: {
		},
		data() {
			return {

			};
		},
		mounted() {
		},
		methods: {
			handleClick(item) {
			}
		}
	};
</script>

<style lang="scss" scoped>
	.tabbar-container {
		position: fixed;
		bottom: 0;
		left: 0;
		z-index: 1;
		width: 100%;
		height: 120rpx;
		display: flex;
		align-items: center;
		justify-content: space-around;
		padding: 5rpx 0;
		box-shadow: 0 -20rpx 40rpx 4rpx rgba(0, 0, 0, 0.1);
		background-color: rgba(0, 0, 0, 0.1);

		.tabbar-item {
			width: 33%;
			height: 120rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			// background-color: pink;

			.item-right {
				margin-left: 30rpx;
				font-size: 28rpx;
			}
			.custom-icon-before {
				margin-right: 10rpx;
			
				&::before {
					background: -webkit-linear-gradient(right, #f84a1a, #ffa53e);
					-webkit-background-clip: text;
					-webkit-text-fill-color: transparent;
					font-weight: bold;
				}
			}
			.custom-icon-next {
				margin-right: 10rpx;
			
				&::before {
					background: -webkit-linear-gradient(left, #f84a1a, #ffa53e);
					-webkit-background-clip: text;
					-webkit-text-fill-color: transparent;
					font-weight: bold;
				}
			}
		}

		.left {
			flex: 1;
			background-color: #fff;
			// display: flex;
			border-top-right-radius: 20rpx;
		}

		.center {
			width: 159rpx;
			background: radial-gradient(circle at 50% 0rpx, transparent 80rpx, white 0) top left 100% no-repeat;
			position: relative;

			.center_content {
				text-align: center;
				line-height: 130rpx;
				position: absolute;
				background: linear-gradient(45deg, #f84a1a, #ffa53e);
				border-radius: 50%;
				top: -60rpx;
				left: 50%;
				transform: translateX(-50%);
				width: 130rpx;
				height: 130rpx;
				color: #fff;
				font-size: 20px;
			}

			&+.right {
				border-top-left-radius: 20rpx;
			}

		}

		.right {
			flex: 1;
			background-color: #fff;
			display: flex;
		}
	}
</style>