/**
 * 手机浏览器适配补丁。
 * 每个页面都要在页面自己的 CSS 之后引入本文件，用于修正
 * 「微信内 100vh 行为」与「手机浏览器地址栏收放」的差异。
 *
 * 注意：这里不再给 body / .container 写死 height，
 * 只给 min-height，让内容长的页面（协议、说明等）能正常文档滚动。
 */

/* 1. 用 100dvh 替代 100vh：地址栏收起/展开时容器高度跟随可视区 */
@supports (height: 100dvh) {
	html,
	body {
		min-height: 100dvh !important;
	}

	.container,
	.modal-overlay,
	.simple-modal-overlay {
		min-height: 100dvh !important;
	}

	/* 原来 .container 是 height:100vh + flex 列布局，改成自适应高度后
	   内容超长时由文档滚动，不会因为微信地址栏收放而错位 */
	.container {
		height: auto !important;
	}

	.modal-overlay,
	.simple-modal-overlay {
		height: 100dvh !important;
	}
}

/* 2. 底部固定区域避让 iPhone 安全区（Home Indicator） */
.nav-section,
.bottom-nav,
.tab-bar,
.send-button-container,
.send-btn-container,
.fixed-bottom,
.payment-bar,
.footer-bar {
	padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
	box-sizing: content-box;
}

/* 3. 顶部固定区域避让刘海 */
.page-header.sticky-top,
.fixed-top {
	padding-top: env(safe-area-inset-top, 0px);
}

/* 4. 手机浏览器惯性滚动与点击反馈 */
body {
	-webkit-overflow-scrolling: touch;
	-webkit-tap-highlight-color: transparent;
}

/* 5. 固定弹层铺满可视区，避免底部留白 */
.simple-modal-overlay,
.modal-overlay {
	position: fixed !important;
	inset: 0 !important;
}

/* 6. 空列表占位（新站点部分页面用到） */
.empty-tip {
	padding: 80px 20px;
	text-align: center;
	color: #999;
	font-size: 15px;
	line-height: 1.8;
}

.empty-tip i {
	display: block;
	font-size: 46px;
	color: #d8d8d8;
	margin-bottom: 14px;
}
