/* Wil Phone Validator frontend */

body.woocommerce-checkout #billing_phone:not([data-wil-phone-validator-display-ready="1"]),
body.woocommerce-checkout input[name="billing_phone"]:not([data-wil-phone-validator-display-ready="1"]),
body.woocommerce-checkout #shipping_phone:not([data-wil-phone-validator-display-ready="1"]),
body.woocommerce-checkout input[name="shipping_phone"]:not([data-wil-phone-validator-display-ready="1"]),
body.woocommerce-checkout #billing-phone:not([data-wil-phone-validator-display-ready="1"]),
body.woocommerce-checkout input[name="billing-phone"]:not([data-wil-phone-validator-display-ready="1"]),
body.woocommerce-checkout #shipping-phone:not([data-wil-phone-validator-display-ready="1"]),
body.woocommerce-checkout input[name="shipping-phone"]:not([data-wil-phone-validator-display-ready="1"]),
.woocommerce-MyAccount-content input[type="tel"]:not([data-wil-phone-validator-display-ready="1"]) {
	color: transparent !important;
	-webkit-text-fill-color: transparent !important;
	caret-color: transparent !important;
	text-shadow: none !important;
}

.iti.wil-phone-validator-iti {
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.iti.wil-phone-validator-iti:not(.wil-phone-validator-display-ready) .iti__country-container,
.iti.wil-phone-validator-iti:not(.wil-phone-validator-display-ready) .iti__flag-container {
	visibility: hidden !important;
}

.iti.wil-phone-validator-iti > input.iti__tel-input,
.iti.wil-phone-validator-iti > input[type="tel"],
.iti.wil-phone-validator-iti > input[type="text"] {
	width: 100% !important;
	box-sizing: border-box !important;
}

.iti.wil-phone-validator-layout-lock > input.iti__tel-input,
.iti.wil-phone-validator-layout-lock > input[type="tel"],
.iti.wil-phone-validator-layout-lock > input[type="text"] {
	height: var(--wil-phone-validator-height) !important;
	min-height: var(--wil-phone-validator-min-height) !important;
	padding-top: var(--wil-phone-validator-padding-top) !important;
	padding-bottom: var(--wil-phone-validator-padding-bottom) !important;
	line-height: var(--wil-phone-validator-line-height) !important;
	margin-top: var(--wil-phone-validator-margin-top) !important;
	margin-bottom: var(--wil-phone-validator-margin-bottom) !important;
	transform: none !important;
	top: auto !important;
	bottom: auto !important;
	vertical-align: baseline !important;
}

.iti.wil-phone-validator-iti .iti__country-container,
.iti.wil-phone-validator-iti .iti__flag-container {
	position: absolute !important;
	top: calc(var(--wil-phone-validator-line-top, 0px) + 10.5px) !important;
	bottom: auto !important;
	display: flex !important;
	align-items: center !important;
	height: var(--wil-phone-validator-text-line-height, 1.5em) !important;
	min-height: 0 !important;
	box-sizing: border-box !important;
}

.iti.wil-phone-validator-iti .iti__selected-country,
.iti.wil-phone-validator-iti .iti__selected-flag,
.iti.wil-phone-validator-iti .iti__selected-country-primary {
	display: flex !important;
	align-items: center !important;
	height: 100% !important;
	min-height: 0 !important;
	box-sizing: border-box !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	font-family: var(--wil-phone-validator-font-family, inherit) !important;
	font-size: var(--wil-phone-validator-font-size, inherit) !important;
	font-weight: var(--wil-phone-validator-font-weight, inherit) !important;
	line-height: var(--wil-phone-validator-text-line-height, normal) !important;
	letter-spacing: var(--wil-phone-validator-letter-spacing, normal) !important;
	transform: none !important;
}

.iti.wil-phone-validator-iti .iti__selected-dial-code {
	display: inline-flex !important;
	align-items: center !important;
	height: var(--wil-phone-validator-text-line-height, 1.5em) !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	font-family: var(--wil-phone-validator-font-family, inherit) !important;
	font-size: var(--wil-phone-validator-font-size, inherit) !important;
	font-weight: var(--wil-phone-validator-font-weight, inherit) !important;
	line-height: var(--wil-phone-validator-text-line-height, normal) !important;
	letter-spacing: var(--wil-phone-validator-letter-spacing, normal) !important;
	transform: none !important;
}

.wil-phone-validator-floating-label-field > label:not(.wil-phone-validator-label),
.wil-phone-validator-floating-label-field .wc-block-components-text-input__label {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
	pointer-events: none !important;
}

.iti.wil-phone-validator-iti .wil-phone-validator-label {
	position: absolute !important;
	top: 3px !important;
	left: 14px !important;
	z-index: 6 !important;
	margin: 0 !important;
	padding: 0 !important;
	color: #2b2d2f !important;
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif !important;
	font-size: 13px !important;
	font-weight: 400 !important;
	line-height: 18px !important;
	letter-spacing: normal !important;
	white-space: nowrap !important;
	pointer-events: none !important;
}

.iti.wil-phone-validator-iti .wil-phone-validator-label-required {
	margin-left: 2px !important;
	color: #d63638 !important;
	font-weight: 600 !important;
}

.wil-phone-validator-error {
	margin-top: 6px;
	color: #b42318;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.35;
}

.wil-phone-validator-invalid {
	border-color: #d92d20 !important;
	box-shadow: 0 0 0 1px #d92d20 !important;
}

.wil-phone-validator-rejected {
	animation: wil-phone-validator-reject 240ms ease-in-out;
}

@keyframes wil-phone-validator-reject {
	0%, 100% {
		transform: translateX(0);
	}
	30% {
		transform: translateX(-3px);
	}
	70% {
		transform: translateX(3px);
	}
}

/* Country selector search field. */
.iti__country-selector .iti__search-input-wrapper {
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 10px !important;
	box-sizing: border-box !important;
	background: #fff !important;
}

.iti__country-selector .iti__search-input {
	display: block !important;
	width: 100% !important;
	height: 42px !important;
	min-height: 42px !important;
	margin: 0 !important;
	padding: 0 42px 0 38px !important;
	box-sizing: border-box !important;
	border: 1px solid #d2d2d7 !important;
	border-radius: 9px !important;
	outline: 0 !important;
	background: #fff !important;
	color: #1d1d1f !important;
	box-shadow: none !important;
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	line-height: 40px !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

.iti__country-selector .iti__search-input:focus {
	border-color: #86868b !important;
	box-shadow: 0 0 0 1px #86868b !important;
}

.iti__country-selector .iti__search-input::placeholder {
	color: #6e6e73 !important;
	opacity: 1 !important;
}

.iti__country-selector .iti__search-input-wrapper label,
.iti__country-selector .iti__search-input-wrapper .required {
	display: none !important;
}

@media (max-width: 782px) {
	.iti__country-list {
		z-index: 999999 !important;
	}

	.iti--fullscreen-popup .iti__country-selector,
	.iti--detached-country-selector.iti--fullscreen-popup .iti__country-selector {
		background: #fff !important;
		color: #1d1d1f !important;
		font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif !important;
	}

	.iti--fullscreen-popup .iti__search-input-wrapper,
	.iti--detached-country-selector.iti--fullscreen-popup .iti__search-input-wrapper {
		padding: 10px 14px 12px !important;
	}

	.iti--fullscreen-popup .iti__search-input,
	.iti--detached-country-selector.iti--fullscreen-popup .iti__search-input {
		height: 44px !important;
		min-height: 44px !important;
		border: 0 !important;
		border-radius: 11px !important;
		background: #f2f2f7 !important;
		line-height: 44px !important;
	}

	.iti--fullscreen-popup .iti__country,
	.iti--detached-country-selector.iti--fullscreen-popup .iti__country {
		display: flex !important;
		align-items: center !important;
		min-height: 52px !important;
		padding: 10px 16px !important;
		background: #fff !important;
		color: #1d1d1f !important;
		font-size: 17px !important;
		line-height: 22px !important;
	}

	.iti--fullscreen-popup .iti__country.iti__highlight,
	.iti--detached-country-selector.iti--fullscreen-popup .iti__country.iti__highlight {
		background: #f5f5f7 !important;
	}

	.iti--fullscreen-popup .iti__dial-code,
	.iti--detached-country-selector.iti--fullscreen-popup .iti__dial-code {
		color: #6e6e73 !important;
	}
}
