/* ============================================================
   Hetian Expo —— 展会公告弹窗（mu-plugin hetian-expo.php 配套样式）
   行为：默认全部隐藏；html.ht-expo-on 显示大弹窗，
   html.ht-expo-bar-on 显示右下角小弹窗；无 JS 永不显示（爬虫直显页面）。
   色值一律走 design-tokens（--ht-*），VI：红 ≤10%、石墨黑、白。
   ============================================================ */

/* ---------- 大弹窗（居中卡片 + 压暗层） ---------- */
#ht-expo-modal {
	position: fixed;
	inset: 0;
	z-index: 9988; /* 高于彩蛋 9985，低于全页噪点 9990 / 开屏 99995 / 切换幕布 99999 */
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(16, 16, 18, .55);
	opacity: 0;
	transition: opacity .26s ease;
}
html.ht-expo-on #ht-expo-modal {
	display: flex;
	opacity: 1;
}
html.ht-expo-on.ht-expo-out #ht-expo-modal {
	opacity: 0;
}

.ht-expo-card {
	position: relative;
	width: min(480px, 100%);
	padding: 26px 26px 22px;
	background: var(--ht-black);
	border: 1px solid rgba(230, 31, 24, .4);
	border-radius: var(--ht-radius-card);
	box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
	transform: translateY(10px) scale(.97);
	transition: transform .3s cubic-bezier(.2, 1.25, .3, 1);
}
html.ht-expo-on .ht-expo-card {
	transform: none;
}
/* 5 秒无操作自动缩小：卡片飞向右下角小弹窗的位置（缩小感） */
html.ht-expo-on.ht-expo-out .ht-expo-card {
	transform: translate(min(38vw, 640px), min(34vh, 520px)) scale(.06);
	transition: transform .26s cubic-bezier(.5, 0, .8, .4);
}

.ht-expo-kicker {
	margin: 0 0 10px;
	color: var(--ht-red);
	font-size: var(--ht-fs-eyebrow);
	font-weight: 600;
	letter-spacing: var(--ht-ls-eyebrow);
	text-transform: uppercase;
}

.ht-expo-title {
	margin: 0 40px 18px 0;
	color: var(--ht-white);
	font-family: var(--ht-font-display);
	font-size: clamp(1.4rem, 2.6vw, 1.9rem);
	font-weight: 600;
	line-height: 1.18;
	letter-spacing: var(--ht-ls-display);
}

/* 信息三格：时间 / 地点 / 展位 */
.ht-expo-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	padding: 14px 0;
	border-top: 1px solid var(--ht-black-3);
	border-bottom: 1px solid var(--ht-black-3);
}
.ht-expo-cell span {
	display: block;
	margin-bottom: 3px;
	color: var(--ht-gray-2);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.ht-expo-cell strong {
	color: var(--ht-white);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}
.ht-expo-cell--booth strong {
	color: var(--ht-red);
	font-family: var(--ht-font-display);
	font-size: 26px;
	line-height: 1.1;
}

/* 看点清单 */
.ht-expo-list {
	margin: 14px 0 18px;
	padding: 0;
	list-style: none;
}
.ht-expo-list li {
	position: relative;
	margin: 0 0 8px;
	padding-left: 16px;
	color: rgba(237, 237, 239, .85);
	font-size: 14.5px;
	line-height: 1.45;
}
.ht-expo-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .52em;
	width: 6px;
	height: 6px;
	background: var(--ht-red);
}

/* 展台照片（配置表 booth_img 有值时 JS 插入） */
.ht-expo-photo {
	margin: 0 0 14px;
}
.ht-expo-photo img {
	display: block;
	width: 100%;
	border: 1px solid var(--ht-black-3);
	border-radius: var(--ht-radius);
}

.ht-expo-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.ht-expo-cta {
	display: inline-flex;
	align-items: center;
	padding: 11px 20px;
	background: var(--ht-red);
	border-radius: var(--ht-radius);
	color: var(--ht-white) !important;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: var(--ht-ls-btn);
	text-decoration: none;
	transition: background var(--ht-t);
}
.ht-expo-cta:hover {
	background: var(--ht-red-dark);
	color: var(--ht-white) !important;
}
.ht-expo-collapse {
	padding: 11px 16px;
	background: transparent;
	border: 1px solid var(--ht-black-3);
	border-radius: var(--ht-radius);
	color: var(--ht-gray);
	font-size: 14px;
	cursor: pointer;
	transition: color var(--ht-t), border-color var(--ht-t);
}
.ht-expo-collapse:hover {
	border-color: var(--ht-gray-2);
	color: var(--ht-white);
}

/* 右上关闭（缩小到小弹窗，同 5 秒自动缩小） */
.ht-expo-x {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 34px;
	height: 34px;
	background: transparent;
	border: 0;
	color: var(--ht-gray-2);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: color var(--ht-t);
}
.ht-expo-x:hover {
	color: var(--ht-white);
}

/* ---------- 右下角小弹窗（常驻提示） ---------- */
#ht-expo-bar {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 9984;
	display: none;
	max-width: min(400px, calc(100vw - 36px));
	background: var(--ht-black);
	border: 1px solid rgba(230, 31, 24, .35);
	border-radius: var(--ht-radius-card);
	box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
}
html.ht-expo-bar-on #ht-expo-bar {
	display: block;
	animation: ht-expo-bar-in .4s cubic-bezier(.2, 1.25, .3, 1) both;
}
@keyframes ht-expo-bar-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
}

.ht-expo-bar__main {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 9px 38px 9px 10px;
	background: transparent;
	border: 0;
	cursor: pointer;
	text-align: left;
}
.ht-expo-bar__pin {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	background: rgba(230, 31, 24, .14);
	border-radius: var(--ht-radius);
	color: var(--ht-red);
}
.ht-expo-bar__tag {
	flex: 0 1 auto;
	color: var(--ht-white);
	font-family: var(--ht-font-display);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .05em;
	white-space: nowrap;
}
.ht-expo-bar__status {
	flex: 1 1 auto;
	overflow: hidden;
	color: var(--ht-gray);
	font-size: 12px;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.ht-expo-bar__booth {
	flex: 0 0 auto;
	padding: 2px 8px;
	background: rgba(230, 31, 24, .12);
	border: 1px solid var(--ht-red);
	border-radius: var(--ht-radius);
	color: var(--ht-white);
	font-family: var(--ht-font-display);
	font-size: 13px;
	white-space: nowrap;
}

.ht-expo-bar__x {
	position: absolute;
	top: 0;
	right: 2px;
	bottom: 0;
	width: 32px;
	background: transparent;
	border: 0;
	color: var(--ht-gray-2);
	font-size: 18px;
	cursor: pointer;
	transition: color var(--ht-t);
}
.ht-expo-bar__x:hover {
	color: var(--ht-white);
}

/* 与节日彩蛋错位：小弹窗在场时彩蛋上移（彩蛋 z-index 更高，上下叠放不重叠） */
#ht-egg {
	transition: bottom .3s ease;
}
html.ht-expo-bar-on #ht-egg {
	bottom: 106px;
}

/* ---------- 降级与适配 ---------- */
@media (prefers-reduced-motion: reduce) {
	#ht-expo-modal,
	.ht-expo-card,
	#ht-expo-bar,
	html.ht-expo-bar-on #ht-expo-bar {
		animation: none !important;
		transition: none !important;
	}
}

@media (max-width: 640px) {
	#ht-expo-modal {
		padding: 16px;
		align-items: flex-start;
		padding-top: max(16px, calc((100vh - 620px) / 2));
	}
	/* 小屏不铺满：卡片限宽 420px，两侧留出可见边距；限高内滚动 */
	.ht-expo-card {
		width: min(420px, calc(100vw - 48px));
		margin-inline: auto;
		max-height: min(78vh, 640px);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		padding: 18px 16px 14px;
	}
	.ht-expo-title {
		font-size: 1.15rem;
		margin-right: 28px;
	}
	.ht-expo-grid {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
		padding: 12px 0;
	}
	.ht-expo-cell strong {
		font-size: 14px;
	}
	.ht-expo-cell--booth {
		grid-column: 1 / -1;
	}
	.ht-expo-cell--booth strong {
		font-size: 20px;
	}
	/* 展台图限高，卡片不无限拉长 */
	.ht-expo-photo img {
		max-height: 30vh;
		object-fit: cover;
	}
	.ht-expo-list {
		margin: 12px 0 14px;
	}
	.ht-expo-list li {
		font-size: 13px;
		margin-bottom: 6px;
	}
	.ht-expo-cta,
	.ht-expo-collapse {
		padding: 9px 14px;
		font-size: 13px;
	}
	#ht-expo-bar {
		right: 12px;
		bottom: 12px;
	}
	html.ht-expo-bar-on #ht-egg {
		bottom: 100px;
	}
}

@media (max-width: 400px) {
	/* 极窄屏：藏状态行，保「展会名 + 展位号」两要素 */
	.ht-expo-bar__status {
		display: none;
	}
}

@media print {
	#ht-expo-modal,
	#ht-expo-bar {
		display: none !important;
	}
}
