/**
 * DevForms frontend enhancements: smart phone (intl-tel-input wrapper),
 * character / word limit hint, mailcheck suggestion.
 */

/* Smart phone: the .iti wrapper takes the field size, the input fills it. */
.wpforms-field-phone .iti {
	display: block;
	width: 100%;
}

.wpforms-field-phone .iti.wpforms-field-small {
	max-width: 25%;
}

.wpforms-field-phone .iti.wpforms-field-medium {
	max-width: 60%;
}

.wpforms-field-phone .iti.wpforms-field-large {
	max-width: 100%;
}

.wpforms-field-phone .iti input.wpforms-smart-phone-field {
	max-width: 100%;
	width: 100%;
}

.wpforms-field-phone .iti .iti__country-container {
	z-index: 2;
}

.wpforms-field-phone .iti .iti__selected-country {
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
	border-radius: 0;
	box-shadow: none;
	height: 100%;
}

.wpforms-field-phone .iti .iti__selected-country:focus-visible {
	outline: 2px solid var( --wpforms-button-background-color, #066aab );
	outline-offset: -2px;
}

.wpforms-field-phone .iti .iti__dropdown-content {
	z-index: 9999;
	color: var( --wpforms-field-text-color, #333 );
	background-color: var( --wpforms-field-menu-color, #fff );
	border-color: var( --wpforms-field-border-color, rgba( 0, 0, 0, 0.25 ) );
	border-radius: var( --wpforms-field-border-radius, 3px );
	font-size: var( --wpforms-field-size-font-size, 16px );
}

.wpforms-field-phone .iti .iti__search-input {
	font-size: var( --wpforms-field-size-font-size, 16px );
	padding: 8px 10px;
}

.wpforms-field-phone .iti .iti__country-list .iti__country {
	padding: 6px 10px;
}

.wpforms-field-phone .iti .iti__country-list .iti__country.iti__highlight {
	background-color: rgba( 0, 0, 0, 0.06 );
}

/* Validation / suggestion messages rendered inside the wrapper. */
.wpforms-field-phone .iti em.wpforms-error,
.wpforms-field-phone .iti label.wpforms-error {
	display: block;
	position: static;
	margin-top: 5px;
}

/* Character / word limit hint. */
.wpforms-field-limit-text {
	display: block;
	color: var( --wpforms-label-sublabel-color, #777 );
	font-size: var( --wpforms-label-size-sublabel-font-size, 14px );
	line-height: var( --wpforms-label-size-sublabel-line-height, 17px );
	margin-top: 5px;
	text-align: right;
	max-width: 100%;
}

.wpforms-field input.wpforms-field-small ~ .wpforms-field-limit-text {
	max-width: 25%;
}

.wpforms-field input.wpforms-field-medium ~ .wpforms-field-limit-text,
.wpforms-field textarea.wpforms-field-medium ~ .wpforms-field-limit-text {
	max-width: 60%;
}

/* Mailcheck suggestion (not a validation error: muted color, link accent). */
.wpforms-field-email label.wpforms-error.mailcheck-error {
	display: block;
	margin-top: 5px;
	font-weight: 400;
}

.wpforms-field-email .mailcheck-error .mailcheck-suggestion {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

.wpforms-field-email .mailcheck-error .mailcheck-suggestion:hover,
.wpforms-field-email .mailcheck-error .mailcheck-suggestion:focus {
	text-decoration: none;
}

/* Masked inputs: no right alignment (inputmask default is overridden in JS too). */
.wpforms-field input.wpforms-masked-input {
	text-align: left;
}
