/* =====================================================================
   RichUps — Phone Country Selector (Phase 5A.6)
   Layout: 2 separate fields — Country (full-width button) + Phone (input with prefix)
===================================================================== */

.rp-phone-field {
	position: relative;
}


/* ─── COUNTRY SELECTOR (full-width button) ───────────────── */
.rp-country-select-wrap {
	position: relative;
}

.rp-country-select-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 11px 16px;
	background: #fff;
	border: 1.5px solid #dde6df;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 500;
	color: #1f2b22;
	cursor: pointer;
	font-family: inherit;
	transition: border-color .15s, box-shadow .15s;
	text-align: left;
	min-height: 44px;
}

.rp-country-select-btn:hover {
	border-color: #9bc4a0;
}

.rp-country-select-btn:focus,
.rp-country-select-btn[aria-expanded="true"] {
	outline: none;
	border-color: #2c5a36;
	box-shadow: 0 0 0 3px rgba(44, 90, 54, 0.1);
}

.rp-country-select-btn-inner {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
}

.rp-country-select-btn .rp-flag {
	font-size: 22px;
	line-height: 1;
}

.rp-country-select-btn .rp-cname {
	font-weight: 600;
	color: #1f2b22;
}

.rp-country-select-btn .rp-dial {
	color: #6c7c70;
	font-size: 13px;
	margin-left: auto;
	margin-right: 4px;
}

.rp-country-select-btn .rp-placeholder {
	color: #b7c2bb;
	font-weight: 500;
}

.rp-country-select-btn .rp-caret {
	color: #6c7c70;
	font-size: 12px;
	transition: transform .2s;
	flex-shrink: 0;
}

.rp-country-select-btn[aria-expanded="true"] .rp-caret {
	transform: rotate(180deg);
}


/* ─── DROPDOWN MENU ──────────────────────────────────────── */
.rp-phone-country-dropdown {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #dde6df;
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(28, 60, 35, 0.15);
	z-index: 1000;
	display: none;
	overflow: hidden;
	padding: 4px;
}

.rp-phone-country-dropdown.is-open {
	display: block;
	animation: rpDropdownIn 0.15s ease-out;
}

@keyframes rpDropdownIn {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: translateY(0); }
}

.rp-phone-country-item {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 11px 14px;
	background: none;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-family: inherit;
	text-align: left;
	font-size: 14px;
	transition: background .12s;
}

.rp-phone-country-item:hover {
	background: #f5f5f0;
}

.rp-phone-country-item.is-active {
	background: #e7f1e9;
}

.rp-phone-country-item .rp-flag {
	font-size: 22px;
}

.rp-phone-country-item .rp-cname {
	flex: 1;
	font-weight: 500;
	color: #1f2b22;
}

.rp-phone-country-item.is-active .rp-cname {
	color: #1d3a23;
	font-weight: 700;
}

.rp-phone-country-item .rp-dial {
	color: #6c7c70;
	font-size: 13px;
	letter-spacing: 0.3px;
}


/* ─── PHONE INPUT (with prefix box) ──────────────────────── */
.rp-phone-input-row {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.rp-phone-prefix {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 14px;
	background: #faf7f1;
	border: 1.5px solid #dde6df;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	color: #1f2b22;
	min-width: 70px;
	white-space: nowrap;
	letter-spacing: 0.5px;
}

.rp-phone-prefix.is-empty {
	color: #b7c2bb;
	font-weight: 500;
	font-size: 12px;
}

.rp-phone-input-row input[type="tel"] {
	flex: 1;
	min-width: 0;
}

.rp-phone-input-row input[type="tel"]:disabled {
	background: #f5f5f0 !important;
	color: #9bc4a0 !important;
	cursor: not-allowed;
}


/* ─── FEEDBACK (validation message) ──────────────────────── */
.rp-phone-field [data-rp-phone-feedback] {
	display: block;
	margin-top: 5px;
	font-size: 12px;
	font-weight: 500;
	min-height: 16px;
	color: #6c7c70;
}


/* ─── MOBILE ─────────────────────────────────────────────── */
@media (max-width: 480px) {
	.rp-phone-prefix {
		min-width: 60px;
		padding: 0 10px;
		font-size: 13px;
	}
	.rp-country-select-btn {
		padding: 11px 12px;
	}
}
