/* Shared by CF7, coverage forms and forms inserted into popups. */
body .olin-phone {
	display: flex;
	align-items: flex-start;
	gap: 0.4rem;
	width: 100%;
	min-width: 0;
	text-align: left;
}

body .olin-phone > .wpcf7-form-control-wrap:not(.olin-phone__prefix) {
	flex: 1 1 0;
	width: auto;
	min-width: 0;
	margin: 0;
}

body .olin-phone > input {
	flex: 1 1 0;
	min-width: 0;
}

body .olin-phone input[type="tel"] {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

body .olin-phone .olin-phone__prefix {
	display: block;
	position: relative;
	flex: 0 0 5.25rem;
	width: 5.25rem;
	max-width: 40%;
	min-width: 0;
	margin: 0;
	font: inherit;
	font-size: 0.8rem;
	font-weight: 400;
	line-height: 1.25;
	color: inherit;
}

body .olin-phone .olin-phone__select {
	display: block;
	width: 100%;
	min-height: 1.9rem;
	margin: 0;
	padding: 0.3rem 1.1rem 0.3rem 0.45rem;
	border: 1px solid currentColor;
	border-radius: 0.3rem;
	background-color: transparent;
	color: inherit;
	font: inherit;
	line-height: 1.25;
	cursor: pointer;
	box-sizing: border-box;
}

body .olin-phone__select option {
	color: #252525;
	background: #fff;
}

body .olin-phone .olin-phone__value {
	display: none;
}

body .olin-phone--ready .olin-phone__select {
	position: absolute;
	z-index: 1;
	top: 0;
	left: 0;
	height: 1.9rem;
	opacity: 0;
}

body .olin-phone--ready .olin-phone__value {
	display: flex;
	position: relative;
	align-items: center;
	gap: 0.25rem;
	min-height: 1.9rem;
	padding: 0.3rem 1.1rem 0.3rem 0.45rem;
	border: 1px solid transparent;
	border-radius: 0.3rem;
	font: inherit;
	font-weight: 400;
	line-height: 1.25;
	white-space: nowrap;
	box-sizing: border-box;
	pointer-events: none;
}

/* Inset only the visible top edge; retain the original box and text baseline
   so neither the field underlines nor the selector's bottom edge moves. */
body .olin-phone--ready .olin-phone__value::before {
	content: "";
	position: absolute;
	inset: calc(0.3rem - 1px) -1px -1px;
	border: 1px solid currentColor;
	border-radius: inherit;
}

body .olin-phone__text {
	display: block;
	transform: translateY(0.15rem) scale(0.875);
	transform-origin: left center;
}

body .olin-phone--ready .olin-phone__value::after {
	content: "";
	position: absolute;
	top: calc(0.85rem - 1px);
	right: 0.45rem;
	width: 0.3rem;
	height: 0.3rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
}

body .olin-phone__select:focus-visible + .olin-phone__value::before {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

body .olin-phone__select:disabled + .olin-phone__value {
	opacity: 0.5;
}

body .olin-phone__select[aria-invalid="true"] + .olin-phone__value::before {
	border-color: #b12424;
}

/* Retain the rhythm of the compact, underlined contact forms. */
.c-contact__form .olin-phone,
.c-homecontact__form .olin-phone,
.alternate-form .olin-phone,
.cobertura__form .olin-phone {
	align-items: baseline;
}

@media (max-width: 480px) {
	body .olin-phone {
		gap: 0.35rem;
	}
	body .olin-phone .olin-phone__prefix {
		font-size: 0.9rem;
	}
}
