/* Teléfono con bandera y buscador de país. PORTADO del Club (elp-telefono.css): mismo
   componente que ya usa JuanPa Invierte, con los tokens de Elite. */
/* El campo de teléfono/WhatsApp (Club 1.9.2, GRI_Telefono): [bandera +57 ▾][número] en un
   solo control, con buscador de país. Portado del Club: el mismo que usa JuanPa Invierte.
   (.elp-tel-campo), sin valores de reserva. */

.elp-tel-campo {
	--elp-navy: #091146;
	--elp-naranja: #ff7a00;
	--elp-tinta-2: #091146b3;
	--elp-linea: #0911461f;
	--elp-linea-campo: #09114640;
	--elp-tel-gris: #f5f5f7;
	--elp-suelo: #ececf1;
	--elp-crema: #ffedd1;
	--elp-tel-texto-crema: #8a4b00;
	--elp-tel-foco: 0 0 0 2px #ff7a0033;
	--elp-tel-sombra: 0 12px 32px #0911461a;

	display: flex;
	flex-direction: column;
	gap: .375rem;
	min-width: 0;
	margin: 0 0 1rem;
}
.elp-form > .elp-tel-campo { margin: 0; gap: .25rem; }
.elp-tel__rotulo { font-weight: 600; font-size: .875rem; color: var(--elp-navy); }
.elp-form .elp-tel__rotulo { font-size: .75rem; }
.elp-tel__ayuda { font-weight: 400; color: var(--elp-tinta-2); }

.elp-tel {
	position: relative;
	display: flex;
	align-items: stretch;
	min-height: 2.75rem;
	border: 1px solid var(--elp-linea-campo);
	border-radius: .5rem;
	background: #fff;
	box-sizing: border-box;
}
.elp-tel:focus-within { border-color: var(--elp-naranja); box-shadow: var(--elp-tel-foco); }

/* Sin JavaScript: el selector nativo, pegado al número. */
.elp-tel .elp-tel__pais {
	flex: 0 1 auto;
	max-width: 46%;
	margin: 0 !important;
	padding: 0 .5rem 0 .625rem !important;
	border: 0 !important;
	border-right: 1px solid var(--elp-linea) !important;
	border-radius: .5rem 0 0 .5rem !important;
	background-color: var(--elp-tel-gris) !important;
	box-shadow: none !important;
	color: var(--elp-navy);
	font-family: inherit;
	font-size: .875rem;
	min-height: 0 !important;
	height: auto !important;
}
/* Con JavaScript el selector queda para el formulario y el botón lo reemplaza a la vista. */
.elp-tel.is-mejorado .elp-tel__pais { position: absolute; width: 1px; height: 1px !important; opacity: 0; pointer-events: none; }

.elp-tel__boton {
	display: flex;
	align-items: center;
	gap: .375rem;
	flex: 0 0 auto;
	padding: 0 .625rem 0 .75rem;
	border: 0;
	border-right: 1px solid var(--elp-linea);
	border-radius: .5rem 0 0 .5rem;
	background: var(--elp-tel-gris);
	color: var(--elp-navy);
	font: inherit;
	font-size: .9375rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}
.elp-tel__boton:hover { background: var(--elp-suelo); }
.elp-tel__boton:focus-visible { outline: 2px solid var(--elp-naranja); outline-offset: -2px; }
/* La bandera con su código ISO al lado. La bandera es un SVG propio del plugin, porque el
   emoji no existe en Windows. El ISO se queda a propósito: una bandera de 20 px no siempre
   se distingue de otra, y si el SVG no carga el campo no se queda mudo. El filete separa del
   fondo las banderas que llevan blanco en el borde, como la de Perú. */
.elp-tel__bandera {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	line-height: 1;
}
.elp-tel__bandera img {
	display: block;
	width: 1.25rem;
	height: .94rem;
	border-radius: 2px;
	object-fit: cover;
	box-shadow: 0 0 0 1px var(--elp-linea);
}
.elp-tel__iso {
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .04em;
	line-height: 1;
	color: var(--elp-tinta-2);
	font-variant-numeric: tabular-nums;
}
.elp-tel__flecha { font-size: .6875rem; color: var(--elp-tinta-2); }

.elp-tel .elp-tel__num {
	flex: 1 1 auto;
	min-width: 0;
	width: auto !important;
	margin: 0 !important;
	padding: .625rem .75rem !important;
	border: 0 !important;
	border-radius: 0 .5rem .5rem 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: none !important;
	font-family: inherit;
	font-size: .9375rem;
	color: var(--elp-navy);
	min-height: 0 !important;
	height: auto !important;
}

/* El buscador. */
.elp-tel__lista-caja {
	position: absolute;
	z-index: 1000;
	top: calc(100% + .375rem);
	left: 0;
	width: 100%;
	min-width: 17.5rem;
	max-width: 23.75rem;
	padding: .5rem;
	border: 1px solid var(--elp-linea);
	border-radius: 1rem;
	background: #fff;
	box-shadow: var(--elp-tel-sombra);
	box-sizing: border-box;
}
.elp-tel__lista-caja[hidden] { display: none; }
.elp-tel .elp-tel__buscar {
	width: 100% !important;
	margin: 0 !important;
	padding: .5625rem .75rem !important;
	border: 1px solid var(--elp-linea-campo) !important;
	border-radius: .5rem !important;
	font-family: inherit;
	font-size: .9375rem;
	color: var(--elp-navy);
	box-sizing: border-box;
	box-shadow: none !important;
}
.elp-tel .elp-tel__buscar:focus { border-color: var(--elp-naranja) !important; box-shadow: var(--elp-tel-foco) !important; outline: none; }
.elp-tel__opciones { list-style: none; margin: .375rem 0 0; padding: 0; max-height: 17.5rem; overflow-y: auto; }
.elp-tel__grupo { margin: 0; padding: .5rem .5rem .25rem; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--elp-tinta-2); }
.elp-tel__opcion { display: flex; align-items: center; gap: .625rem; margin: 0; padding: .5rem; border-radius: .5rem; cursor: pointer; color: var(--elp-navy); font-size: .875rem; }
.elp-tel__opcion.is-activa { background: var(--elp-crema); color: var(--elp-tel-texto-crema); }
.elp-tel__opcion.is-activa .elp-tel__opcion-ind { color: var(--elp-tel-texto-crema); }
.elp-tel__opcion[aria-selected="true"] { font-weight: 700; }
.elp-tel__opcion .elp-tel__opcion-ind { margin-left: auto; color: var(--elp-tinta-2); font-variant-numeric: tabular-nums; }
.elp-tel__vacio { padding: .625rem .5rem; color: var(--elp-tinta-2); font-size: .875rem; }

@media (max-width: 560px) {
	.elp-tel__lista-caja { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
	.elp-tel *, .elp-tel { transition: none !important; }
}

/* 1.14.5: el campo Documento reutiliza este control; su selector de tipo es más angosto. */
