/**
 * Minimal error UI for Australian phone and ABN validation.
 * Matches existing Become a Reseller hyka-field-error outline.
 * Errors are taken out of document flow so floated half-width rows do not reflow.
 */

.hyka-phone-field-wrap,
.hyka-abn-field-wrap {
	position: relative;
}

.hyka-phone-error,
.hyka-abn-error {
	position: absolute;
	left: 0;
	right: 0;
	top: auto;
	z-index: 3;
	display: block;
	color: #e2401c;
	font-size: 12px;
	line-height: 1.35;
	margin-top: 2px;
	background: #fff;
	padding: 0 2px;
	white-space: normal;
	word-wrap: break-word;
}

.hyka-phone-error:empty,
.hyka-abn-error:empty {
	display: none;
}

form.woocommerce-form-register.register input.hyka-field-error,
#sfwc_form_add_subaccount_frontend input.hyka-field-error {
	border-color: #e2401c !important;
	outline: 2px solid #e2401c;
	outline-offset: 0;
	box-shadow: 0 0 0 1px #e2401c;
}

/**
 * Contact-details popup on the My-Account dashboard reuses the same error classes.
 * Its fields are a simple vertical stack (no half-width floats), so errors render
 * inline (static) rather than being pulled out of flow.
 */
#email-edit-form input.hyka-field-error {
	border-color: #e2401c !important;
	outline: 2px solid #e2401c;
	outline-offset: 0;
	box-shadow: 0 0 0 1px #e2401c;
}

#email-edit-form .hyka-phone-error {
	position: static;
	display: block;
	margin: 4px 0 8px;
	background: transparent;
	padding: 0;
}

#email-edit-form .hyka-phone-error:empty {
	display: none;
}

/* Default email is static (login email; changed by Hyka only). */
#email-edit-form input.hyka-static-field {
	background: #f3f4f6;
	color: #555;
	cursor: not-allowed;
}

#email-edit-form .hyka-field-note {
	margin: 4px 0 10px;
	font-size: 12px;
	line-height: 1.35;
	color: #666;
}

/* Save is blocked in real time while any popup field is invalid. */
#email-edit-form #save-email-btn:disabled,
#email-edit-form #save-email-btn[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}
