/* =============================================================================
   Abandoned Cart Recovery — Guest Email Popup (Frontend)
   ============================================================================= */

/* Overlay */
.ac-popup-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0, 0, 0, 0.55);
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

.ac-popup-overlay.ac-popup-visible {
	display: flex;
	animation: ac-popup-fade-in 0.25s ease;
}

@keyframes ac-popup-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* Box */
.ac-popup-box {
	position: relative;
	background: #ffffff;
	border-radius: 6px;
	padding: 36px 32px 28px;
	max-width: 440px;
	width: 100%;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	animation: ac-popup-slide-up 0.25s ease;
	box-sizing: border-box;
	text-align: center;
}

@keyframes ac-popup-slide-up {
	from { transform: translateY(20px); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}

/* Close button */
.ac-popup-dismiss {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 18px;
	cursor: pointer;
	color: #9ca3af;
	line-height: 1;
	padding: 4px 6px;
	border-radius: 3px;
	transition: color 0.15s;
}

.ac-popup-dismiss:hover {
	color: #111827;
}

/* Heading */
.ac-popup-box h2 {
	margin: 0 0 8px;
	padding: 0;
	font-size: 20px;
	font-weight: 700;
	color: #111827;
	line-height: 1.3;
}

/* Subtitle */
.ac-popup-sub {
	margin: 0 0 20px;
	color: #6b7280;
	font-size: 14px;
	line-height: 1.5;
}

/* Form */
#ac-popup-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

#ac-popup-email {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 14px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 14px;
	color: #111827;
	transition: border-color 0.15s;
	outline: none;
}

#ac-popup-email:focus {
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* GDPR row */
.ac-popup-gdpr {
	text-align: left;
	font-size: 12px;
	color: #6b7280;
}

.ac-popup-gdpr label {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	cursor: pointer;
}

.ac-popup-gdpr input[type="checkbox"] {
	margin-top: 2px;
	flex-shrink: 0;
}

/* Error */
.ac-popup-error {
	color: #dc2626;
	font-size: 12px;
	text-align: left;
	min-height: 16px;
}

/* Submit */
.ac-popup-submit {
	width: 100%;
	padding: 11px 16px;
	background: #111827;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}

.ac-popup-submit:hover:not(:disabled) {
	background: #1f2937;
}

.ac-popup-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Success message */
.ac-popup-success {
	padding: 12px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 4px;
	color: #166534;
	font-size: 14px;
	text-align: center;
	margin: 0;
}

/* Mobile */
@media (max-width: 480px) {
	.ac-popup-box {
		padding: 28px 20px 20px;
		border-radius: 8px 8px 0 0;
	}

	.ac-popup-overlay.ac-popup-visible {
		align-items: flex-end;
	}

	.ac-popup-box {
		max-width: 100%;
		animation: ac-popup-slide-up-mobile 0.25s ease;
	}

	@keyframes ac-popup-slide-up-mobile {
		from { transform: translateY(100%); }
		to   { transform: translateY(0); }
	}
}
