/**
 * 社区投诉弹层（独立文件，避免 Tailwind 晚加载打穿）
 */

:root {
	--mytheme-wpf-report-ink: #222222;
	--mytheme-wpf-report-ink-secondary: #666666;
	--mytheme-wpf-report-ink-tertiary: #999999;
	--mytheme-wpf-report-primary: #e03030;
	--mytheme-wpf-report-primary-600: #c52a2a;
	--mytheme-wpf-report-line: #e5e7eb;
	--mytheme-wpf-report-radius: 0.5rem;
	--mytheme-wpf-report-fs-footnote: 0.8125rem; /* text-footnote 13 */
	--mytheme-wpf-report-fs-caption: 0.875rem; /* text-caption 14 */
	--mytheme-wpf-report-fs-subhead: 0.9375rem; /* text-subhead 15 */
	--mytheme-wpf-report-fs-body: 1rem; /* text-body 16 */
}

.mytheme-wpf-report-modal {
	position: fixed;
	inset: 0;
	z-index: 100050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.mytheme-wpf-report-modal[hidden] {
	display: none !important;
}

.mytheme-wpf-report-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

.mytheme-wpf-report-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 28rem;
	max-height: min(88vh, 40rem);
	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-wpf-report-modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 2rem;
	height: 2rem;
	border: none;
	border-radius: 9999px;
	background: transparent;
	color: var(--mytheme-wpf-report-ink-tertiary);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.mytheme-wpf-report-modal__close:hover {
	color: var(--mytheme-wpf-report-ink);
	background: #f5f5f5;
}

.mytheme-wpf-report-modal__close:focus-visible {
	outline: 2px solid #111111;
	outline-offset: 2px;
}

.mytheme-wpf-report-modal__title {
	margin: 0 2.25rem 1rem 0;
	font-size: 1.5rem; /* text-page 24 */
	font-weight: 600;
	color: var(--mytheme-wpf-report-ink);
	line-height: 1.35;
}

.mytheme-wpf-report-field {
	margin-bottom: 0.875rem;
}

.mytheme-wpf-report-label {
	display: block;
	margin: 0 0 0.5rem;
	font-size: var(--mytheme-wpf-report-fs-caption);
	font-weight: 500;
	color: var(--mytheme-wpf-report-ink);
}

.mytheme-wpf-report-reasons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.mytheme-wpf-report-reasons__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2rem;
	padding: 0 0.75rem;
	border: 1px solid var(--mytheme-wpf-report-line);
	border-radius: 9999px;
	background: #fff;
	color: var(--mytheme-wpf-report-ink-secondary);
	font-size: var(--mytheme-wpf-report-fs-caption);
	font-weight: 500;
	cursor: pointer;
}

.mytheme-wpf-report-reasons__btn.is-on {
	border-color: #111111;
	color: var(--mytheme-wpf-report-ink);
	background: #f5f5f5;
}

.mytheme-wpf-report-reasons__btn:focus-visible {
	outline: 2px solid #111111;
	outline-offset: 2px;
}

.mytheme-wpf-report-textarea {
	display: block;
	width: 100%;
	padding: 0.625rem 0.75rem;
	border: 1px solid var(--mytheme-wpf-report-line);
	border-radius: var(--mytheme-wpf-report-radius);
	background: #fff;
	color: var(--mytheme-wpf-report-ink);
	font-size: var(--mytheme-wpf-report-fs-body);
	line-height: 1.5;
	box-sizing: border-box;
	min-height: 6rem;
	resize: vertical;
}

.mytheme-wpf-report-textarea:focus {
	outline: none;
	border-color: #111111;
}

.mytheme-wpf-report-error {
	margin: 0 0 0.75rem;
	font-size: var(--mytheme-wpf-report-fs-footnote);
	color: var(--mytheme-wpf-report-primary);
	line-height: 1.4;
}

.mytheme-wpf-report-error[hidden] {
	display: none !important;
}

.mytheme-wpf-report-footer {
	display: flex;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin-top: 0.25rem;
}

.mytheme-wpf-report-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 2.5rem;
	min-width: 4.5rem;
	padding: 0 1rem;
	border: 1px solid var(--mytheme-wpf-report-line);
	border-radius: 9999px;
	background: #fff;
	color: var(--mytheme-wpf-report-ink);
	font-size: var(--mytheme-wpf-report-fs-subhead);
	font-weight: 500;
	cursor: pointer;
}

.mytheme-wpf-report-btn:focus-visible {
	outline: 2px solid #111111;
	outline-offset: 2px;
}

.mytheme-wpf-report-btn--ghost {
	color: var(--mytheme-wpf-report-ink-secondary);
}

.mytheme-wpf-report-btn--primary {
	border-color: var(--mytheme-wpf-report-primary);
	background: var(--mytheme-wpf-report-primary);
	color: #fff;
}

.mytheme-wpf-report-btn--primary:hover:not(:disabled) {
	background: var(--mytheme-wpf-report-primary-600);
	border-color: var(--mytheme-wpf-report-primary-600);
}

.mytheme-wpf-report-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

body.mytheme-wpf-report-open {
	overflow: hidden;
}

@media (max-width: 640px) {
	.mytheme-wpf-report-modal {
		align-items: flex-end;
		padding: 0;
	}

	.mytheme-wpf-report-modal__dialog {
		max-width: none;
		max-height: 90vh;
		border-radius: 0.75rem 0.75rem 0 0;
		padding: 1.25rem 1rem 1rem;
	}

	.mytheme-wpf-report-footer .mytheme-wpf-report-btn {
		flex: 1;
		min-width: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mytheme-wpf-report-btn,
	.mytheme-wpf-report-reasons__btn {
		transition: none;
	}
}
