/**
 * Shared intl-tel-input fixes (Contact, Quotation, Career, New Project popup).
 *
 * CF7 appends .wpcf7-not-valid-tip after the <input> inside .iti. The library
 * sizes .iti__flag-container with top/bottom:0 against .iti, so the tip made
 * the flag chrome stretch over the error. form-validation.js moves tips out
 * of .iti; these rules keep overflow/z-index safe for the country list.
 */

.iti {
	width: 100%;
	display: block;
	position: relative;
	overflow: visible;
	z-index: 2;
}

.iti.iti--container-open,
.iti:has(.iti__selected-flag[aria-expanded="true"]) {
	z-index: 30;
}

/* Tip may briefly sit inside .iti before JS relocates it — don't stretch flags. */
.iti:has(> .wpcf7-not-valid-tip) > .iti__flag-container {
	bottom: auto !important;
	height: auto !important;
	align-items: stretch;
}

.iti:has(> .wpcf7-not-valid-tip) > .iti__flag-container .iti__selected-flag {
	height: auto;
	min-height: 44px;
}

/* Body-portaled country list (dropdownContainer: document.body) */
body > .iti.iti--container {
	z-index: 100000;
	padding: 0;
}

body > .iti.iti--container .iti__country-list {
	width: auto;
	min-width: 280px;
	max-width: min(360px, 92vw);
}
