/**
 * Add Plan 按钮样式（0.9.45）
 * 蓝紫色 #5b5bd6；只作用于 .unithm-addplan 与页眉头像
 */

/* ---------- 按钮 ---------- */
button.unithm-addplan {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin-top: 10px;
	padding: 13px 18px;
	border: 0;
	border-radius: 999px;
	background: #5b5bd6;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .01em;
	cursor: pointer;
	transition: background .16s ease, transform .16s ease;
	font-family: inherit;
}

button.unithm-addplan:hover {
	background: #4b4bc4;
	transform: translateY(-1px);
}

button.unithm-addplan.is-added {
	background: #e8e8fb;
	color: #4b4bc4;
	cursor: default;
	transform: none;
}

/* Our Team 卡片：自适应宽度，别拉满整行 */
.uc-card-footer button.unithm-addplan {
	width: auto !important;
	min-width: 150px;
	max-width: 230px;
	margin: 0 0 0 auto;
	padding: 11px 26px;
	font-size: 13.5px;
	align-self: flex-end;
}

.uc-card-footer {
	display: flex;
	align-items: center;
	gap: 16px;
}

/* 导游卡：小一号，不撑破卡片 */
button.unithm-addplan--sm {
	width: auto;
	margin: 10px 0 0;
	padding: 8px 14px;
	font-size: 12.5px;
	border-radius: 999px;
}

.unithmemd-guides__card {
	position: relative;
}

/* ---------- 页眉头像 ---------- */
.unithm-plan-avatars {
	display: none;
	align-items: center;
	margin-left: 8px;
	cursor: pointer;
}

.unithm-plan-av {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	margin-left: -8px;
	border-radius: 50%;
	border: 2px solid #fff;
	background: #5b5bd6;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,.14);
}

.unithm-plan-av:first-child { margin-left: 0; }

.unithm-plan-av img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.unithm-plan-av--more {
	background: #111;
}

/* ---------- 提示 ---------- */
.unithm-addplan-toast {
	position: fixed;
	left: 50%;
	bottom: 28px;
	transform: translateX(-50%);
	z-index: 100000;
	background: #111;
	color: #fff;
	padding: 11px 18px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	box-shadow: 0 10px 30px rgba(0,0,0,.24);
	transition: opacity .3s ease;
}

.unithm-addplan-toast.is-out { opacity: 0; }

@media (max-width: 849px) {
	button.unithm-addplan { padding: 12px 16px; font-size: 13.5px; }
	.unithm-plan-av { width: 22px; height: 22px; font-size: 10px; }
}


/* ---------- 0.9.47 ---------- */

/* 导游卡：按钮固定右上角 */
.unithmemd-guides__card button.unithm-addplan--sm {
	position: absolute;
	top: 12px;
	right: 12px;
	margin: 0;
	padding: 7px 12px;
	font-size: 11.5px;
	z-index: 2;
}

/* 手机端医院页底部 Add Plan 条 */
.unithm-mobile-addplan {
	display: none;
}

@media (max-width: 849px) {
	.unithm-mobile-addplan {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9000;
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
		background: rgba(255,255,255,.96);
		border-top: 1px solid #ececf1;
		backdrop-filter: blur(6px);
	}

	.unithm-mobile-addplan button.unithm-addplan {
		margin: 0;
	}

	body.has-mobile-addplan {
		padding-bottom: 78px;
	}

	/* 浮层被底栏压住时，略抬高 */
	body.has-mobile-addplan .unithm-wa {
		bottom: 96px !important;
	}
}

/* ---------- 0.9.49 手机底栏：三个按钮一行 ---------- */
@media (max-width: 849px) {
	.unithm-mobile-addplan {
		display: flex !important;
		align-items: center;
		gap: 8px;
	}

	.unithm-mobile-addplan > * {
		flex: 1 1 0;
		min-width: 0;
	}

	.unithm-mobile-addplan .unithm-mobile-addplan__cta {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		height: 44px;
		padding: 0 10px;
		border-radius: 999px;
		border: 1px solid #d9d9e3;
		background: #fff;
		color: #111;
		font-size: 12.5px;
		font-weight: 700;
		text-decoration: none;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.unithm-mobile-addplan .unithm-mobile-addplan__cta--dark,
	.unithm-mobile-addplan .unithm-mobile-addplan__cta[class*="primary"] {
		background: #111;
		border-color: #111;
		color: #fff;
	}

	.unithm-mobile-addplan button.unithm-addplan {
		height: 44px;
		margin: 0;
		padding: 0 10px;
		font-size: 12.5px;
	}
}

/* ---------- 0.9.50 ---------- */

/* 手机底栏的圆形 + 按钮 */
.unithm-mobile-addplan button.unithm-addplan--plus {
	flex: 0 0 44px !important;
	width: 44px !important;
	min-width: 44px !important;
	height: 44px !important;
	padding: 0 !important;
	border-radius: 50% !important;
	font-size: 22px !important;
	line-height: 1 !important;
	font-weight: 600;
}

.unithm-mobile-addplan button.unithm-addplan--plus.is-added {
	background: #e8e8fb !important;
	color: #4b4bc4 !important;
	font-size: 18px !important;
}

/* 页眉头像叠放：更紧、带白圈 */
.unithm-plan-avatars { margin-left: 6px; }
.unithm-plan-av {
	width: 28px;
	height: 28px;
	margin-left: -10px;
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
.unithm-plan-av:first-child { margin-left: 0; }

/* ---------- 0.9.51 ：+ 圆 1:1、页眉头像叠成图4 那样 ---------- */

/* 圆形 + ：强制正方形，任何 flex 拉伸都不许变椭圆 */
.unithm-mobile-addplan button.unithm-addplan--plus {
	flex: 0 0 46px !important;
	width: 46px !important;
	min-width: 46px !important;
	max-width: 46px !important;
	height: 46px !important;
	min-height: 46px !important;
	max-height: 46px !important;
	aspect-ratio: 1 / 1;
	box-sizing: border-box;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 50% !important;
	line-height: 1 !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 24px !important;
}

/* 页眉头像：三个叠在一起（重叠更多、白圈更明显） */
.unithm-plan-avatars {
	display: inline-flex;
	align-items: center;
	margin-left: 8px;
	padding-left: 2px;
}

.unithm-plan-av {
	width: 30px !important;
	height: 30px !important;
	margin-left: -13px !important;
	border: 2px solid #fff !important;
	border-radius: 50% !important;
	box-shadow: 0 2px 7px rgba(0,0,0,.22);
	font-size: 12px !important;
	background: #5b5bd6;
	position: relative;
	z-index: 1;
}

.unithm-plan-av:nth-child(2) { z-index: 2; }
.unithm-plan-av:nth-child(3) { z-index: 3; }
.unithm-plan-av--more { z-index: 4; }
.unithm-plan-av:first-child { margin-left: 0 !important; }

/* ---------- 0.9.52 页眉 Plan 按钮：文字 + 头像 = 一颗整体药丸 ---------- */

.header-button a.unithm-plan-btn,
.mobile-nav a.unithm-plan-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px 14px !important;
	border-radius: 999px !important;
	line-height: 1 !important;
	text-decoration: none !important;
}

.header-button a.unithm-plan-btn .unithm-plan-avatars,
.mobile-nav a.unithm-plan-btn .unithm-plan-avatars {
	display: none;
	align-items: center;
	margin: 0;
	padding: 0;
}

.header-button a.unithm-plan-btn .unithm-plan-avatars[style*="inline-flex"],
.mobile-nav a.unithm-plan-btn .unithm-plan-avatars[style*="inline-flex"] {
	display: inline-flex;
}

.unithm-plan-btn .unithm-plan-av {
	width: 24px !important;
	height: 24px !important;
	margin-left: -10px !important;
	border: 2px solid rgba(255,255,255,.9) !important;
	box-shadow: none;
	font-size: 11px !important;
}

.unithm-plan-btn .unithm-plan-av:first-child { margin-left: 0 !important; }

/* 文字保持主题原样，只让整体别换行 */
.header-button a.unithm-plan-btn { white-space: nowrap; }

@media (max-width: 849px) {
	.header-button a.unithm-plan-btn,
	.mobile-nav a.unithm-plan-btn { padding: 7px 12px !important; gap: 6px; }
	.unithm-plan-btn .unithm-plan-av { width: 22px !important; height: 22px !important; margin-left: -9px !important; }
}

/* ---------- 0.9.68 页眉头像放大 ---------- */
.header-button a.unithm-plan-btn .unithm-plan-av,
.mobile-nav a.unithm-plan-btn .unithm-plan-av {
	width: 32px !important;
	height: 32px !important;
	margin-left: -11px !important;
	border: 2.5px solid rgba(255,255,255,.95) !important;
	font-size: 12.5px !important;
	box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

.header-button a.unithm-plan-btn,
.mobile-nav a.unithm-plan-btn {
	padding: 6px 13px !important;
	gap: 9px;
	min-height: 44px;
}

@media (max-width: 849px) {
	.header-button a.unithm-plan-btn .unithm-plan-av,
	.mobile-nav a.unithm-plan-btn .unithm-plan-av {
		width: 28px !important;
		height: 28px !important;
		margin-left: -9px !important;
		border-width: 2px !important;
	}
	.header-button a.unithm-plan-btn,
	.mobile-nav a.unithm-plan-btn { padding: 5px 11px !important; min-height: 40px; }
}

/* ---------- 0.9.152 统一「加入 Plan」按钮：蓝紫渐变 ---------- */
button.unithm-addplan,
.uc-card-footer button.unithm-addplan,
button.unithm-addplan--sm{
	background: linear-gradient(135deg, #8b7cf6, #4f46e5) !important;
	color: #fff !important;
	border: 0 !important;
	box-shadow: 0 4px 14px rgba(79,70,229,.35) !important;
	font-weight: 700 !important;
	transition: transform .15s ease, box-shadow .15s ease !important;
}
button.unithm-addplan:hover,
.uc-card-footer button.unithm-addplan:hover,
button.unithm-addplan--sm:hover{
	background: linear-gradient(135deg, #7c6cf4, #4338ca) !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(79,70,229,.45) !important;
}
button.unithm-addplan.is-added{
	background: linear-gradient(135deg, #22c1a4, #0f766e) !important;
	color: #fff !important;
	box-shadow: 0 4px 14px rgba(15,118,110,.32) !important;
}
.unithm-plan-av{background: linear-gradient(135deg,#8b7cf6,#4f46e5);}
