/* ==========================================================================
   WS CF7 Phone with Area Code – structural styles only
   Visual styling (colours, borders, font-size…) comes from the theme.
   ========================================================================== */

.wpcf7-form-control-wrap.wpcf7-phone-with-area-code {
	margin-bottom: 1.5rem;
}

.wpcf7-phone-with-area-code {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: stretch;
	position: relative;
	width: 100%;
	background-color: inherit;
}

.wpcf7-phone-with-area-code .wpcf7-not-valid-tip {
	flex-basis: 100%;
	font-size: 1.8rem !important;
	margin-top: 0.5rem;
}

.wpcf7-phone-areacode-container {
	position: relative;
	flex: 0 0 auto;
	min-width: 100px;
	max-width: 170px;
	background-color: inherit;
}

.wpcf7-phone-areacode-search-wrapper {
	display: flex;
	align-items: center;
	height: 100%;
	cursor: pointer;
	position: relative;
}

.wpcf7-phone-areacode-search {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	cursor: pointer;
	margin-bottom: 0;
	padding-right: 2.5rem !important;
}

.wpcf7-phone-areacode-arrow {
	position: absolute;
	right: 0.8rem;
	top: 50%;
	transform: translateY(-50%);
	transition: transform 0.15s ease;
	line-height: 1;
	cursor: pointer;
}

.wpcf7-phone-areacode-search-wrapper[aria-expanded="true"] .wpcf7-phone-areacode-arrow {
	transform: translateY(-50%) rotate(180deg);
}

.wpcf7-phone-areacode-dropdown {
	position: absolute;
	top: calc(100% + 2px);
	left: 0;
	z-index: 9999;
	line-height: 1.3;
	margin: 0;
	padding: 1rem;
	list-style: none;
	max-height: 240px;
	overflow-y: auto;
	overscroll-behavior: contain;
	min-width: 220px;
	background-color: #FFF;
}

.wpcf7-phone-areacode-dropdown[hidden] {
	display: none;
}

.wpcf7-phone-areacode-dropdown li {
	cursor: pointer;
}

.wpcf7-phone-areacode-noresults {
	cursor: default;
}

.wpcf7-phone-areacode-native {
	position: absolute;
	inset: 0;
	opacity: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
	z-index: -1;
}

.wpcf7-phone-js .wpcf7-phone-areacode-native {
	display: none;
}

.wpcf7-phone-number-input {
	flex: 1 1 auto;
	min-width: 120px;
	margin-bottom: 0;
}

@media (max-width: 480px) {
	.wpcf7-phone-with-area-code {
		flex-direction: column;
	}

	.wpcf7-phone-areacode-container {
		max-width: 100%;
		width: 100%;
	}

	.wpcf7-phone-number-input {
		width: 100%;
	}
}

.wpcf7-phone-with-area-code .wpcf7-phone-areacode-container input.wpcf7-phone-areacode-search {
	width: 100%;
	margin: 0;
}

.wpcf7-form-control-wrap.wpcf7-phone-with-area-code > input.wpcf7-phone-number-input {
	width: auto;
	margin: 0;
	flex: 1 1 auto;
}
