/**
 * 瓜奇 · 折叠面板组 + 单条 details/summary
 * 组内连成一体：仅水平分割线、无背景、无圆角（FAQ 式）；随 currentColor 适配明暗
 */

.gq-collapse-series {
	margin: 1rem 0;
	box-sizing: border-box;
	color: inherit;
	background: transparent;
	border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

.gq-collapse-series__list {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-height: 0;
	border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

.gq-collapse-series__add-foot {
	display: flex;
	justify-content: flex-end;
	margin-top: 0.5rem;
	padding-right: 0.15rem;
}

.gq-collapse-series__add-btn {
	font-size: 13px;
}

.block-editor-block-list__block[data-type="guaqi/collapse-series"] .gq-collapse-series__list .block-editor-block-list__insertion-point {
	opacity: 0.12;
	min-height: 4px !important;
}

/* 独立一条（旧块）：仅上下线、无圆角盒子 */
.gq-collapse {
	display: block;
	margin: 1rem 0;
	box-sizing: border-box;
	color: inherit;
	background: transparent;
	border-width: 1px 0;
	border-style: solid;
	border-color: color-mix(in srgb, currentColor 14%, transparent);
	border-radius: 0;
	overflow: visible;
}

/* 组内每条：仅底部分割线，与上一条连成一体 */
.gq-collapse-series .gq-collapse {
	margin: 0;
	border-width: 0;
	border-bottom-width: 1px;
	border-bottom-style: solid;
	border-bottom-color: color-mix(in srgb, currentColor 12%, transparent);
	border-radius: 0;
	background: transparent;
	overflow: visible;
}

.gq-collapse-series .gq-collapse:last-child {
	border-bottom: none;
}

.gq-collapse__summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	box-sizing: border-box;
	padding: 1rem 0.25rem 1rem 0;
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.45;
	color: inherit;
	user-select: none;
	outline: none;
	text-align: left;
}

.gq-collapse__summary::-webkit-details-marker {
	display: none;
}

.gq-collapse__summary::marker {
	content: '';
}

/* 右侧 chevron */
.gq-collapse__summary::after {
	content: '';
	display: block;
	flex-shrink: 0;
	width: 0.45em;
	height: 0.45em;
	margin-top: 0.1em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	opacity: 0.45;
	transform: rotate(45deg);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.gq-collapse[open] > .gq-collapse__summary::after {
	transform: rotate(-135deg);
	margin-top: 0.35em;
	opacity: 0.55;
}

.gq-collapse__summary:focus-visible {
	outline: 2px solid color-mix(in srgb, currentColor 38%, transparent);
	outline-offset: 2px;
}

.gq-collapse__body {
	padding: 0 0 0.75rem 0;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: color-mix(in srgb, currentColor 82%, transparent);
	border: 0;
	background: transparent;
}

.gq-collapse__body > *:first-child {
	margin-top: 0;
}

.gq-collapse__body > *:last-child {
	margin-bottom: 0;
}

/* 编辑器内与前台一致：不铺底 */
.gq-collapse--editor .gq-collapse__summary {
	background: transparent;
}
