/**
 * A-SUN Publisher — frontend styles.
 *
 * Deliberately framework-free. Relies on native WordPress form styling
 * where available and adds only the minimum needed for layout, spacing,
 * and right-to-left (Persian) presentation.
 *
 * Brand color is exposed as a CSS custom property so a theme can override
 * it (e.g. by setting --asun-primary-color on body or .asun-publisher-form-wrap)
 * without editing this file.
 */

.asun-publisher-form-wrap {
	--asun-primary-color: #1a7f5a;
	--asun-primary-color-hover: #146648;

	max-width: 720px;
	margin: 0 auto;
	box-sizing: border-box;
	direction: rtl;
	text-align: right;
}

.asun-publisher-form-wrap *,
.asun-publisher-form-wrap *::before,
.asun-publisher-form-wrap *::after {
	box-sizing: inherit;
}

.asun-publisher-notice {
	padding: 12px 16px;
	margin-bottom: 20px;
	border-right: 4px solid #666;
	background: #f6f7f7;
}

.asun-publisher-notice p {
	margin: 0;
}

.asun-publisher-notice-success {
	border-right-color: #00a32a;
	background: #edfaef;
}

.asun-publisher-notice-error {
	border-right-color: #d63638;
	background: #fcf0f1;
}

.asun-publisher-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.asun-publisher-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
}

.asun-publisher-field label {
	font-weight: 600;
}

.asun-publisher-required {
	color: #d63638;
}

.asun-publisher-field input[type="text"],
.asun-publisher-field input[type="url"],
.asun-publisher-field input[type="email"],
.asun-publisher-field input[type="file"] {
	width: 100%;
	max-width: 100%;
	padding: 8px 10px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 1em;
	text-align: right;
}

.asun-publisher-field input[type="url"],
.asun-publisher-field input[type="email"] {
	text-align: left;
}

.asun-publisher-field .wp-editor-wrap {
	max-width: 100%;
	direction: rtl;
	text-align: right;
}

.asun-publisher-field-error {
	color: #d63638;
	font-size: 0.9em;
	margin: 0;
}

/* Honeypot field: hidden from sighted and mouse users, but still present
 * in the DOM (not display:none) so that unsophisticated bots that skip
 * hidden fields still fill it in and get caught. Screen reader users are
 * additionally protected by aria-hidden on the wrapping element. */
.asun-publisher-hp-field {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	margin: 0;
}

.asun-publisher-checkbox-field label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 400;
	cursor: pointer;
}

.asun-publisher-checkbox-field input[type="checkbox"] {
	margin-top: 3px;
	flex-shrink: 0;
}

.asun-publisher-button,
.asun-publisher-submit button {
	display: inline-block;
	align-self: flex-start;
	padding: 10px 24px;
	background: var(--asun-primary-color);
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 1em;
	text-decoration: none;
	cursor: pointer;
	text-align: center;
}

.asun-publisher-button:hover,
.asun-publisher-button:focus,
.asun-publisher-submit button:hover,
.asun-publisher-submit button:focus {
	background: var(--asun-primary-color-hover);
	color: #fff;
}

.asun-publisher-login-required {
	max-width: 720px;
	margin: 0 auto;
	padding: 16px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	text-align: center;
	direction: rtl;
}

.asun-publisher-login-required .asun-publisher-button {
	align-self: center;
}

@media screen and (max-width: 600px) {
	.asun-publisher-submit button,
	.asun-publisher-login-required .asun-publisher-button {
		width: 100%;
		text-align: center;
	}
}
