/**
 * 步骤标题：时间线 + 序号（前台与编辑器共用）
 * 新结构：.gq-step-series > .gq-step-series__list > 步骤单元
 * 兼容：无 __list 包裹时步骤单元 / 群组直接挂在 .gq-step-series 下
 * 竖线：随 currentColor。序号圆：不透明白底（古腾堡默认），避免竖线从圆心透出
 */

.gq-step-series {
	counter-reset: gq-step;
	position: relative;
	padding-left: 2.75rem;
	margin: 1.25rem 0;
	box-sizing: border-box;
	color: inherit;
}

.gq-step-series__list {
	min-height: 0;
}

.gq-step-series__add-foot {
	display: flex;
	justify-content: flex-end;
	margin-top: 0.35rem;
	padding-right: 0.15rem;
}

.gq-step-series__add-btn {
	font-size: 13px;
}

.block-editor-block-list__block[data-type="guaqi/step-heading"] .gq-step-series__list .block-editor-block-list__insertion-point {
	opacity: 0.12;
	min-height: 4px !important;
}

.gq-step-series::before {
	content: "";
	position: absolute;
	left: 0.85rem;
	top: 0.45rem;
	bottom: 0.45rem;
	width: 1px;
	background: color-mix(in srgb, currentColor 22%, transparent);
	z-index: 0;
}

/* 步骤单元：前台（含/不含 __list）+ 编辑器列表（同一元素只计数一次） */
.gq-step-series > .gq-step-series__list > .wp-block-guaqi-step-item,
.gq-step-series > .wp-block-guaqi-step-item,
.gq-step-series .block-editor-block-list__layout > .wp-block-guaqi-step-item {
	counter-increment: gq-step;
	position: relative;
	padding-bottom: 1.5rem;
	z-index: 1;
}

/* 群组（旧） */
.gq-step-series > .gq-step-series__list > .wp-block-group,
.gq-step-series > .wp-block-group,
.gq-step-series .block-editor-block-list__layout > .wp-block-group {
	counter-increment: gq-step;
	position: relative;
	padding-bottom: 1.5rem;
	z-index: 1;
}

.gq-step-series > .gq-step-series__list > .wp-block-guaqi-step-item:last-child,
.gq-step-series > .wp-block-guaqi-step-item:last-child,
.gq-step-series .block-editor-block-list__layout > .wp-block-guaqi-step-item:last-child,
.gq-step-series > .gq-step-series__list > .wp-block-group:last-child,
.gq-step-series > .wp-block-group:last-child,
.gq-step-series .block-editor-block-list__layout > .wp-block-group:last-child {
	padding-bottom: 0;
}

.gq-step-series > .gq-step-series__list > .wp-block-guaqi-step-item::before,
.gq-step-series > .wp-block-guaqi-step-item::before,
.gq-step-series .block-editor-block-list__layout > .wp-block-guaqi-step-item::before,
.gq-step-series > .gq-step-series__list > .wp-block-group::before,
.gq-step-series > .wp-block-group::before,
.gq-step-series .block-editor-block-list__layout > .wp-block-group::before {
	content: counter(gq-step);
	position: absolute;
	left: -2.75rem;
	top: 0.18em;
	width: 1.65rem;
	height: 1.65rem;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #e8e8e8;
	font-size: 0.8rem;
	font-weight: 600;
	color: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	z-index: 2;
	box-sizing: border-box;
}

.gq-step-series > .gq-step-series__list > .wp-block-guaqi-step-item > h2.wp-block-heading:first-child,
.gq-step-series > .gq-step-series__list > .wp-block-guaqi-step-item > .wp-block-heading:first-child,
.gq-step-series > .wp-block-guaqi-step-item > h2.wp-block-heading:first-child,
.gq-step-series > .wp-block-guaqi-step-item > .wp-block-heading:first-child,
.gq-step-series .block-editor-block-list__layout > .wp-block-guaqi-step-item > h2.wp-block-heading:first-child,
.gq-step-series .block-editor-block-list__layout > .wp-block-guaqi-step-item > .wp-block-heading:first-child,
.gq-step-series > .gq-step-series__list > .wp-block-group > h2.wp-block-heading:first-child,
.gq-step-series > .gq-step-series__list > .wp-block-group > .wp-block-heading:first-child,
.gq-step-series > .wp-block-group > h2.wp-block-heading:first-child,
.gq-step-series > .wp-block-group > .wp-block-heading:first-child,
.gq-step-series .block-editor-block-list__layout > .wp-block-group > h2.wp-block-heading:first-child,
.gq-step-series .block-editor-block-list__layout > .wp-block-group > .wp-block-heading:first-child {
	margin-top: 0;
	margin-bottom: 0.65rem;
	font-weight: 700;
	color: inherit;
}
