/**
 * 前台「插入答疑」展示样式（合集 / 知识库共用）。
 * 存储为 native <details>；默认闭合。开合动效由 qa-block.js（WAAPI）补，
 * 无 JS 时仍可点开，只是没有高度过渡。
 *
 * WHY 不给 .mytb-qa-item 设 display:flex：flex 会破坏 details 原生隐藏，
 * 未 open 时答案仍露出（合集卡片折叠 2026-07-20 同坑）。
 */
.mytb-qa-block {
	margin: 1.5em 0;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	background: #ffffff;
	overflow: hidden;
}

.mytb-qa-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	border-bottom: 1px solid #f2f2f2;
	background: #fafafa;
}

.mytb-qa-head__title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	color: #222222;
}

.mytb-qa-ask {
	flex: 0 0 auto;
}

.mytb-qa-item {
	margin: 0;
	border-bottom: 1px solid #f2f2f2;
}

.mytb-qa-item:last-child {
	border-bottom: 0;
}

.mytb-qa-q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 44px;
	padding: 12px 16px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	color: #222222;
	cursor: pointer;
	list-style: none;
}

.mytb-qa-q::-webkit-details-marker,
.mytb-qa-q::marker {
	display: none;
	content: none;
}

.mytb-qa-q::after {
	content: '';
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	margin-top: -4px;
	border-right: 2px solid #999999;
	border-bottom: 2px solid #999999;
	transform: rotate(45deg);
	transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/*
 * 箭头跟 .is-open（点击当下就转），不跟 [open] 绑死：
 * 收起动画期间 details.open 仍是 true，内容要留到播完才藏。
 */
.mytb-qa-item.is-open > .mytb-qa-q::after,
.mytb-qa-item[open] > .mytb-qa-q::after {
	margin-top: 2px;
	transform: rotate(225deg);
}

.mytb-qa-q:focus-visible {
	outline: none;
	box-shadow: inset 0 0 0 2px rgba(204, 24, 24, 0.35);
}

.mytb-qa-body {
	overflow: hidden;
}

.mytb-qa-a {
	margin: 0;
	padding: 0 16px 14px;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.76;
	color: #222222;
}

@media (min-width: 768px) {
	.mytb-qa-q {
		min-height: 24px;
		padding-top: 10px;
		padding-bottom: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mytb-qa-q::after {
		transition: none;
	}
}
