/* RapidCents offer popup forms — modern, conversion-focused UI */
.rcvi-popup {
	--rcvi-accent: #2563eb;
	--rcvi-accent-dark: #1e3a8a;
	position: fixed;
	inset: 0;
	z-index: 999990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
}

.rcvi-popup *,
.rcvi-popup *::before,
.rcvi-popup *::after {
	box-sizing: border-box;
}

.rcvi-popup-hidden {
	display: none !important;
}

.rcvi-popup-active {
	display: flex !important;
}

.rcvi-popup-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	animation: rcvi-fade-in 0.25s ease;
}

/* Two-pane dialog: accent hero + form */
.rcvi-popup-dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 760px;
	max-height: 92vh;
	overflow: hidden;
	display: grid;
	grid-template-columns: 1fr 1fr;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
	animation: rcvi-pop-in 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.rcvi-popup--inline {
	position: static;
	padding: 0;
	display: block;
}

.rcvi-popup--inline .rcvi-popup-dialog {
	max-width: 640px;
	margin: 0 auto;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

/* Accent hero pane */
.rcvi-popup-aside {
	position: relative;
	padding: 2rem 1.75rem;
	color: #fff;
	background: linear-gradient(150deg, var(--rcvi-accent) 0%, var(--rcvi-accent-dark) 100%);
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
	overflow: auto;
}

.rcvi-popup-aside::after {
	content: "";
	position: absolute;
	right: -60px;
	top: -60px;
	width: 180px;
	height: 180px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	pointer-events: none;
}

.rcvi-popup-badge {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	padding: 0.3rem 0.7rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
}

.rcvi-popup-title {
	margin: 0 0 0.5rem;
	font-size: 1.6rem;
	line-height: 1.2;
	font-weight: 800;
	color: #fff;
}

.rcvi-popup-subtitle {
	margin: 0;
	color: rgba(255, 255, 255, 0.9);
	font-size: 0.95rem;
	line-height: 1.5;
}

.rcvi-popup-benefits {
	list-style: none;
	margin: 0.25rem 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.rcvi-popup-benefits li {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	font-size: 0.9rem;
	line-height: 1.4;
	color: #fff;
}

.rcvi-popup-benefit-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
}

/* Form pane */
.rcvi-popup-body {
	padding: 2rem 1.75rem;
	overflow: auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.rcvi-form-fields {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.rcvi-offer-form .rcvi-form-row {
	margin: 0;
}

.rcvi-form-label {
	display: block;
	font-weight: 600;
	font-size: 0.82rem;
	margin-bottom: 0.3rem;
	color: #334155;
}

.rcvi-form-input {
	width: 100%;
	padding: 0.7rem 0.8rem;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	font-size: 0.95rem;
	color: #0f172a;
	background: #f8fafc;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.rcvi-form-input::placeholder {
	color: #94a3b8;
}

.rcvi-form-input:focus {
	outline: none;
	background: #fff;
	border-color: var(--rcvi-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--rcvi-accent) 22%, transparent);
}

.rcvi-form-input.rcvi-has-error {
	border-color: #dc2626;
	background: #fef2f2;
}

select.rcvi-form-input {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.8rem center;
	padding-right: 2rem;
}

.rcvi-form-checkbox-label {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	font-size: 0.8rem;
	color: #64748b;
	cursor: pointer;
	line-height: 1.4;
}

.rcvi-form-checkbox {
	width: auto;
	margin-top: 0.15rem;
	accent-color: var(--rcvi-accent);
}

.rcvi-required {
	color: #dc2626;
}

.rcvi-form-error {
	display: block;
	color: #dc2626;
	font-size: 0.78rem;
	margin-top: 0.25rem;
}

.rcvi-form-success {
	margin-top: 1rem;
	padding: 0.9rem 1rem;
	background: #ecfdf5;
	border: 1px solid #6ee7b7;
	border-radius: 10px;
	color: #065f46;
	font-size: 0.95rem;
	text-align: center;
}

.rcvi-form-actions {
	margin-top: 1.1rem;
}

.rcvi-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.85rem 1.25rem;
	border-radius: 10px;
	border: 0;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.rcvi-button-primary {
	width: 100%;
	color: #fff;
	background: linear-gradient(135deg, var(--rcvi-accent) 0%, var(--rcvi-accent-dark) 100%);
	box-shadow: 0 8px 20px color-mix(in srgb, var(--rcvi-accent) 35%, transparent);
}

.rcvi-button-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 26px color-mix(in srgb, var(--rcvi-accent) 45%, transparent);
}

.rcvi-button-primary:active {
	transform: translateY(0);
}

.rcvi-button-arrow {
	transition: transform 0.15s ease;
}

.rcvi-button-primary:hover .rcvi-button-arrow {
	transform: translateX(3px);
}

.rcvi-popup-trust {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0.85rem 0 0;
	font-size: 0.74rem;
	color: #94a3b8;
	line-height: 1.4;
}

.rcvi-popup-trust svg {
	flex: 0 0 auto;
	color: #94a3b8;
}

.rcvi-popup-close {
	position: absolute;
	top: 0.85rem;
	right: 0.85rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	color: #475569;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
	transition: background 0.15s ease, color 0.15s ease;
}

.rcvi-popup-close:hover {
	background: #fff;
	color: #0f172a;
}

body.rcvi-popup-open {
	overflow: hidden;
}

@keyframes rcvi-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes rcvi-pop-in {
	from { opacity: 0; transform: translateY(16px) scale(0.97); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	.rcvi-popup-overlay,
	.rcvi-popup-dialog {
		animation: none;
	}
}

/* Mobile: single column, bottom-sheet feel */
@media (max-width: 720px) {
	.rcvi-popup {
		padding: 0;
		align-items: flex-end;
	}

	.rcvi-popup-dialog {
		grid-template-columns: 1fr;
		max-width: 100%;
		max-height: 94vh;
		border-radius: 18px 18px 0 0;
		animation: rcvi-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	}

	.rcvi-popup-aside {
		padding: 1.5rem 1.4rem 1.25rem;
		gap: 0.85rem;
	}

	.rcvi-popup-title {
		font-size: 1.3rem;
		padding-right: 2rem;
	}

	.rcvi-popup-benefits {
		display: none;
	}

	.rcvi-popup-body {
		padding: 1.4rem 1.4rem 1.75rem;
	}
}

@keyframes rcvi-slide-up {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}
