/* استایل فرم ارسال خبر مردمی — فقط در صفحه‌ی دارای شورت‌کد لود می‌شود. */
.cnf-wrap[hidden],
.cnf-wrap [hidden] { display: none !important; }

.cnf-wrap { max-width: 760px; margin: 1.5em auto; font-size: 1rem; line-height: 1.8; }
.cnf-wrap * { box-sizing: border-box; }
.cnf-wrap, .cnf-form { position: relative; max-width: 100%; min-width: 0; }
.cnf-field { min-width: 0; max-width: 100%; }
.cnf-wrap .wp-editor-wrap,
.cnf-wrap .wp-editor-container,
.cnf-wrap .mce-tinymce,
.cnf-wrap .mce-container-body,
.cnf-wrap iframe { max-width: 100% !important; }
.cnf-wrap .mce-toolbar-grp { overflow: hidden; }

/* وقتی پنجره‌ی تأیید باز است، صفحه‌ی پشت آن اسکرول نمی‌خورد */
html.cnf-lock, html.cnf-lock body { overflow: hidden; }

.cnf-form .cnf-row { display: flex; gap: 1em; flex-wrap: wrap; }
.cnf-form .cnf-row-2 > .cnf-field { flex: 1 1 260px; min-width: 0; }
.cnf-field { margin-bottom: 1.2em; }
.cnf-field label { display: block; font-weight: 600; margin-bottom: .35em; }
.cnf-req { color: #c0392b; }

.cnf-field input[type="text"],
.cnf-field input[type="tel"],
.cnf-field input[type="file"] {
	width: 100%;
	padding: .65em .8em;
	border: 1px solid #b8bec6;
	border-radius: 6px;
	background: #fff;
	color: #1d2327;
	font: inherit;
}
.cnf-field input:focus { outline: 2px solid #2271b1; outline-offset: 1px; border-color: #2271b1; }
.cnf-field.cnf-invalid input,
.cnf-field.cnf-invalid .wp-editor-wrap { border-color: #c0392b; outline: 1px solid #c0392b; }

.cnf-hint { margin: .4em 0 0; font-size: .85em; color: #50575e; }

.cnf-captcha-box { display: flex; align-items: center; gap: .8em; flex-wrap: wrap; margin-bottom: .5em; }
.cnf-captcha-box img { border: 1px solid #b8bec6; border-radius: 6px; background: #f5f7fa; max-width: 100%; height: auto; }
.cnf-captcha-q { font-size: 1.3em; font-weight: 700; direction: ltr; }
.cnf-captcha input { max-width: 220px; }

/* تله‌ی ربات: با clip مخفی می‌شود (نه left:-10000px که در صفحه‌های راست‌به‌چپ نوار اسکرول افقی می‌سازد، و نه display:none) */
.cnf-hp {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
}

.cnf-btn {
	display: inline-block;
	padding: .7em 1.6em;
	border: 0;
	border-radius: 6px;
	background: #2271b1;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.cnf-btn:hover { background: #135e96; }
.cnf-btn[disabled] { opacity: .6; cursor: not-allowed; }
.cnf-btn-secondary { background: #f0f0f1; color: #1d2327; border: 1px solid #b8bec6; padding: .4em 1em; }
.cnf-btn-secondary:hover { background: #e2e4e7; }

.cnf-msg { margin: .6em 0 1em; padding: .7em .9em; border-radius: 6px; background: #fcf0f1; border: 1px solid #d63638; color: #8a1f1f; }
.cnf-msg a { color: inherit; font-weight: 700; text-decoration: underline; }
.cnf-notice { margin: 1em 0; padding: .7em .9em; border-radius: 6px; background: #fcf9e8; border: 1px solid #dba617; }
.cnf-success { padding: 1.2em; border-radius: 6px; background: #edfaef; border: 1px solid #00a32a; color: #0a4b1c; font-weight: 600; }

/* پنجره‌ی «آیا ویرایشی داری؟» */
.cnf-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; z-index: 100000; padding: 1em; }
.cnf-modal-box { background: #fff; color: #1d2327; border-radius: 10px; padding: 1.4em; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.cnf-modal-title { font-size: 1.15em; font-weight: 700; margin: 0 0 .4em; }
.cnf-modal-text { margin: 0 0 1.1em; color: #50575e; font-size: .92em; }
.cnf-modal-actions { display: flex; gap: .6em; justify-content: center; flex-wrap: wrap; }

@media (prefers-color-scheme: dark) {
	.cnf-modal-box { background: #1e1f22; color: #eee; }
	.cnf-modal-text { color: #b5b8bd; }
}
