.certregform label { display: block; float: left; width: 140px; }
.certregform input[type='text'], .certregform input[type='password'],
.certregform input[type='email'] {
	padding: 4px 8px;
	background: #f0f0f0;
	border: 1px solid #ccc;
	width: 100%;
}
.certregform input[type='text']:focus, .certregform input[type='password']:focus,
.certregform input[type='email']:focus {
	border-color: #aaa;
}

.loginform label { display: block; float: left; width: 140px; }
.loginform input[type='text'], .loginform input[type='password'] {
	padding: 4px 8px;
	background: #f0f0f0;
	border: 1px solid #ccc;
	width: 100%;
}
.loginform input[type='text']:focus, .loginform input[type='password']:focus {
	border-color: #aaa;
}

.certregform, .loginform {
	clear: both;
	margin-bottom: 30px;
	position: relative;
}

/* Flexbox container for forms */
.aff-forms-container {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -15px;
}

/* Individual form columns */
.aff-form-column {
	flex: 1 1 400px;
	padding: 0 15px;
	margin-bottom: 30px;
	box-sizing: border-box;
}

/* Mobile adjustments to ensure proper stacking */
@media screen and (max-width: 767px) {
	/* Make columns full width on mobile */
	.aff-form-column {
		flex-basis: 100%;
		max-width: 100%;
	}

	/* Adjust label width on smaller screens */
	.certregform label, .loginform label {
		width: 100%;
		float: none;
		margin-bottom: 5px;
	}

	.loginform {
		margin-bottom: 40px;
	}

	/* Override any floats from the theme */
	.certregform, .loginform {
		float: none !important;
		width: 100% !important;
		clear: both !important;
		display: block !important;
		position: relative !important;
	}
}

/* General error message formatting */
.error, .login-error {
	background-color: #ffeded;
	border: 1px solid #f5c6cb;
	color: #721c24;
	padding: 10px;
	margin-bottom: 15px;
	border-radius: 3px;
}

/* Success message formatting */
.success, .login-status-message {
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
	color: #155724;
	padding: 10px;
	margin-bottom: 15px;
	border-radius: 3px;
	text-align: center;
}

.required {
	color: red;
}

/* Better reCAPTCHA display on mobile */
@media screen and (max-width: 400px) {
	.g-recaptcha {
		transform: scale(0.85);
		transform-origin: 0 0;
	}
}