/* Teddypost Country Popup — overlay modal in the Hatstore style:
   suggested store + stay button on top, full store list below.
   Polished pass: teal primary action, soft blur overlay, entrance
   animation, animated chevrons. */

.tpcp-overlay {
	position: fixed;
	inset: 0;
	z-index: 100010; /* above the admin bar and the theme's sticky header */
	background: rgba(15, 23, 32, 0.5);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 5vh 16px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	animation: tpcp-fade 0.25s ease-out;
}

.tpcp-modal {
	background: #fff;
	border-radius: 16px;
	max-width: 720px;
	width: 100%;
	padding: 52px 44px 36px;
	position: relative;
	box-shadow: 0 24px 64px rgba(10, 30, 40, 0.28), 0 4px 16px rgba(10, 30, 40, 0.12);
	font-family: Nunito, Inter, sans-serif;
	color: #16232b;
	animation: tpcp-rise 0.3s cubic-bezier(0.21, 0.8, 0.36, 1);
}

@keyframes tpcp-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes tpcp-rise {
	from { opacity: 0; transform: translateY(16px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	.tpcp-overlay,
	.tpcp-modal {
		animation: none;
	}
}

.tpcp-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: none;
	cursor: pointer;
	font-size: 24px;
	line-height: 40px;
	color: #6b7a85;
	padding: 0;
	transition: background 0.15s, color 0.15s;
}

.tpcp-close:hover,
.tpcp-close:focus {
	background: #eef6f6;
	color: #2f8f8c;
	outline: none;
}

.tpcp-title {
	margin: 0 0 12px;
	font-size: 27px;
	font-weight: 800;
	letter-spacing: -0.01em;
	text-align: center;
	font-family: Nunito, sans-serif;
	color: #16232b;
}

/* Small teal keel under the title — quiet brand accent. */
.tpcp-title::after {
	content: "";
	display: block;
	width: 44px;
	height: 4px;
	border-radius: 2px;
	margin: 12px auto 0;
	background: linear-gradient(90deg, #4cb5b2, #7fd0ce);
}

.tpcp-text {
	margin: 0 auto 26px;
	max-width: 520px;
	text-align: center;
	font-size: 15px;
	color: #51606b;
	line-height: 1.55;
}

.tpcp-primary-actions {
	max-width: 480px;
	margin: 0 auto 30px;
}

/* Row buttons: flag + label + chevron, Hatstore-style. */
.tpcp-row {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 15px 18px;
	margin: 0 0 10px;
	border: 1px solid #e3e8ee;
	border-radius: 10px;
	background: #f7f8fa;
	color: #16232b;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	box-sizing: border-box;
	transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.tpcp-row:hover,
.tpcp-row:focus {
	background: #eef6f6;
	border-color: #4cb5b2;
	color: #16232b;
	box-shadow: 0 2px 10px rgba(76, 181, 178, 0.18);
}

/* The suggested store is THE action — solid teal, white text. */
.tpcp-primary-actions .tpcp-row:first-child {
	background: #4cb5b2;
	border-color: #4cb5b2;
	color: #fff;
	font-weight: 700;
	box-shadow: 0 4px 14px rgba(76, 181, 178, 0.35);
}

.tpcp-primary-actions .tpcp-row:first-child:hover,
.tpcp-primary-actions .tpcp-row:first-child:focus {
	background: #3da5a2;
	border-color: #3da5a2;
	color: #fff;
	box-shadow: 0 6px 18px rgba(76, 181, 178, 0.45);
	transform: translateY(-1px);
}

.tpcp-primary-actions .tpcp-row:first-child .tpcp-chevron {
	color: rgba(255, 255, 255, 0.85);
}

.tpcp-primary-actions .tpcp-row:first-child .tpcp-flag {
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.tpcp-row .tpcp-flag {
	flex: 0 0 auto;
	width: 27px;
	height: 19px;
	border-radius: 3px;
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.tpcp-row .tpcp-flag svg {
	display: block;
	width: 100%;
	height: 100%;
}

.tpcp-row .tpcp-label {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tpcp-row .tpcp-chevron {
	flex: 0 0 auto;
	color: #8a97a1;
	font-size: 18px;
	line-height: 1;
	transition: transform 0.15s;
}

.tpcp-row:hover .tpcp-chevron,
.tpcp-row:focus .tpcp-chevron {
	transform: translateX(3px);
}

.tpcp-heading {
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	color: #9aa1a9;
	text-align: center;
}

.tpcp-sites {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 28px;
	row-gap: 0;
}

.tpcp-sites .tpcp-row {
	background: none;
	border: 0;
	border-bottom: 1px solid #eef0f3;
	border-radius: 8px;
	margin: 0;
	padding: 12px 8px;
	font-weight: 400;
}

.tpcp-sites .tpcp-row:hover,
.tpcp-sites .tpcp-row:focus {
	background: #f2f9f9;
	color: #16232b;
	box-shadow: none;
}

@media (max-width: 600px) {
	.tpcp-overlay {
		padding: 3vh 12px;
	}

	.tpcp-modal {
		padding: 44px 22px 26px;
		border-radius: 14px;
	}

	.tpcp-title {
		font-size: 22px;
	}

	.tpcp-sites {
		grid-template-columns: 1fr;
	}
}
