/**
 * UEP Phone Prefix — Avada/WooCommerce Integration der intl-tel-input Library
 *
 * Setup ab v1.18.39:
 *   - separateDialCode = false → Vorwahl steht als Text IM Eingabefeld ("+43 1234567")
 *   - Flagge links als Klick-Selector (Land-Wechsel + Vorwahl-Wechsel via Flagge)
 *   - Keine Pille mehr — verhindert visuelle Ueberlappung zwischen Pille und Input-Text
 *   - Custom-JS schuetzt den "+43 " Prefix vor Edits durch Tippen/Backspace/Paste
 */

/* ===== Layout: iti-Container volle Breite ===== */
.woocommerce form .iti,
.woocommerce-page form .iti,
.iti.iti--allow-dropdown {
	display: block !important;
	width: 100%;
	position: relative;
}

.woocommerce form .iti input.input-text,
.woocommerce-page form .iti input.input-text,
.iti input[type="tel"] {
	width: 100%;
	box-sizing: border-box;
}

/* ===== Reset gegen Avada/WC ===== */
.iti input[type="tel"],
.iti__country-list * {
	text-decoration: none !important;
}

/* ===== Flag-Selector links sauber gerendert ===== */

.iti--allow-dropdown .iti__country-container {
	padding: 0;
}

.iti--allow-dropdown .iti__selected-country {
	background-color: transparent;
	padding: 0 8px;
	height: 100%;
	display: flex;
	align-items: center;
	gap: 4px;
}

.iti--allow-dropdown .iti__selected-country:hover,
.iti--allow-dropdown .iti__selected-country:focus {
	background-color: rgba( 158, 194, 95, 0.10 );
}

/* Flagge etwas vergroessert fuer bessere Erkennbarkeit */
.iti__flag {
	transform: scale( 1.1 );
	transform-origin: center;
}

/* Input bekommt links genug Platz fuer die Flagge */
.iti--allow-dropdown input[type="tel"] {
	padding-left: 52px !important;
}

/* ===== Dropdown (Land-Liste) ===== */
.iti__country-list,
.iti__dropdown-content {
	z-index: 999999 !important;
}

.iti__country.iti__highlight,
.iti__country[aria-selected="true"] {
	background-color: rgba( 158, 194, 95, 0.18 );
}

.iti__country:hover {
	background-color: rgba( 158, 194, 95, 0.08 );
}

/* Suchfeld im Dropdown */
.iti__search-input {
	border: 1px solid #e2e2e2 !important;
	padding: 8px 12px !important;
	font-size: 14px;
}

.iti__search-input:focus {
	outline: none !important;
	border-color: #9ec25f !important;
	box-shadow: 0 0 0 2px rgba( 158, 194, 95, 0.2 );
}

/* ===== Mobile (<480px) ===== */
@media ( max-width: 480px ) {
	.iti--allow-dropdown input[type="tel"] {
		padding-left: 48px !important;
	}
}

/* ===== Inline-Hinweis am Telefonfeld ===== */
/* Erscheint direkt unter dem Feld wenn nur Vorwahl drin ist —
   Style angelehnt an den Browser-Native "Pflichtfeld korrekt ausfuellen"-Hinweis */
.uep-phone-inline-hint {
	display: none;
	color: #d50016;
	font-size: 0.9em;
	margin-top: 6px;
	padding-left: 2px;
	line-height: 1.3;
}

.uep-phone-inline-hint.is-visible {
	display: block;
}
