/**
 * 问吧 · 向站长提问（图标按钮 / 弹窗 / 匿名开关）
 * 同文件覆盖：信息流问答卡、帖子页提问灰块+内嵌回复、回复弹窗通知。
 * 依赖：dialog-pop.css（mytheme-pop 动效基类）。
 */

/* ============================================================
 * 1) 广场胶囊行的「问站长」图标按钮（白底圆形 + 红色人形 SVG，行尾）
 * ============================================================ */
#wpforo #wpforo-wrap .mytheme-wpf-capsules .mytheme-wpf-ask-btn {
	margin-left: auto !important;
	flex: 0 0 auto !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 34px !important;
	height: 34px !important;
	padding: 0 !important;
	border-radius: 9999px !important;
	background: #ffffff !important;
	border: 1px solid #e5e5e5 !important;
	cursor: pointer !important;
}
#wpforo #wpforo-wrap .mytheme-wpf-capsules .mytheme-wpf-ask-btn svg {
	width: 17px;
	height: 17px;
	display: block;
}
#wpforo #wpforo-wrap .mytheme-wpf-capsules .mytheme-wpf-ask-btn:hover {
	background: #fff8f8 !important;
	border-color: #d81e06 !important;
}
#wpforo #wpforo-wrap .mytheme-wpf-capsules .mytheme-wpf-ask-btn:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

/* ============================================================
 * 2) 提问弹窗
 * ============================================================ */
.mytheme-qa-modal {
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}
.mytheme-qa-modal[hidden] {
	display: none !important;
}
.mytheme-qa-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}
.mytheme-qa-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 34rem;
	max-height: min(88vh, 42rem);
	overflow: auto;
	overscroll-behavior: contain;
	padding: 1.5rem 1.25rem 1.25rem;
	border-radius: 0.75rem;
	background: #fff;
	box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.16);
	box-sizing: border-box;
}
.mytheme-qa-modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 2rem;
	height: 2rem;
	border: none;
	border-radius: 9999px;
	background: transparent;
	color: #999;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}
.mytheme-qa-modal__close:hover {
	color: #222;
	background: #f5f5f5;
}
.mytheme-qa-modal__title {
	margin: 0 2.25rem 0.5rem;
	font-size: 1.375rem;
	font-weight: 600;
	color: #222;
	line-height: 1.35;
}
.mytheme-qa-modal__tip {
	margin: 0 0 1rem;
	font-size: 0.8125rem;
	color: #999;
	line-height: 1.6;
}

.mytheme-qa-form__main {
	border: 1px solid #e5e7eb;
	border-radius: 0.625rem;
	overflow: hidden;
}
.mytheme-qa-form__textarea {
	display: block;
	width: 100%;
	min-height: 9rem;
	padding: 0.75rem 0.875rem;
	border: none;
	outline: none;
	resize: vertical;
	font-size: 0.9375rem;
	line-height: 1.7;
	color: #222;
	box-sizing: border-box;
	font-family: inherit;
	background: transparent;
}
.mytheme-qa-form__textarea::placeholder {
	color: #bbb;
}

/* 图片：反馈问题同款（小缩略图 + 虚线「+」块），无张数提示文字 */
.mytheme-qa-images {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0.875rem 0 0;
}
.mytheme-qa-thumb {
	position: relative;
	width: 78px;
	height: 78px;
	border-radius: 10px;
	overflow: visible;
}
.mytheme-qa-thumb img,
.mytheme-qa-thumb__ph {
	width: 78px;
	height: 78px;
	border-radius: 10px;
	object-fit: cover;
	display: block;
	border: 1px solid #e5e7eb;
	background: #fafafa;
}
.mytheme-qa-thumb__ph {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #bbb;
	font-size: 20px;
}
.mytheme-qa-thumb.is-failed .mytheme-qa-thumb__ph {
	color: #e03030;
}
.mytheme-qa-thumb__del {
	position: absolute;
	top: -7px;
	right: -7px;
	width: 22px;
	height: 22px;
	border-radius: 9999px;
	border: none;
	background: #1a1a1a;
	color: #fff;
	font-size: 14px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}
.mytheme-qa-thumb__del:hover {
	background: #e03030;
}
.mytheme-qa-images__add {
	position: relative;
	width: 78px;
	height: 78px;
	border-radius: 10px;
	border: 1.5px dashed #d5d5d5;
	background: #fafafa;
	color: #b3b3b3;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}
.mytheme-qa-images__add svg {
	width: 22px;
	height: 22px;
	display: block;
}
.mytheme-qa-images__add:hover,
.mytheme-qa-images__add.is-drag {
	border-color: #e03030;
	color: #e03030;
	background: #fff8f8;
}
.mytheme-qa-images__add-plus {
	position: absolute;
	top: -7px;
	right: -7px;
	width: 22px;
	height: 22px;
	border-radius: 9999px;
	background: #1a1a1a;
	color: #fff;
	font-size: 15px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

/* 匿名开关 */
.mytheme-qa-anon {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0.875rem 0 0;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
}
.mytheme-qa-anon input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}
.mytheme-qa-anon__switch {
	position: relative;
	flex: 0 0 auto;
	width: 36px;
	height: 20px;
	border-radius: 9999px;
	background: #ddd;
	transition: background 0.18s ease;
}
.mytheme-qa-anon__switch::after,
.mytheme-qa-anon__knob {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 9999px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.18s ease;
}
.mytheme-qa-anon input:checked + .mytheme-qa-anon__switch {
	background: #e03030;
}
.mytheme-qa-anon input:checked + .mytheme-qa-anon__switch .mytheme-qa-anon__knob,
.mytheme-qa-anon input:checked + .mytheme-qa-anon__switch::after {
	transform: translateX(16px);
}
.mytheme-qa-anon input:focus-visible + .mytheme-qa-anon__switch {
	outline: 2px solid #111;
	outline-offset: 2px;
}
.mytheme-qa-anon__text {
	font-size: 0.875rem;
	font-weight: 500;
	color: #222;
}
.mytheme-qa-anon__tip {
	font-size: 0.75rem;
	color: #aaa;
}

.mytheme-qa-form__error {
	margin: 0.75rem 0 0;
	font-size: 0.8125rem;
	color: #e03030;
	line-height: 1.6;
}
.mytheme-qa-form__footer {
	display: flex;
	justify-content: flex-end;
	gap: 0.625rem;
	margin-top: 1rem;
}
.mytheme-qa-btn {
	min-height: 2.375rem;
	padding: 0 1.25rem;
	border-radius: 9999px;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	border: none;
	line-height: 1;
}
.mytheme-qa-btn--ghost {
	background: #f2f2f2;
	color: #555;
}
.mytheme-qa-btn--ghost:hover {
	background: #e8e8e8;
}
.mytheme-qa-btn--primary {
	background: #e03030;
	color: #fff;
}
.mytheme-qa-btn--primary:hover {
	background: #c52a2a;
}
.mytheme-qa-btn--primary:disabled {
	background: #f2b8b8;
	color: #fff;
	cursor: not-allowed;
}

/* ============================================================
 * 3) 信息流问答卡（灰块提问 + 回复摘要，无徽标，正常排版）
 * ============================================================ */
#wpforo #wpforo-wrap .mytheme-wpf-qa-card {
	margin: 2px 0 4px;
}
#wpforo #wpforo-wrap .mytheme-wpf-qa-card__q-text {
	display: block;
	background: var(--myt-wpf-color-surface-muted, #f5f5f5);
	border-left: 3px solid #c9c9c9;
	border-radius: 0 10px 10px 0;
	padding: 10px 12px;
	color: var(--myt-wpf-color-ink-secondary, #666);
	font-size: 14px;
	line-height: 1.7;
	text-decoration: none;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
}
#wpforo #wpforo-wrap .mytheme-wpf-qa-card__q-text:hover {
	color: var(--myt-wpf-color-ink, #222);
}
#wpforo #wpforo-wrap .mytheme-wpf-qa-card__a-text {
	display: block;
	margin-top: 8px;
	padding: 0 2px;
	color: var(--myt-wpf-color-ink, #222);
	font-size: 14px;
	line-height: 1.7;
	text-decoration: none;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}
#wpforo #wpforo-wrap .mytheme-wpf-qa-card__a-text:hover {
	opacity: 0.75;
}

/* ============================================================
 * 4) 帖子页：提问灰块 + 回复直接接在问题下面（同一楼，无二楼）
 * ============================================================ */
#wpforo #wpforo-wrap .mytheme-wpf-qa-q {
	background: var(--myt-wpf-color-surface-muted, #f5f5f5);
	border-left: 3px solid #c9c9c9;
	border-radius: 0 10px 10px 0;
	padding: 12px 16px;
	margin: 0 0 14px;
	font-size: 15px;
	color: var(--myt-wpf-color-ink-secondary, #666);
}
#wpforo #wpforo-wrap .mytheme-wpf-qa-a {
	font-size: 15px;
	color: var(--myt-wpf-color-ink, #222);
	line-height: 1.8;
}
#wpforo #wpforo-wrap .mytheme-wpf-qa-a > *:first-child {
	margin-top: 0;
}
#wpforo #wpforo-wrap .mytheme-wpf-qa-a > *:last-child {
	margin-bottom: 0;
}

/* ============================================================
 * 5) 回复弹窗通知（登录用户进站弹一次）
 * ============================================================ */
.mytheme-qa-reply-pop {
	position: fixed;
	inset: 0;
	z-index: 100060;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.5);
	box-sizing: border-box;
	animation: mytheme-qa-pop-in 0.25s ease;
}
@keyframes mytheme-qa-pop-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
.mytheme-qa-reply-pop__panel {
	position: relative;
	width: 100%;
	max-width: 22rem;
	background: #fff;
	border-radius: 16px;
	padding: 26px 24px 22px;
	box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.25);
	box-sizing: border-box;
	text-align: center;
	animation: mytheme-qa-pop-up 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes mytheme-qa-pop-up {
	from {
		transform: translateY(28px) scale(0.96);
		opacity: 0;
	}
	to {
		transform: translateY(0) scale(1);
		opacity: 1;
	}
}
.mytheme-qa-reply-pop__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 9999px;
	background: #e03030;
	color: #fff;
	font-size: 20px;
	font-weight: 600;
	margin-bottom: 10px;
}
.mytheme-qa-reply-pop__title {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 600;
	color: #222;
}
.mytheme-qa-reply-pop__body {
	margin: 0 0 18px;
	font-size: 13px;
	color: #999;
	line-height: 1.7;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}
.mytheme-qa-reply-pop__actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.mytheme-qa-reply-pop__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	border-radius: 9999px;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	border: none;
	cursor: pointer;
}
.mytheme-qa-reply-pop__btn--primary {
	background: #e03030;
	color: #fff;
}
.mytheme-qa-reply-pop__btn--primary:hover {
	background: #c52a2a;
	color: #fff;
}
.mytheme-qa-reply-pop__btn--ghost {
	background: #f2f2f2;
	color: #555;
}
.mytheme-qa-reply-pop__btn--ghost:hover {
	background: #e8e8e8;
}
.mytheme-qa-reply-pop__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	border: none;
	border-radius: 9999px;
	background: transparent;
	color: #999;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}
.mytheme-qa-reply-pop__close:hover {
	color: #222;
	background: #f5f5f5;
}
