/* Al-Huda School Forms — front-end styles
   Colors, radius and label style are overridden per-site via CSS variables
   injected from Settings > Al-Huda Forms > Customization. */
:root {
	--ahsf-primary: #a5182f;
	--ahsf-text: #1c1c1c;
	--ahsf-radius: 2px;
	--ahsf-label-transform: uppercase;
	--ahsf-label-font: Georgia, 'Times New Roman', serif;
}

.ahsf-form-wrap {
	max-width: 780px;
	margin: 0 auto;
	color: var(--ahsf-text);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.ahsf-form-title {
	font-family: var(--ahsf-label-font);
	margin-bottom: 1.25em;
}

.ahsf-section {
	border: none;
	margin: 0 0 2em;
	padding: 0;
}

.ahsf-section-title {
	font-family: var(--ahsf-label-font);
	text-transform: var(--ahsf-label-transform);
	letter-spacing: 0.03em;
	font-size: 1.15rem;
	font-weight: 700;
	padding: 0 0 0.5em;
	margin-bottom: 1em;
	border-bottom: 2px solid var(--ahsf-primary);
	width: 100%;
}

.ahsf-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5em 1.5em;
}

.ahsf-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ahsf-field-textarea,
.ahsf-field-checkbox,
.ahsf-field-radio {
	grid-column: 1 / -1;
}

.ahsf-label {
	font-family: var(--ahsf-label-font);
	text-transform: var(--ahsf-label-transform);
	letter-spacing: 0.03em;
	font-weight: 700;
	font-size: 0.95rem;
	margin-bottom: 0.5em;
}

.ahsf-required {
	color: var(--ahsf-primary);
}

.ahsf-field input[type="text"],
.ahsf-field input[type="email"],
.ahsf-field input[type="tel"],
.ahsf-field input[type="date"],
.ahsf-field input[type="number"],
.ahsf-field select,
.ahsf-field textarea,
.ahsf-field input[type="file"] {
	font-family: inherit;
	font-size: 1rem;
	color: #333;
	padding: 0.85em 1em;
	border: 1px solid #d8d8d8;
	border-radius: var(--ahsf-radius);
	background: #fff;
	width: 100%;
	box-sizing: border-box;
	transition: border-color 0.15s ease;
}

.ahsf-field input[type="file"] {
	padding: 0.6em 0.8em;
}

.ahsf-field textarea {
	resize: vertical;
	min-height: 130px;
}

.ahsf-field input::placeholder,
.ahsf-field textarea::placeholder {
	color: #9a9a9a;
}

.ahsf-field input:focus,
.ahsf-field select:focus,
.ahsf-field textarea:focus {
	outline: none;
	border-color: var(--ahsf-primary);
	box-shadow: 0 0 0 3px rgba(165, 24, 47, 0.12);
}

.ahsf-field.ahsf-field-invalid input,
.ahsf-field.ahsf-field-invalid select,
.ahsf-field.ahsf-field-invalid textarea {
	border-color: #d63638;
}

.ahsf-field-notice {
	grid-column: 1 / -1;
}

.ahsf-notice-text {
	font-size: 0.92rem;
	line-height: 1.6;
	color: #555;
	background: #faf7f2;
	border-left: 3px solid var(--ahsf-primary);
	padding: 0.9em 1.1em;
	margin: 0;
}

.ahsf-radio-group {
	display: flex;
	gap: 1.5em;
	flex-wrap: wrap;
}

.ahsf-radio-option,
.ahsf-checkbox-option {
	display: flex;
	align-items: flex-start;
	gap: 0.5em;
	font-weight: 400;
	text-transform: none;
	font-family: inherit;
	cursor: pointer;
}

.ahsf-checkbox-option input {
	margin-top: 0.25em;
}

.ahsf-field-conditional {
	display: none;
}

.ahsf-field-conditional.ahsf-visible {
	display: flex;
}

.ahsf-error-msg {
	display: block;
	color: #d63638;
	font-size: 0.85rem;
	margin-top: 0.4em;
	min-height: 0;
}

.ahsf-submit-btn {
	grid-column: 1 / -1;
	position: relative;
	margin-top: 1.5em;
	width: 100%;
	background: var(--ahsf-primary);
	color: #fff;
	border: none;
	border-radius: var(--ahsf-radius);
	padding: 1em 2em;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.ahsf-submit-btn:hover {
	opacity: 0.92;
}

.ahsf-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.ahsf-btn-spinner {
	display: none;
	width: 16px;
	height: 16px;
	margin-left: 0.6em;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-top-color: #fff;
	border-radius: 50%;
	vertical-align: middle;
	animation: ahsf-spin 0.7s linear infinite;
}

.ahsf-submit-btn.ahsf-loading .ahsf-btn-spinner {
	display: inline-block;
}

@keyframes ahsf-spin {
	to { transform: rotate(360deg); }
}

.ahsf-response {
	padding: 1em 1.25em;
	border-radius: var(--ahsf-radius);
	margin-bottom: 1.5em;
	font-size: 0.95rem;
}

.ahsf-response-success {
	background: #eaf7ee;
	border: 1px solid #b7e2c4;
	color: #205c33;
}

.ahsf-response-error {
	background: #fdeaea;
	border: 1px solid #f3b9b9;
	color: #7a1f1f;
}

.ahsf-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 640px) {
	.ahsf-grid {
		grid-template-columns: 1fr;
	}
}
