@charset "utf-8";

/* ==========================================================================
   厂商登录后的顶栏下拉菜单，配套 fragments/booth-menu.html。

   形态：触发器只显示「用户头像 + 厂商编号 + 向下箭头」（头像取厂商 LOGO），
   鼠标移入展开、移出隐藏；键盘 Tab 进入时由 :focus-within 保持展开。卡片自上而下三段：
     1. 头部：厂商 LOGO（高 44px、宽 auto、圆角 4px）+ 右侧「Vendor Center ›」，
        不显示公司名称；
     2. 快捷入口：分配商机 / 合作咨询 / 采购线索，三列图标 + 文字；
     3. 底部：进入后台主按钮 + 退出。

   三处顶栏按钮尺寸不同，靠外层修饰类只改触发器外观，卡片本体保持一致：
     .boothmenu--header-20260928  平台页顶栏（与 Login 同高的 36px 方角按钮）
     .boothmenu--home-20261015    平台首页欢迎条（30px 圆角胶囊）
     .boothmenu--booth-20261022   展位页顶栏（与 Join / Login 同款细边按钮）

   卡片定位挂在 .boothmenu 上（position:relative），右对齐触发器，避免窄屏溢出。

   优先级注意：展位页顶栏有 `.topbar-btns a` / `.topbar-btns a:first-child` /
   `.topbar-btns a:hover` 这类通用链接样式，选择器权重是 (0,2,1)。卡片里的链接
   恰好也是各自父节点的第一个子元素，会被它们染成蓝框蓝字，看起来像「默认选中」。
   所以卡片内的链接规则统一写成 `.boothmenu .boothmenu-xxx` 三段（权重 (0,3,0) 起），
   高过顶栏那套；同时把 :visited 也归位，点过的入口不留「已访问」蓝字。
   ========================================================================== */

/* ===== 1. 容器与触发器 ===== */
.boothmenu {
	position: relative;
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
	line-height: normal;
}

.boothmenu .boothmenu-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0 10px 0 6px;
	height: 36px;
	background: #fff;
	border: 1px solid #E5EAF0;
	border-radius: 6px;
	color: #202933;
	font-size: 14px;
	font-family: inherit;
	white-space: nowrap;
	cursor: pointer;
	box-sizing: border-box;
	transition: background .2s, border-color .2s;
}

/* 触发器上的用户头像：圆形、白底、留细边；厂商 LOGO 多偏宽，用 contain 不裁切 */
.boothmenu .boothmenu-avatar {
	display: block;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	background: #fff;
	border: 1px solid #EAEDF1;
	border-radius: 50%;
	box-sizing: border-box;
	object-fit: contain;
}

/* 头像右侧的厂商编号（展位号）：与 Login 同字号，长编号不换行、不挤掉箭头 */
.boothmenu .boothmenu-no {
	flex-shrink: 0;
	color: #202933;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
}

/* 向下箭头：展开时翻转，给出「已打开」的反馈 */
.boothmenu .boothmenu-caret {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	transition: transform .2s;
}

/* ===== 2. 卡片 ===== */
.boothmenu .boothmenu-panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 70;
	width: 360px;
	padding: 16px;
	background: #fff;
	border: 1px solid #EAEDF1;
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(20, 45, 90, .14);
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .16s ease, transform .16s ease, visibility .16s;
	text-align: left;
}

/* 卡片内链接先归位：顶栏那套 a / a:first-child / a:hover 不许带进来 */
.boothmenu .boothmenu-panel a {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #4F5862;
	font-size: 13px;
	font-weight: 400;
	line-height: 18px;
	text-decoration: none;
}

/* 触发器与卡片之间的 10px 空隙用透明过渡区接住，鼠标移过去不会闪 */
.boothmenu .boothmenu-panel::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -11px;
	height: 11px;
}

/* 有悬停能力的设备：移入整块菜单（含卡片）即展开并高亮触发器，移出即收起。
   键盘焦点在菜单内时同样保持展开。 */
@media (hover: hover) {
	.boothmenu:hover .boothmenu-trigger,
	.boothmenu:focus-within .boothmenu-trigger {
		background: #F3F7FF;
		border-color: #0D6AED;
		color: #0D6AED;
	}

	.boothmenu:hover .boothmenu-no,
	.boothmenu:focus-within .boothmenu-no {
		color: #0D6AED;
	}

	.boothmenu:hover .boothmenu-caret,
	.boothmenu:focus-within .boothmenu-caret {
		transform: rotate(180deg);
	}

	.boothmenu:hover .boothmenu-panel,
	.boothmenu:focus-within .boothmenu-panel {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}
}

/* ===== 3. 头部：LOGO + 进入后台（不显示公司名称） ===== */
.boothmenu .boothmenu-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 14px;
	border-bottom: 1px solid #EFF2F6;
}

/* 厂商 LOGO：高度固定 44px、宽度随 LOGO 比例（宽 LOGO 不裁切、不缩成小方块），圆角 4px。
   容器内留 2px 让 LOGO 不贴边，图片高度就是 40px；超宽 LOGO 由 max-width 兜底，
   避免把右侧「Vendor Center ›」顶出卡片。
   a / span 两种形态共用，所以带上标签名，压过 .topbar-btns a:first-child 的蓝框。 */
.boothmenu .boothmenu-head a.boothmenu-logo,
.boothmenu .boothmenu-head span.boothmenu-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: 44px;
	max-width: 150px;
	padding: 2px;
	flex-shrink: 0;
	background: #fff;
	border: 1px solid #EAEDF1;
	border-radius: 4px;
	box-sizing: border-box;
	overflow: hidden;
}

.boothmenu .boothmenu-head a.boothmenu-logo:visited {
	border-color: #EAEDF1;
}

.boothmenu .boothmenu-head a.boothmenu-logo:hover {
	border-color: #0D6AED;
}

/* 图片：高固定（容器 40px）、宽按比例 auto，圆角 4px */
.boothmenu .boothmenu-head .boothmenu-logo img {
	display: block;
	width: auto;
	height: 100%;
	max-width: 100%;
	border-radius: 4px;
	object-fit: contain;
}

.boothmenu .boothmenu-head .boothmenu-enter {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	flex-shrink: 0;
	height: 28px;
	padding: 0 10px;
	border: 1px solid #E5EAF0;
	border-radius: 14px;
	color: #4F5862;
	font-size: 12px;
	white-space: nowrap;
	transition: border-color .2s, color .2s;
}

/* 点过、拿到焦点都保持常态，只有悬停才变蓝 */
.boothmenu .boothmenu-head .boothmenu-enter:visited,
.boothmenu .boothmenu-head .boothmenu-enter:focus {
	border-color: #E5EAF0;
	color: #4F5862;
}

.boothmenu .boothmenu-head .boothmenu-enter:hover {
	border-color: #0D6AED;
	color: #0D6AED;
}

.boothmenu .boothmenu-enter i,
.boothmenu .boothmenu-cta i {
	font-style: normal;
	font-size: 14px;
	line-height: 1;
}

/* ===== 4. 快捷入口：三列图标 ===== */
.boothmenu .boothmenu-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
	padding: 12px 0 6px;
}

.boothmenu .boothmenu-grid .boothmenu-cell {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 12px 4px;
	border-radius: 8px;
	color: #4F5862;
	font-size: 13px;
	line-height: 18px;
	text-align: center;
	transition: background .2s, color .2s;
}

/* 三个入口默认都是灰字透明底：不加「当前项」样式。
   访问过或被点到时浏览器会按已访问链接上色，这里显式归位，
   否则第一个入口一旦点过就会一直是蓝的，看着像默认选中。 */
.boothmenu .boothmenu-grid .boothmenu-cell:visited,
.boothmenu .boothmenu-grid .boothmenu-cell:focus {
	background: transparent;
	color: #4F5862;
}

/* 键盘 Tab 进入时给一圈蓝框，鼠标点击不出现 */
.boothmenu .boothmenu-grid .boothmenu-cell:focus {
	outline: none;
}

.boothmenu .boothmenu-grid .boothmenu-cell:focus-visible {
	outline: 2px solid #0D6AED;
	outline-offset: -2px;
}

.boothmenu .boothmenu-grid .boothmenu-cell:hover {
	background: #F3F7FF;
	color: #0D6AED;
}

.boothmenu .boothmenu-grid .boothmenu-cell svg {
	width: 26px;
	height: 26px;
	fill: none;
	stroke: #6B7280;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: stroke .2s;
}

.boothmenu .boothmenu-grid .boothmenu-cell:hover svg {
	stroke: #0D6AED;
}

/* ===== 5. 底部：进入后台 + 退出 ===== */
.boothmenu .boothmenu-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 12px;
	border-top: 1px solid #EFF2F6;
}

.boothmenu .boothmenu-foot .boothmenu-cta {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 36px;
	padding: 0 16px;
	background: #0D6AED;
	border: 0;
	border-radius: 6px;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	transition: background .2s, color .2s;
}

/* 访问过保持蓝底白字 */
.boothmenu .boothmenu-foot .boothmenu-cta:visited {
	background: #0D6AED;
	color: #fff;
}

/* 悬停只加深底色，文字继续是白色：顶栏 a:hover 会改成蓝字，必须显式写回 */
.boothmenu .boothmenu-foot .boothmenu-cta:hover,
.boothmenu .boothmenu-foot .boothmenu-cta:focus {
	background: #0A57C4;
	color: #fff;
}

.boothmenu .boothmenu-logout {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 6px 8px;
	background: transparent;
	border: 0;
	border-radius: 6px;
	color: #6B7280;
	font-size: 13px;
	font-family: inherit;
	cursor: pointer;
	transition: background .2s, color .2s;
}

.boothmenu .boothmenu-logout:hover {
	background: #F5F7F8;
	color: #202933;
}

.boothmenu .boothmenu-logout svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.boothmenu .boothmenu-logout[data-busy="1"] {
	opacity: .6;
	cursor: default;
}

/* 退出失败提示：贴在卡片底部，几秒后自动消失，不弹窗打断 */
.boothmenu .boothmenu-tip {
	display: none;
	margin: 8px 0 0;
	padding: 6px 10px;
	background: #FEF2F2;
	border-radius: 6px;
	color: #E03A3E;
	font-size: 12px;
	line-height: 18px;
}

.boothmenu .boothmenu-tip.is-show {
	display: block;
}

/* ===== 6. 三处顶栏的触发器外观 ===== */

/* 平台页顶栏：与 Login 同为 36px 方角按钮，已由基础样式覆盖，这里只保证不被右侧 flex 压缩 */
.boothmenu--header-20260928 .boothmenu-trigger {
	height: 36px;
	font-size: 14px;
}

/* 平台首页欢迎条：30px 圆角胶囊，与 Join / Login 一致 */
.boothmenu--home-20261015 .boothmenu-trigger {
	height: 30px;
	padding: 0 8px 0 5px;
	border-radius: 15px;
	font-size: 13px;
}

.boothmenu--home-20261015 .boothmenu-avatar {
	width: 22px;
	height: 22px;
}

/* 首页欢迎条 30px 高：编号跟着降一档字号，胶囊才不会被撑高 */
.boothmenu--home-20261015 .boothmenu-no {
	font-size: 12px;
}

.boothmenu--home-20261015 .boothmenu-panel {
	width: 340px;
}

/* 展位页顶栏：细边方角按钮，与 Join / Login 同款 */
.boothmenu--booth-20261022 .boothmenu-trigger {
	height: 34px;
	padding: 0 9px 0 5px;
	border-radius: 4px;
	font-size: 13px;
}

.boothmenu--booth-20261022 .boothmenu-avatar {
	width: 22px;
	height: 22px;
}

/* ===== 7. 窄屏：卡片贴右侧、宽度自适应，避免横向溢出 ===== */
@media (max-width: 1023px) {
	.boothmenu .boothmenu-panel {
		width: min(360px, calc(100vw - 32px));
	}

	.boothmenu .boothmenu-grid .boothmenu-cell {
		padding: 10px 2px;
		font-size: 12px;
	}
}