/**
 * public/css/forms.css
 * Styles for the public-facing contract and screening wizard forms.
 */

.ha-form-wrapper {
	max-width: 640px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ha-form-progress {
	height: 6px;
	background: #e5e5e5;
	border-radius: 3px;
	margin-bottom: 28px;
	overflow: hidden;
}

.ha-form-loading {
	text-align: center;
	color: #666;
	padding: 40px 0;
	font-size: 15px;
}

.ha-field {
	margin-bottom: 4px;
}

.ha-checkbox-inline {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 400;
	margin: 14px 0;
}

.ha-checkbox-inline input {
	margin-top: 3px;
	width: auto;
}

.ha-template-picker {
	background: #f0f6fc;
	border: 1px solid #c3dbec;
	border-radius: 4px;
	padding: 12px;
	margin-top: 12px;
}

.ha-repeater {
	margin: 8px 0 16px;
}

.ha-form-progress-bar {
	height: 100%;
	background: #2271b1;
	width: 0%;
	transition: width 0.25s ease;
}

.ha-step h2 {
	font-size: 20px;
	margin-bottom: 16px;
}

.ha-step label {
	display: block;
	font-weight: 600;
	margin: 14px 0 6px;
	font-size: 14px;
}

.ha-step input[type="text"],
.ha-step input[type="email"],
.ha-step input[type="tel"],
.ha-step input[type="url"],
.ha-step input[type="date"],
.ha-step input[type="number"],
.ha-step select,
.ha-step textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 15px;
	box-sizing: border-box;
}

.ha-step fieldset {
	border: none;
	padding: 0;
	margin: 8px 0;
}

.ha-step fieldset label {
	font-weight: 400;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-right: 16px;
}

.ha-field-note {
	font-size: 13px;
	color: #666;
	font-style: italic;
	margin: 0 0 8px;
}

.ha-repeating-row {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr auto;
	gap: 8px;
	margin-bottom: 8px;
	align-items: center;
}

.ha-repeating-row input {
	margin: 0;
}

.ha-remove-row {
	background: #f0f0f0;
	border: 1px solid #ccc;
	border-radius: 4px;
	cursor: pointer;
	width: 32px;
	height: 32px;
}

.ha-add-row {
	background: #fff;
	border: 1px dashed #2271b1;
	color: #2271b1;
	border-radius: 4px;
	padding: 8px 14px;
	cursor: pointer;
	font-size: 14px;
}

.ha-notice {
	padding: 12px 16px;
	border-radius: 4px;
	margin: 16px 0;
	font-size: 14px;
}

.ha-notice--info {
	background: #e7f3fc;
	color: #0a4b78;
}

.ha-notice--warning {
	background: #fcf9e8;
	color: #855c00;
}

.ha-form-nav {
	display: flex;
	justify-content: space-between;
	margin-top: 28px;
}

.ha-btn {
	padding: 12px 24px;
	border-radius: 4px;
	font-size: 15px;
	cursor: pointer;
	border: 1px solid transparent;
}

.ha-btn--primary {
	background: #2271b1;
	color: #fff;
	margin-left: auto;
}

.ha-btn--primary:disabled {
	opacity: 0.6;
	cursor: default;
}

.ha-btn--secondary {
	background: #fff;
	border: 1px solid #ccc;
	color: #333;
}

.ha-form-message {
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: 4px;
	font-size: 14px;
	display: none;
}

.ha-form-message:not(:empty) {
	display: block;
}

.ha-form-message--success {
	background: #edfaef;
	color: #00450c;
}

.ha-form-message--error {
	background: #fcf0f1;
	color: #8a2424;
}

@media (max-width: 480px) {
	.ha-repeating-row {
		grid-template-columns: 1fr;
	}
}
