// ------------------------------------
// CHECKOUT VALIDATION MESSAGES
// ------------------------------------

div.woocommerce .form-row .fc-inline-error:not( .invalid-country-not-allowed ) {
	display: none;
}

div.woocommerce .form-row.woocommerce-invalid .fc-inline-error {
	display: block;
}



div.woocommerce .form-row .fc-inline-error,
div.woocommerce .shipping-method__package .fc-inline-error,
div.woocommerce .form-row .fc-mailcheck-suggestion {
	z-index: z( 'default' ) + 1;
	position: relative;
	display: block;
	margin: 0;
	padding-inline: 0 !important; // Needed to override theme styles
	padding: $checkout-message-error-padding !important; // Needed to override theme styles
	padding-#{ $alignment-left }: $checkout-message-error-padding-left !important; // Needed to override theme styles
	min-height: auto;
	border: 0;
	background-color: $checkout-message-error-background-color;
	font-size: $font-size-extra-small;
	text-align: #{ $alignment-left };
	line-height: 1.6;
	animation: none;
	transform: none;
}

div.woocommerce .form-row .fc-mailcheck-suggestion {
	padding: $checkout-message-suggestion-padding;
}

div.woocommerce .form-row .fc-mailcheck-suggestion .mailcheck-suggestion {
	&:focus {
		outline: $focus-outline-link !important; // Needed to override theme styles
		outline-offset: $focus-outline-offset-link !important; // Needed to override theme styles
	}
}

div.woocommerce .form-row .fc-inline-error,
div.woocommerce .shipping-method__package .fc-inline-error {
	color: $checkout-message-error-color;
}

div.woocommerce .shipping-method__package .fc-inline-error {
	padding-#{ $alignment-left }: calc( #{ $global-spacing-extra-small } + #{ $option-box-radio-size } + #{ $option-box-padding-horizontal } + remsize( .1rem ) );
	background-color: transparent;
}



div.woocommerce .form-row .fc-inline-error:before,
div.woocommerce .shipping-method__package .fc-inline-error:before {
	@include icon( $checkout-message-error-icon );
	@include icon-size( $checkout-message-error-icon-size );

	position: absolute;
	display: block !important; // Needed to override theme styles
	top: $checkout-message-error-icon-position-top;
	#{ $alignment-left }: $checkout-message-error-icon-position-left;
	transform: translateY( -50% );
	color: inherit !important; // Needed to override theme styles
	speak: never;
}



div.woocommerce .form-row .fc-inline-error:after,
div.woocommerce .shipping-method__package .fc-inline-error:after {
	display: none;
}





// ------------------------------------
// CHECKOUT FIELD VALIDATION
// ------------------------------------

// VALID FIELDS
div.woocommerce form .form-row.woocommerce-validated:not( [class*='woocommerce-invalid'] ) {
	textarea,
	select,
	input[type="email"],
	input[type="number"],
	input[type="search"],
	input[type="text"],
	input[type="date"],
	input[type="tel"],
	input[type="url"],
	input[type="password"],
	.select2-selection {
		border-color: $success-color;
	}
}

// INVALID FIELDS
div.woocommerce form .form-row[class*='woocommerce-invalid'] {
	textarea,
	select,
	input[type="email"],
	input[type="number"],
	input[type="search"],
	input[type="text"],
	input[type="date"],
	input[type="tel"],
	input[type="url"],
	input[type="password"],
	.select2-selection {
		border-color: $error-color;
	}
}
div.woocommerce form .shipping-method__package[class*='woocommerce-invalid'] {
	#shipping_method.shipping-method__options {
		border-color: $error-color;
	}
}




// ------------------------------------
// CHECKOUT PASSWORD STRENGTH METER
// ------------------------------------

div.woocommerce .woocommerce-password-strength {
	display: block;
	position: relative;
	font-weight: normal;
	padding: $checkout-message-error-padding !important; // Needed to override theme styles
	padding-#{ $alignment-left }: $checkout-message-error-padding-left !important; // Needed to override theme styles
	font-size: $font-size-extra-small;
	text-align: #{ $alignment-left };
	line-height: 1.6;
	background-color: transparent;

	&.strong { color: $success-color; }
	&.short { color: $error-color; }
	&.bad { color: $error-color; }
	&.good { color: $alert-color; }
}
div.woocommerce .woocommerce-password-strength:before {
	@include icon-size( $checkout-message-error-icon-size );
	@include icon( $checkout-message-error-icon );

	position: absolute;
	display: block !important; // Needed to override theme styles
	top: calc( #{ $checkout-message-error-icon-position-top } - remsize( .1rem ) );
	#{ $alignment-left }: $checkout-message-error-icon-position-left;
	transform: translateY( -50% );
	color: inherit !important; // Needed to override theme styles
	speak: never;
}
div.woocommerce .woocommerce-password-strength.strong:before {
	@include icon( 'i-check-circle' );
}
div.woocommerce .woocommerce-password-strength.good:before {
	@include icon( 'i-alert-triangle' );
}

div.woocommerce .woocommerce-password-hint {
	display: block;
	margin: $global-spacing-tiny 0 0;
}
