<template>
	<!-- 水印 -->
	<view v-if="$isVip()">
		<watermark dark="light" source="uni_alipay_other_airTickets_qunar" />
		<liu-drag-button :canDocking="false"
			@clickBtn="$goRechargePage('watermark', 'uni_alipay_other_airTickets_qunar')">
			<image src='/static/lottie/watermark.gif' mode="widthFix" style="width:94px;height:74px;" ></image>
		</liu-drag-button>
	</view>
	<view class="page-container">
		<!-- Main Content Wrapper (Standard Flow) -->
		<view class="main-content">
			<!-- Header Background (Inside scroll flow) -->
			<view class="header-bg">
				<NavBar isBack :bgColor="data.navBar.bgColor" :textColor="data.navBar.textColor"
					:buttonGroup="buttonGroup" @button-click="util.clickTitlePopupButton"
					tipLayerType="qunar-air-tickets-tip" isTipLayer tipLayerText="修改机票信息">
					<template v-slot:right>
						<view class="title-right flex flex-align-center">
							<view class="item flex flex-align-center flex-column">
								<image class="icon" src="/static/image/other/air-tickets/qunar/service.png"
									mode="widthFix" style="width: 28rpx; height: 28rpx;"></image>
								<view class="text">客服</view>
							</view>
							<view class="item flex flex-align-center flex-column">
								<image class="icon" src="/static/image/other/air-tickets/qunar/share.png"
									mode="widthFix" style="width: 28rpx; height: 28rpx;"></image>
								<view class="text">分享</view>
							</view>

						</view>
					</template>
				</NavBar>
				<view class="status-section">
					<view class="status-row">
						<text class="status-title">出票完成</text>
						<view class="price-box">
							<text class="price-label">体验价</text>
							<text class="price-symbol alipay-font">¥</text>
							<text class="price-val alipay-font">{{ ticketData.orderInfo.price }}</text>
							<uni-icons type="right" size="14" color="#fff"></uni-icons>
						</view>
					</view>
					<view class="order-no-row">
						<text class="order-no-text">订单号:{{ ticketData.orderInfo.orderNo }}</text>
						<image src="/static/image/other/air-tickets/qunar/copy.png" mode="widthFix"
							style="width: 20rpx; height: 20rpx; margin-left: 8rpx;"></image>
					</view>
					<text class="status-desc">出票成功，请按时关注航班变更信息</text>
				</view>
				<view class="image-box">
					<image src="/static/image/other/air-tickets/qunar/banner.png" mode="widthFix" style="width: 100%;">
					</image>
				</view>

			</view>
			<view class="gradient-bg"></view>

			<!-- Content Area -->
			<view class="content-area">
				<!-- Unified Ticket Card -->
				<view class="ticket-wrapper">
					<view class="ticket-card">
						<!-- Flight Section -->
						<view class="flight-section">
							<view class="section-title-row">
								<text class="section-title" style="margin-bottom: 26rpx;">旅行套餐·航班信息</text>
							</view>

							<view class="flight-header">
								<image src="/static/image/other/air-tickets/qunar/non-stop-flight.png" mode="widthFix"
									style="width: 60rpx; height: 32rpx; margin-right: 18rpx;"></image>
								<image class="airline-icon"
									:src="'/static/image/other/air-tickets/air-line/' + airlineInfo.icon + '.png'"
									mode="aspectFit" style="width: 28rpx; height: 28rpx; margin-right: 4rpx;"></image>
								<text class="flight-name">{{ airlineInfo.alias }} {{ ticketData.flightInfo.flightNumber
								}} {{ ticketData.flightInfo.date.substring(5) }} {{ ticketData.flightInfo.startCity
									}}-{{ ticketData.flightInfo.endCity }}</text>
							</view>

							<view class="flight-time-row">
								<view style="align-items: flex-end;" class="flex">
									<view class="time-col" @click="util.goPage('/pages/other/air-tickets/edit/edit')">
										<text class="time-big alipay-font">{{ ticketData.flightInfo.startTime }}</text>
										<text class="airport-text">{{ ticketData.flightInfo.startAirport }} </text>
									</view>
									<view style="width: 16rpx; height: 16rpx;flex-shrink: 0;margin-bottom: 4rpx;">
										<image class="location-icon"
											src="/static/image/other/air-tickets/qunar/location.png"
											style="width: 8px; display: block;" mode="widthFix"></image>
									</view>
								</view>

								<view class="arrow-col">
									<view class="flight-path-row">
										<view class="dot-group left">
											<view class="dot"></view>
											<view class="dot"></view>
											<view class="dot"></view>
										</view>
										<image class="plane-icon"
											src="/static/image/other/air-tickets/qunar/airplane.png" mode="widthFix">
										</image>
										<view class="dot-group right">
											<view class="dot"></view>
											<view class="dot"></view>
											<view class="dot"></view>
										</view>
									</view>
									<text class="duration-text">{{ ticketData.flightInfo.duration }}</text>
								</view>
								<view style="margin-right: 44rpx;align-items: flex-end;" class="flex">
									<view class="time-col align-right"
										@click="util.goPage('/pages/other/air-tickets/edit/edit')">
										<text class="time-big alipay-font">{{ ticketData.flightInfo.endTime }}</text>
										<text class="airport-text">{{ ticketData.flightInfo.endAirport }}</text>
									</view>
									<view style="width: 16rpx; height: 16rpx;flex-shrink: 0;margin-bottom: 4rpx;">
										<image class="location-icon"
											src="/static/image/other/air-tickets/qunar/location.png"
											style="width: 8px; display: block;" mode="widthFix"></image>
									</view>
								</view>


							</view>

							<view class="flight-detail-row">
								<image class="item" src="/static/image/other/air-tickets/qunar/flight-number.png"
									mode="widthFix" style="width: 12px;margin-right: 4rpx;flex-shrink: 0;"></image>
								<text class="detail-item item">{{ ticketData.flightInfo.aircraftType }}</text>
								<text class="detail-divider item">|</text>
								<image class="item" src="/static/image/other/air-tickets/qunar/seat-category.png"
									mode="widthFix" style="width: 12px;margin-right: 4rpx;flex-shrink: 0;"></image>
								<text class="detail-item item">{{ ticketData.flightInfo.seatCategory }}</text>
								<text class="detail-divider item">|</text>
								<image class="item" src="/static/image/other/air-tickets/qunar/on-time.png"
									mode="widthFix" style="width: 12px;margin-right: 4rpx; flex-shrink: 0;"></image>
								<text class="detail-item item">准点率{{ ticketData.flightInfo.onTimeRate }}</text>
								<text class="detail-divider item">|</text>
								<image class="item" src="/static/image/other/air-tickets/qunar/meal.png" mode="widthFix"
									style="width: 12px;margin-right: 4rpx;flex-shrink: 0;"></image>
								<text class="detail-item item">{{ ticketData.flightInfo.meal }}</text>
							</view>
							<view class="tips-box">
								<view class="tips-row flex flex-justify-between">
									<image style="width: 52rpx; height: 28rpx;margin-right: 8rpx;"
										src="/static/image/other/air-tickets/qunar/jihua.png" mode="widthFix"></image>
									<text class="text">准点率：{{ ticketData.flightInfo.onTimeRate }}，截止办理值机时间可参考
										{{ ofCheckInTime }}， 请提前 2
										个小时到机场办理登机手续。</text>
									<view class="right-icon-box flex flex-align-center">
										<uni-icons type="right" size="10" color="#999999"></uni-icons>
									</view>
								</view>
							</view>

							<view class="flight-actions">
								<view class="action-btn">
									<image src="/static/image/other/air-tickets/qunar/refund-describe.png"
										mode="widthFix" style="width: 26rpx; height: 26rpx;margin-right: 8rpx;"></image>
									<text class="btn-text">退改说明</text>
								</view>
								<view class="action-btn" style="flex-direction: column;">
									<view class="flex flex-align-center" style="line-height: 26rpx;">
										<image src="/static/image/other/air-tickets/qunar/luggage.png" mode="widthFix"
											style="width: 26rpx; height: 26rpx;margin-right: 8rpx;"></image>
										<text class="btn-text">行李规定</text>
									</view>

									<text class="sub-text">{{ ticketData.flightInfo.luggageCheckInQuota }}</text>
								</view>
							</view>
						</view>

						<!-- Divider -->
						<view class="ticket-divider">
							<view class="half-circle left"></view>
							<view class="dashed-line"></view>
							<view class="half-circle right"></view>
						</view>

						<!-- Passenger Section -->
						<view class="passenger-section">
							<view class="section-title-row">
								<text class="section-title">旅行套餐·出行信息</text>
								<view class="link-right">
									<text>查看隐藏信息</text>
									<uni-icons style="margin-left: 4rpx;" type="right" size="10"
										color="#D8D8D8"></uni-icons>
								</view>
							</view>

							<view class="passenger-list">
								<view class="passenger-row" v-for="(p, i) in ticketData.passengersInfo" :key="i">
									<view class="row-label" v-if="i === 0">乘机人</view>
									<view class="row-label-placeholder" v-else></view>

									<view class="row-content"
										@click="util.goPage('/pages/other/air-tickets/edit/edit')">
										<view class="p-name">{{ p.name }}</view>
										<view class="p-sub">{{ p.idType }}: {{ p.idType.includes('身份证') ?
											stringUtil.maskIdCard(p.idNumber) : (p.idType.includes('护照') ?
												stringUtil.maskPassport(p.idNumber) : p.idNumber) }}</view>
										<view class="p-sub">
											<text>票号:{{ p.ticketNo }}</text>
											<image src="/static/image/other/air-tickets/qunar/copy-black.png"
												mode="widthFix"
												style="width: 20rpx; height: 20rpx;margin-left: 2rpx;margin-top: 2rpx;">
											</image>
										</view>
									</view>
								</view>

								<view class="contact-row">
									<text class="row-label">联系手机</text>
									<text class="contact-val">+86 {{
										ticketData.ticketNumber.replace(/(\d{3})(\d{4})(\d{4})/,
											'$1****$3') }}</text>
								</view>
							</view>
						</view>
					</view>
				</view>

				<!-- Alerts -->
				<view class="combined-alert-box">
					<view class="alert-row">
						<image class="alert-icon" src="/static/image/other/air-tickets/qunar/fangzha.png">
						</image>
						<text class="alert-content alert-divider">凡以航班变动、取消为由主动提供经济赔偿可能是诈骗，请登录去哪儿网核实或咨询客服 95117。</text>
					</view>
					<!-- <view class="alert-divider"></view> -->
					<view class="alert-row">
						<image class="alert-icon" src="/static/image/other/air-tickets/qunar/chengji.png">
						</image>
						<text class="alert-content">禁止旅客携带没有3C标识、3C标识不清、已经被召回型号或批次的充电宝乘坐境内航班。</text>
					</view>
				</view>

				<!-- Services Card -->
				<view class="card service-card">
					<view class="service-header-row">
						<text class="section-title">出行服务</text>
					</view>

					<view class="service-list-header">
						<image src="/static/image/other/air-tickets/qunar/combo.png" mode="widthFix"
							style="width: 40rpx; height: 40rpx;margin-right: 4rpx;"></image>
						<text class="sl-title">旅行套餐·其他产品</text>
					</view>

					<view class="product-grid">
						<!-- Item 1 -->
						<view class="product-item">
							<view class="pi-top">
								<text class="pi-title">接送机立减券 (8... x2</text>
							</view>
							<uni-icons type="right" size="12" color="#ccc"></uni-icons>
						</view>
						<!-- Item 2 -->
						<view class="product-item">
							<view class="pi-top">
								<text class="pi-title">度假券 x2</text>
								<text class="pi-sub">跟团游享<text style="color: #EF7D12;">9.7折</text></text>

							</view>
							<uni-icons type="right" size="12" color="#ccc"></uni-icons>
						</view>
						<!-- Item 3 -->
						<view class="product-item">
							<view class="pi-top">
								<text class="pi-title">租车券 x1</text>
								<text class="pi-sub">租车享<text style="color: #EF7D12;">85折</text></text>
							</view>
							<uni-icons type="right" size="12" color="#ccc"></uni-icons>

						</view>
					</view>

					<view class="show-more-row">
						<text>收起</text>
						<image src="/static/image/other/air-tickets/qunar/up.png" mode="widthFix"
							style="width: 16rpx; height: 16rpx;"></image>
					</view>
				</view>

				<!-- FAQ Card -->
				<view class="card faq-card">
					<view class="section-title-row">
						<text class="section-title">快速解决问题</text>
						<view class="link-right">
							<text>联系客服</text>
							<uni-icons style="margin-left: 4rpx;" type="right" size="10" color="#93989B"></uni-icons>
						</view>
					</view>

					<view class="faq-tags">
						<view class="faq-tag">补开发票</view>
						<view class="faq-tag">发票打印时限</view>
						<view class="faq-tag">航空公司电话</view>
						<view class="faq-tag">索要电子发票</view>
						<view class="faq-tag">合并邮寄发票</view>
						<view class="faq-tag">行程单时限</view>
					</view>
				</view>

				<!-- Terms Section -->
				<view class="card terms-card">
					<view class="section-title-row">
						<text class="section-title">协议条款</text>
					</view>
					<view class="terms-content">
						<text class="t-gray">本次预定涉及条款：</text>
						<text
							class="t-blue">内容声明、锂电池及危险品乘机须知、去哪儿网电子商务平台服务合同、个人信息授权声明、赠险免责声明、机票价格变动说明、安心飞政策（2024年8月8日更新）、南航锂电池运输规定、重庆航空运总、南航行李规定、南航国内运输总条件、南航限制行李运输规则、南航国内运输散客支线联程运价使用条件、南航国内运输散客票价使用条件规定、南航北京大兴机场、成都天府机场进出港国内客票使用条件规定、南航国内运输散客来回程票价使用条件规定、南航隐私通知、南航国内运输散客中转票价使用条件规定、工商执照信息、旅行社业务经营许可证旅游代订服务合同</text>
					</view>
				</view>

				<!-- Order Info Card -->
				<view class="card order-info-card">
					<view class="info-row">
						<text class="info-label">订单号：</text>
						<view class="info-val-box">
							<text class="info-val">{{ ticketData.orderInfo.orderNo }}</text>
							<text class="info-divider">|</text>
							<text class="info-copy">复制</text>
						</view>
					</view>
					<view class="info-row">
						<text class="info-label">下单时间：</text>
						<text class="info-val">{{ ticketData.orderInfo.orderTime }}</text>
					</view>
				</view>

				<!-- Branding -->
				<view class="branding-area"  >
					<image class="image" src="/static/image/other/air-tickets/qunar/branding-area-image.png"
						mode="widthFix">
					</image>
				</view>
				<view class="" :style="{'height':$store.state.safeBottomAz+'px'}">
					
				</view>
			</view>
		</view>

		<!-- Bottom Fixed -->
		<view class="bottom-bar"  :style="{'padding-bottom':$store.state.safeBottomAz+'px'}">
			<button class="invoice-btn">开具发票</button>
		</view>
	</view>
</template>

<script setup>
import NavBar from '@/components/nav-bar/nav-bar.vue';
import { ref, onMounted, reactive, toRefs, computed } from 'vue';
import { onShow } from '@dcloudio/uni-app';
import defualtData from '@/pages/other/air-tickets/commom/defualt.json';
import { util, stringUtil } from '@/utils/common.js';
import airlineJson from '@/static/json/air-line.json';

const buttonGroup = [{
	name: "编辑机票信息",
	click: () => {
		util.goPage('/pages/other/air-tickets/edit/edit')
	}
}]

const statusBarHeight = ref(0);

const data = reactive({
	navBar: {
		bgColor: '#09D2E3',
		title: '',
		isBack: true,
		textColor: '#fff'
	},
	ticketData: JSON.parse(JSON.stringify(defualtData))
})

let { ticketData } = toRefs(data);

// 计算截止办理值机时间
const ofCheckInTime = computed(() => {
	// Safety check for date existence
	if (!ticketData.value?.flightInfo?.date || !ticketData.value?.flightInfo?.startTime) return '';
	const time = ticketData.value.flightInfo.date + ' ' + ticketData.value.flightInfo.startTime
	// Replace dots with dashes for compatibility if needed, though most browsers handle YYYY-MM-DD
	const formattedTime = time.replace(/\./g, '-');
	const date = new Date(formattedTime);
	if (isNaN(date.getTime())) return '';

	const endTime = new Date(date.getTime() - 30 * 60 * 1000);
	return endTime.getFullYear() + '-' + (endTime.getMonth() + 1).toString().padStart(2, '0') + '-' + endTime.getDate().toString().padStart(2, '0') + ' ' + endTime.getHours().toString().padStart(2, '0') + ':' + endTime.getMinutes().toString().padStart(2, '0');
});

const airlineInfo = computed(() => {
	const airline = airlineJson.airLine.find(item => item.code === ticketData.value.flightInfo.airlineCode);
	console.log('airline', airline);
	return airline || {};
});

onShow(() => {
	const stored = uni.getStorageSync('airTicketsInfo');
	if (stored) {
		Object.assign(data.ticketData, stored);
	}

	// #ifdef APP-PLUS&&!APP-HARMONY
	util.setAndroidSystemBarColor('#ffffff')
	setTimeout(() => {
		plus.navigator.setStatusBarStyle("light");
	}, 500)
	// #endif
});

onMounted(() => {
	const sys = uni.getSystemInfoSync();
	if (sys.statusBarHeight) {
		statusBarHeight.value = sys.statusBarHeight;
	}
});

</script>

<style>
@import "/common/main.css";
</style>

<style lang="less" scoped>
.page-container {
	min-height: 100vh;
	background-color: #F0F1F6;
	position: relative;
}

.nav-bar {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 100;
	background-color: transparent;

	.nav-content {
		height: 44px;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 24rpx;

		.nav-right {
			display: flex;
			gap: 32rpx;

			.nav-icon-item {
				display: flex;
				flex-direction: column;
				align-items: center;

				.nav-text {
					font-size: 20rpx;
					color: #fff;
					margin-top: -4rpx;
				}
			}
		}
	}
}

.main-content {
	// background: linear-gradient(180deg, #09D2E3 0%, #09D2E3 0%, rgba(77, 212, 223, 0.12) 85.26%, rgba(216, 216, 216, 0) 100%);
}

.header-bg {
	background: #09D2E3;

	::v-deep .uni-navbar__header-btns-right {
		width: 100px !important;
	}

	.image-box {
		display: flex;
		margin: 0 16rpx;
	}

	.title-right {
		color: #FFFFFF;
		font-size: 18rpx;
		margin-right: 8rpx;

		.item {
			margin-left: 28rpx;
		}
	}
}

.gradient-bg {
	margin-top: -1px;
	height: 88px;
	background: linear-gradient(180deg, #09D2E3 0%, #09D2E3 0%, rgba(77, 212, 223, 0.12) 85.26%, rgba(216, 216, 216, 0) 100%);
}

.status-section {
	display: flex;
	flex-direction: column;
	padding: 0 32rpx;
	margin-bottom: 28rpx;
	color: #fff;

	.status-row {
		height: 76rpx;
		display: flex;
		justify-content: space-between;
		align-items: baseline;
		// margin-bottom: 8rpx;

		.status-title {
			font-size: 44rpx;
			font-weight: bold;
		}

		.price-box {
			display: flex;
			align-items: baseline;

			.price-label {
				font-size: 22rpx;
				margin-right: 8rpx;
			}

			.price-symbol {
				font-size: 32rpx;
			}

			.price-val {
				font-size: 64rpx;
				font-weight: 500;
				margin-right: 6rpx;
				line-height: 76rpx;
			}
		}
	}

	.order-no-row {
		display: flex;
		align-items: center;
		font-size: 24rpx;
		line-height: 28rpx;
		margin-bottom: 6rpx;
	}

	.status-desc {
		font-size: 22rpx;
		line-height: 26rpx;
	}
}

.content-area {
	margin-top: -96px;
	position: relative;
	z-index: 10;
}

.card {
	margin: 0 16rpx 20rpx;
	background-color: #fff;
	border-radius: 16rpx;
	overflow: hidden;
	box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.03);
}

.ticket-wrapper {
	margin: 0 16rpx 20rpx;
	border-radius: 16rpx 0 16rpx 16rpx;
	overflow: hidden;
}

.ticket-card {
	background-color: #fff;
	border-radius: 16rpx;

	.flight-section {
		display: flex;
		flex-direction: column;
		border-radius: 16rpx;
		padding: 26rpx;
		padding-bottom: 4px;


		.section-title {
			font-size: 30rpx;
			color: #1A1A1A;
			font-weight: bold;
			margin-bottom: 20rpx;
			line-height: 34rpx;
			display: block;
		}

		.flight-header {
			display: flex;
			align-items: center;
			margin-bottom: 20rpx;

			.tag {
				background: linear-gradient(60deg, #00C5DA 0%, #4EE2EC 100%);
				height: 32rpx;
				width: 60rpx;
				line-height: 32rpx;
				text-align: center;
				color: #fff;
				font-size: 20rpx;
				border-radius: 4rpx;
				margin-right: 18rpx;
			}

			.flight-name {
				font-size: 20rpx;
				color: #1A1A1A;
			}
		}

		.flight-time-row {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-bottom: 20rpx;
			margin-left: 76rpx;

			.time-col {
				display: flex;
				flex-direction: column;
				margin-right: 8rpx;

				.time-big {
					font-size: 44rpx;
					line-height: 40rpx;
					font-weight: 500;
					color: #363636;
					line-height: 1;
					margin-bottom: 14rpx;
					letter-spacing: -1rpx;
				}

				.airport-text {
					font-size: 20rpx;
					color: #363636;
					display: flex;
					align-items: center;
					gap: 4rpx;
					line-height: 20rpx;
				}
			}

			.align-right {
				align-items: flex-end;
			}

			.arrow-col {
				flex: 1;
				display: flex;
				flex-direction: column;
				align-items: center;

				.flight-path-row {
					display: flex;
					align-items: center;
					justify-content: center;
					margin-top: 24rpx;

					.dot-group {
						display: flex;
						align-items: center;
						flex-shrink: 0;

						.dot {
							width: 4rpx;
							height: 4rpx;
							border-radius: 50%;
							background-color: #09D2E3;
							flex-shrink: 0;
						}

						&.left {
							display: flex;
							margin-right: 10rpx;

							.dot:nth-child(1) {
								opacity: 0.2;
								margin-top: 24rpx;
								margin-right: 12rpx;
							}

							.dot:nth-child(2) {
								opacity: 0.5;
								margin-top: 22rpx;
								margin-right: 12rpx;
							}

							.dot:nth-child(3) {
								opacity: 0.8;
								margin-top: 20rpx;

							}
						}

						&.right {
							margin-left: 10rpx;

							.dot:nth-child(1) {
								opacity: 0.8;
								margin-top: 20rpx;
							}

							.dot:nth-child(2) {
								opacity: 0.5;
								margin-top: 22rpx;
								margin-left: 12rpx;
							}

							.dot:nth-child(3) {
								opacity: 0.2;
								margin-top: 24rpx;
								margin-left: 12rpx;
							}
						}
					}

					.plane-icon {
						width: 108rpx;
						height: 28rpx;
						display: block;
					}
				}

				.duration-text {
					font-size: 20rpx;
					margin-top: 12rpx;
					color: #999999;
				}
			}
		}

		.flight-detail-row {
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 20rpx;
			color: #626262;
			margin-bottom: 24rpx;

			.item {
				flex-shrink: 0;
			}

			.detail-item {
				margin-left: 4rpx;
			}

			.detail-divider {
				color: #D8D8D8;
				margin: 0 16rpx;
			}
		}

		.tips-box {
			padding-bottom: 22rpx;
			border-bottom: 2rpx dashed #EAEAEA;
			margin-bottom: 24rpx;

			.tips-row {
				background-color: #EFFBFB;
				border-radius: 12rpx;
				padding: 12rpx;

				.text {
					font-size: 20rpx;
					color: #626262;
					line-height: 32rpx;
					margin-right: 62rpx;
					white-space: pre-wrap;
					flex: 1;
				}
			}
		}

		.flight-actions {
			display: flex;
			justify-content: space-between;

			.action-btn {
				// flex: 1;
				width: calc(50% - 10rpx);
				border: 1.5rpx solid #35D5E4;
				border-radius: 16rpx;
				padding: 20rpx 0;
				display: flex;
				align-items: center;
				justify-content: center;
				height: 90rpx;

				.btn-text {
					color: #35D5E4;
					font-size: 24rpx;
				}

				.btn-right {
					display: flex;
					flex-direction: column;
					align-items: flex-start;


				}

				.sub-text {
					font-size: 20rpx;
					color: #1A1A1A;
					margin-top: 10rpx;
					line-height: 20rpx;
				}
			}
		}
	}

	.ticket-divider {
		position: relative;
		height: 40rpx;
		background-color: #fff;
		display: flex;
		align-items: center;
		overflow: hidden;

		.half-circle {
			width: 30rpx;
			height: 30rpx;
			background-color: #F0F1F6;
			border-radius: 50%;
			position: absolute;
			top: 50%;
			transform: translateY(-50%);

			&.left {
				left: -15rpx;
			}

			&.right {
				right: -15rpx;
			}
		}

		.dashed-line {
			flex: 1;
			// margin: 0 30rpx;
			border-top: 2rpx dashed #eee;
		}
	}

	.passenger-section {
		padding: 12rpx 24rpx 30rpx;
		border-radius: 0 0 16rpx 16rpx;

		.section-title-row {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-bottom: 26rpx;

			.section-title {
				font-size: 30rpx;
				font-weight: bold;
				color: #1A1A1A;
				line-height: 35rpx;
			}

			.link-right {
				font-size: 22rpx;
				color: #363636;
				display: flex;
				align-items: center;
				line-height: 26rpx;
			}
		}

		.passenger-list {
			margin-left: 8rpx;
		}

		.passenger-row {
			display: flex;
			margin-bottom: 14rpx;
			margin-left: 8rpx;

			.row-label {
				width: 154rpx;
				font-size: 26rpx;
				color: #666666;
				line-height: 30rpx;
			}

			.row-label-placeholder {
				width: 154rpx;
			}

			.row-content {
				flex: 1;

				.p-name {
					font-size: 28rpx;
					color: #363636;
					margin-bottom: 12rpx;
					line-height: 30rpx;
					font-weight: 500;
				}

				.p-sub {
					font-size: 26rpx;
					color: #999;
					margin-bottom: 10rpx;
					line-height: 30rpx;
					display: flex;
					align-items: center;
				}
			}
		}

		.contact-row {
			margin-top: 32rpx;
			display: flex;
			align-items: center;

			.row-label {
				width: 154rpx;
				font-size: 26rpx;
				color: #666666;
			}

			.contact-val {
				font-size: 26rpx;
				color: #363636;
			}
		}
	}
}

.combined-alert-box {
	margin: 20rpx 16rpx;
	background: linear-gradient(170deg, #FDEBDD 0%, #FFE3DF 100%);
	border-radius: 16rpx;
	padding: 4rpx 22rpx;

	.alert-row {
		display: flex;
		align-items: center;

		.alert-icon {
			width: 50px;
			height: 16px;
			margin-right: 16rpx;
		}

		.alert-tag {
			background: linear-gradient(90deg, #ff6b6b, #ff4d4f);
			color: #fff;
			font-size: 20rpx;
			padding: 4rpx 10rpx;
			border-radius: 6rpx;
			margin-right: 16rpx;
			white-space: nowrap;
			line-height: normal;
			margin-top: 4rpx;
		}

		.alert-content {
			font-size: 22rpx;
			color: #E44B2F;
			line-height: 30rpx;
			padding: 10rpx 0;
			flex: 1;
			text-align: justify;
		}
	}

	.alert-divider {
		border-bottom: 1rpx dashed #CFB7AD;
	}
}

.service-card {
	padding: 12px 14px;
	line-height: 35rpx;

	.service-header-row {
		display: flex;
		justify-content: space-between;
		align-items: flex-start;
		margin-bottom: 24rpx;

		.section-title {
			font-size: 30rpx;
			font-weight: bold;
			color: #363636;
		}
	}

	.service-list-header {
		display: flex;
		align-items: center;
		margin-bottom: 18rpx;

		.sl-title {
			font-size: 26rpx;
			font-weight: 500;
			line-height: 30rpx;
			color: #1A1A1A;
		}
	}

	.product-grid {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		// margin-bottom: 20rpx;

		.product-item {
			width: calc(50% - 13rpx);
			background-color: #fff;
			height: 88rpx;
			background-color: #F7F8FA;
			padding: 0 20rpx;
			border-radius: 12rpx;
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: center;
			margin-bottom: 16rpx;

			.pi-top {
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				align-items: flex-start;

				.pi-title {
					font-size: 24rpx;
					color: #1A1A1A;
					font-weight: 500;
					flex: 1;
					margin-right: 8rpx;
					white-space: nowrap;
				}
			}

			.pi-sub {
				font-size: 20rpx;
				color: #767676;
			}

			&:first-child {
				/* If item 1 looks like it takes same width */
			}
		}
	}

	.show-more-row {
		display: flex;
		justify-content: center;
		align-items: center;
		padding-top: 12rpx;
		font-size: 22rpx;
		color: #363636;
		gap: 4rpx;
	}
}

.faq-card {
	padding: 26rpx 28rpx 10rpx;

	.section-title-row {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 24rpx;

		.section-title {
			font-size: 30rpx;
			font-weight: bold;
			color: #363636;
			line-height: 35rpx;
		}

		.link-right {
			font-size: 22rpx;
			color: #999999;
			display: flex;
			align-items: center;
			line-height: 26rpx;
		}
	}

	.faq-tags {
		display: flex;
		flex-wrap: wrap;

		.faq-tag {
			height: 52rpx;
			line-height: 52rpx;
			padding: 0 24rpx;
			background-color: #fff;
			border: 0.5px solid #C2C2C2;
			border-radius: 26rpx;
			font-size: 22rpx;
			color: #626262;
			margin-right: 16rpx;
			margin-bottom: 28rpx;
		}
	}
}

.terms-card {
	padding: 28rpx;

	.section-title {
		font-size: 30rpx;
		font-weight: bold;
		color: #363636;
		margin-bottom: 24rpx;
		line-height: 35rpx;
		display: block;
	}

	.terms-content {
		font-size: 22rpx;
		line-height: 30rpx;
		text-align: left;

		.t-gray {
			color: #999999;
		}

		.t-blue {
			color: #01C4D1;
		}
	}
}

.order-info-card {
	padding: 30rpx 28rpx;

	.info-row {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 20rpx;
		line-height: 30rpx;

		&:last-child {
			margin-bottom: 0;
		}

		.info-label {
			font-size: 26rpx;
			color: #363636;
		}

		.info-val-box {
			display: flex;
			align-items: center;
			font-size: 26px;
			color: #999;

			.info-val {
				margin-right: 16rpx;
			}

			.info-divider {
				color: #eee;
				margin-right: 16rpx;
				font-size: 20rpx;
			}

			.info-copy {
				color: #626262;
				font-size: 22rpx;
			}
		}

		.info-val {
			font-size: 26rpx;
			color: #999999;
		}
	}
}

.branding-area {
	margin-top: 48rpx;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-bottom: 148rpx;
	padding-bottom: calc(148rpx + constant(safe-area-inset-bottom));
	padding-bottom: calc(148rpx + env(safe-area-inset-bottom));

	.image {
		width: 438rpx;
		height: 120rpx;
	}

}

.bottom-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	z-index: 999;
	background-color: #fff;
	padding: 10rpx 16rpx;
	box-sizing: border-box;
	box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.03);
	padding-bottom: calc(10rpx + constant(safe-area-inset-bottom));
	padding-bottom: calc(10rpx + env(safe-area-inset-bottom));

	.invoice-btn {
		background-color: #00D4E2;
		color: #fff;
		border-radius: 390rpx;
		font-size: 30rpx;
		font-weight: bold;
		border: none;
		height: 76rpx;

		&::after {
			border: none;
		}
	}
}
</style>
