/*
 * GiftRocket recipient phone input: country code selector (intl-tel-input).
 * Rules are scoped to .wallregi-iti and partly !important so theme / page-builder styles for
 * div, button and input elements cannot pull the flag out of the field.
 */
.wallregi-iti.iti:not(.iti--container) {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
}

.wallregi-iti.iti input.iti__tel-input,
.wallregi-iti.iti input[type="tel"] {
	width: 100% !important;
	margin: 0 !important;
	box-sizing: border-box;
}

/* Flag + dial code sit inside the left edge of the input. */
.wallregi-iti .iti__country-container {
	position: absolute !important;
	top: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	right: auto !important;
	display: block !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 1px !important;
	float: none !important;
	z-index: 2;
}

.wallregi-iti .iti__selected-country {
	display: flex !important;
	align-items: center !important;
	gap: 4px;
	width: auto !important;
	min-width: 0 !important;
	height: 100% !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 8px 0 12px !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: inherit !important;
	font: inherit !important;
	line-height: 1 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	cursor: pointer;
}

.wallregi-iti .iti__selected-country:hover,
.wallregi-iti .iti__selected-country:focus {
	background: rgba(0, 0, 0, 0.04) !important;
	color: inherit !important;
	outline: none;
}

.wallregi-iti .iti__selected-country-primary {
	display: flex;
	align-items: center;
	padding: 0 !important;
	background: transparent !important;
}

.wallregi-iti .iti__selected-dial-code {
	margin-left: 4px;
	font-size: inherit;
	color: inherit;
}

/*
 * Dropdown. The country list is rendered in <body> (dropdownContainer) inside
 * .iti.iti--container.wallregi-iti and positioned by intl-tel-input below the field, so the
 * accordion panel (overflow:auto) or a scrolling modal cannot clip it.
 */
.wallregi-iti.iti--container {
	z-index: 100000 !important;
}

.wallregi-iti .iti__dropdown-content {
	border: 1px solid #d0d5dd !important;
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12) !important;
	background: #ffffff !important;
	color: #1d2327;
	overflow: hidden;
	text-align: left;
}

/* Fallback when the list is rendered inline (no dropdownContainer). */
.wallregi-iti:not(.iti--container) .iti__dropdown-content {
	position: absolute !important;
	top: 100% !important;
	left: 0;
	z-index: 100000;
	margin-top: 2px;
}

.wallregi-iti .iti__country-container:has(.iti__dropdown-content:not(.iti__hide)) {
	z-index: 100000;
}

.wallregi-iti .iti__search-input {
	width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 9px 10px 9px 32px !important;
	border: 0 !important;
	border-bottom: 1px solid #e4e7ec !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: #ffffff !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
}

.wallregi-iti .iti__search-icon {
	left: 10px !important;
}

.wallregi-iti .iti__country-list {
	margin: 0 !important;
	padding: 4px 0 !important;
	list-style: none !important;
	max-height: 220px;
}

.wallregi-iti .iti__country {
	display: flex !important;
	align-items: center;
	margin: 0 !important;
	padding: 8px 12px !important;
	border: 0 !important;
	list-style: none !important;
	font-size: 14px !important;
	line-height: 1.3 !important;
	color: #1d2327;
}

.wallregi-iti .iti__country::before {
	content: none !important;
}

.wallregi-iti .iti__dial-code {
	color: #667085;
}

.wallregi-iti .iti__country.iti__highlight {
	background: #f2f4f7;
}

/* The field label always sits above the field while the selector is shown. */
.wallregi_recipient_phone_item.wallregi-has-country-selector .wallregi_receiver_phone_label {
	position: relative !important;
	bottom: 0 !important;
	display: inline-block;
	margin-bottom: 4px;
}

/* Admin gift card form: match the regular-text width. */
.wallregi_manual_form .wallregi-iti.iti {
	max-width: 25em;
}
