/* =====================================================================
   CF7 Country Code Dropdown - Styles  v2.1
   ===================================================================== */

/* ── Original: country code dropdown only ─────────────────────────── */
.wpcf7-form .wpcf7-country-code {
	width: 100%;
	background-color: #f8f9fa;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 0.85rem 1rem;
	color: #333;
	font-size: 0.95rem;
	font-family: 'Poppins', sans-serif;
	transition: all 0.3s ease;
	outline: none;
	cursor: pointer;
	max-width: 100%;
	box-sizing: border-box;
}
.wpcf7-form .wpcf7-country-code:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34,113,177,0.15);
}
.wpcf7-form .wpcf7-country-code.wpcf7-not-valid {
	border-color: #dc3232;
}


/* ── Phone with country code: outer wrapper ───────────────────────── */
.wpcf7-phone-with-code-wrap {
	display: block;
	width: 100%;
}

.wpcf7-phone-with-code-inner {
	display: flex;
	align-items: stretch;
	width: 100%;
	background-color: #f8f9fa;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	overflow: visible;    /* allow custom dropdown to overflow */
	box-sizing: border-box;
	transition: all 0.3s ease;
	position: relative;
}
.wpcf7-phone-with-code-inner:focus-within {
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34,113,177,0.15);
}


/* ── Custom flag trigger button (left side) ──────────────────────── */
.wpcf7-flag-trigger {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0.85rem 0.6rem 0.85rem 1rem;
	background: transparent;
	border: none;
	border-right: 1px solid #e0e0e0;
	border-radius: 10px 0 0 10px;
	cursor: pointer;
	font-size: 0.95rem;
	font-family: 'Poppins', sans-serif;
	color: #333;
	white-space: nowrap;
	user-select: none;
	outline: none;
	transition: background 0.2s;
}
.wpcf7-flag-trigger:hover {
	background: #eef0f2;
}
.wpcf7-flag-trigger .wpcf7-flag-emoji {
	font-size: 1.3rem;
	line-height: 1;
}
.wpcf7-flag-trigger .wpcf7-dial-code {
	font-size: 0.9rem;
	color: #555;
}
.wpcf7-flag-trigger .wpcf7-caret {
	font-size: 0.6rem;
	color: #888;
	margin-left: 2px;
}


/* ── Custom dropdown list ─────────────────────────────────────────── */
.wpcf7-country-list {
	display: none;
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	z-index: 9999;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.12);
	min-width: 260px;
	max-width: 320px;
	max-height: 280px;
	overflow: hidden;
	flex-direction: column;
}
.wpcf7-country-list.open {
	display: flex;
}

/* Search box inside dropdown */
.wpcf7-country-search {
	width: 100%;
	padding: 0.6rem 0.8rem;
	border: none;
	border-bottom: 1px solid #e0e0e0;
	font-size: 0.9rem;
	font-family: 'Poppins', sans-serif;
	color: #333;
	background: #f8f9fa;
	border-radius: 10px 10px 0 0;
	outline: none;
	box-sizing: border-box;
}

/* Scrollable options area */
.wpcf7-country-options {
	overflow-y: auto;
	flex: 1;
}

/* Each country row */
.wpcf7-country-option {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0.55rem 0.9rem;
	cursor: pointer;
	font-size: 0.9rem;
	font-family: 'Poppins', sans-serif;
	color: #333;
	transition: background 0.15s;
}
.wpcf7-country-option:hover,
.wpcf7-country-option.active {
	background: #f0f4ff;
}
.wpcf7-country-option .wpcf7-opt-flag {
	font-size: 1.2rem;
	flex: 0 0 auto;
	line-height: 1;
}
.wpcf7-country-option .wpcf7-opt-name {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.wpcf7-country-option .wpcf7-opt-dial {
	color: #888;
	font-size: 0.85rem;
	flex: 0 0 auto;
}


/* ── Phone number text input ──────────────────────────────────────── */
.wpcf7-phone-number-input {
	flex: 1 1 auto;
	width: 100%;
	background-color: transparent;
	border: none;
	border-radius: 0 10px 10px 0;
	padding: 0.85rem 1rem;
	color: #333;
	font-size: 0.95rem;
	font-family: 'Poppins', sans-serif;
	transition: all 0.3s ease;
	outline: none;
	box-shadow: none !important;
	min-width: 0;
	box-sizing: border-box;
}
.wpcf7-phone-number-input::placeholder {
	color: #aaa;
}


/* ── Validation error ─────────────────────────────────────────────── */
.wpcf7-phone-with-code-inner.wpcf7-not-valid,
.wpcf7-phone-with-code-wrap .wpcf7-not-valid .wpcf7-phone-with-code-inner {
	border-color: #dc3232 !important;
}


/* ── Responsive ───────────────────────────────────────────────────── */
@media ( max-width: 400px ) {
	.wpcf7-country-list {
		min-width: 220px;
	}
}
