/* Popup đăng ký email (Brevo) — inc/brevo.php + assets/js/rp-popup.js.
   Desktop: hộp giữa màn hình. Mobile: bottom sheet (ngón cái với tới, không che hết trang). */
.rp-pop {
	position: fixed; inset: 0; z-index: 100000;
	display: flex; align-items: center; justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0);
	transition: background 0.2s ease;
}
.rp-pop[hidden] { display: none; }
.rp-pop.is-open { background: rgba(0, 0, 0, 0.6); }
.rp-pop-box {
	position: relative;
	width: 100%; max-width: 420px;
	background: var(--rp-bg, #fff);
	border-radius: var(--rp-radius, 12px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	opacity: 0; transform: translateY(12px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.rp-pop.is-open .rp-pop-box { opacity: 1; transform: none; }
.rp-pop-box:focus { outline: none; }
.rp-pop-body { padding: 32px 24px 20px; text-align: center; }
.rp-pop-title { margin: 0 0 8px; padding: 0 28px; /* chừa chỗ nút đóng 44px */ font-size: 1.4rem; line-height: 1.25; color: var(--rp-ink); }
.rp-pop-text { margin: 0 0 18px; color: var(--rp-text); }
.rp-pop-close {
	position: absolute; top: 4px; right: 4px;
	width: 44px; height: 44px; min-height: 0; margin: 0; padding: 0;
	display: flex; align-items: center; justify-content: center;
	background: transparent; border: 0; color: var(--rp-ink); cursor: pointer;
}
.rp-pop-form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.rp-pop-form input[type="email"] { width: 100%; min-height: 48px; margin: 0; font-size: 16px; /* chặn iOS tự zoom */ }
.rp-pop-form input[aria-invalid="true"] { border-color: #b71c1c; }
.rp-pop-btn { width: 100%; min-height: 48px; margin: 0; border-radius: var(--rp-radius); }
.rp-pop-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.rp-pop-msg { margin: 8px 0 0; min-height: 1em; color: #b71c1c; font-size: 0.9rem; }
.rp-pop-msg:empty { display: none; }
.rp-pop-fine { margin: 10px 0 0; font-size: 0.8rem; color: var(--rp-muted, #767676); }
.rp-pop-code {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	margin: 14px 0 16px; padding: 10px 10px 10px 16px;
	border: 2px dashed var(--rp-primary); border-radius: var(--rp-radius);
}
.rp-pop-code strong { font-size: 1.3rem; letter-spacing: 0.08em; color: var(--rp-ink); }
.rp-pop-copy { min-height: 44px; margin: 0; }

@media (max-width: 549px) {
	.rp-pop { align-items: flex-end; padding: 0; }
	.rp-pop-box { max-width: none; border-radius: 16px 16px 0 0; transform: translateY(100%); }
	.rp-pop-body { padding: 28px 16px calc(16px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
	.rp-pop, .rp-pop-box { transition: none; }
}
