/**
 * Windows (Chrome/Edge) no renderiza emojis de banderas con Segoe UI Emoji.
 * Esta fuente cubre solo los codepoints de banderas (unicode-range).
 */
@font-face {
	font-family: "Twemoji Country Flags";
	unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
	src: url("../fonts/TwemojiCountryFlags.woff2") format("woff2");
	font-display: swap;
}

.ginput_container_international_phone {
	width: 100%;
}

.gr-phone-field__trigger-flag,
.gr-phone-field__option-flag {
	font-family: "Twemoji Country Flags", "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

/* Editor GF: selects nativos con emojis de bandera */
.default_prefix_setting #field_default_prefix,
.priority_countries_setting #field_priority_countries,
.default_prefix_setting #field_default_prefix option,
.priority_countries_setting #field_priority_countries option {
	font-family: "Twemoji Country Flags", "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", inherit;
}

.gr-phone-field {
	display: flex;
	align-items: stretch;
	width: 100%;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	overflow: visible;
	transition: border-color 0.3s ease-in;
}

.gr-phone-field:focus-within {
	border-color: #ccc;
	border-bottom-color: #8b0000;
	box-shadow: none;
}

.gfield_error .gr-phone-field,
.gr-phone-field.parsley-error {
	border-color: #a94442 !important;
}

.gr-phone-field__prefix {
	position: relative;
	flex: 0 0 110px;
	max-width: 110px;
	background: #f5f5f5;
	border-right: 0;
}

.gr-phone-field__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
	width: 100%;
	height: 100%;
	min-height: 39px;
	padding: 6px 8px;
	border: 0;
	background: transparent;
	text-align: left;
	cursor: pointer;
	font-size: 14px;
	line-height: 1.42857143;
	color: #333;
}

.gr-phone-field__trigger:disabled {
	cursor: not-allowed;
	opacity: 0.7;
}

.gr-phone-field__trigger-label {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
	white-space: nowrap;
}

.gr-phone-field__trigger-flag {
	flex: 0 0 auto;
	font-size: 16px;
	line-height: 1;
}

.gr-phone-field__trigger-dial {
	flex: 0 0 auto;
	font-variant-numeric: tabular-nums;
}

.gr-phone-field__trigger-icon {
	width: 0;
	height: 0;
	flex-shrink: 0;
	margin-left: 2px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid #888;
}

.gr-phone-field__select.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.gr-phone-field__dropdown {
	position: absolute;
	top: calc(100% + 2px);
	left: 0;
	z-index: 1000;
	width: 280px;
	max-height: 280px;
	padding: 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.gr-phone-field__dropdown[hidden] {
	display: none !important;
}

.gr-phone-field__search {
	width: 100%;
	margin-bottom: 6px;
	min-height: 32px;
	height: 32px;
	padding: 4px 8px;
	font-size: 13px;
	line-height: 1.3;
}

.gr-phone-field__search:focus {
	outline: none;
	box-shadow: none !important;
	border-color: #A70240 !important;
}

.gr-phone-field__list {
	max-height: 120px;
	overflow-y: auto;
}

.gr-phone-field__option {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 8px 10px;
	border: 0;
	background: #fff;
	text-align: left;
	cursor: pointer;
	font-size: 14px;
	line-height: 1.3;
	color: #333;
}

.gr-phone-field__option:hover,
.gr-phone-field__option.is-selected,
.gr-phone-field__option.is-focused {
	background: #f5f5f5;
}

.gr-phone-field__option.is-filter-hidden,
.gr-phone-field__separator.is-filter-hidden {
	display: none !important;
}

.gr-phone-field__option-flag {
	flex: 0 0 24px;
	font-size: 16px;
	line-height: 1;
}

.gr-phone-field__option-name {
	flex: 1 1 auto;
	padding: 0 8px;
}

.gr-phone-field__option-dial {
	flex: 0 0 auto;
	color: #666;
}

.gr-phone-field__separator {
	height: 1px;
	margin: 6px 0;
	background: #ddd;
}

.gr-phone-field__number {
	flex: 1 1 auto;
	min-width: 0;
}

.gr-phone-field__number-input {
	width: 100%;
	height: 100%;
	min-height: 39px;
	padding: 6px 12px;
	border: 0 !important;
	border-radius: 0 4px 4px 0 !important;
	background: #fff;
	box-shadow: none !important;
}

.gr-phone-field__number-input:focus {
	outline: none;
	box-shadow: none !important;
}

.gr-phone-field__errors {
	display: block;
}

.ginput_container_international_phone .gr-phone-field__errors .parsley-errors-list,
.ginput_container_international_phone + .gfield_description.validation_message,
.gfield .ginput_container_international_phone ~ .gfield_description.validation_message {
	padding: 0;
	margin-top: 5px;
	margin-bottom: 0;
	font-size: 14px;
	list-style: none;
}

.ginput_container_international_phone .gr-phone-field__errors .parsley-errors-list li,
.ginput_container_international_phone + .gfield_description.validation_message,
.gfield .ginput_container_international_phone ~ .gfield_description.validation_message {
	list-style-type: none;
	color: #a94442;
}

@media (max-width: 480px) {
	.gr-phone-field__prefix {
		flex-basis: 110px;
		max-width: 110px;
	}

	.gr-phone-field__dropdown {
		width: calc(100vw - 40px);
		max-width: 320px;
	}
}

/* Editor GF: países destacados */
.priority_countries_setting #field_priority_countries {
	width: 100% !important;
	min-height: 220px !important;
	height: 220px !important;
}
