/**
 * AESTHETICZ NEWSLETTER — dlx-popup.css
 * Discount popup, Dreamcore Luxe palette. Uses the site's --dlx-*
 * variables with hardcoded fallbacks so it works standalone too.
 */

.dlx-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(46, 36, 52, 0.45);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dlx-popup-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.dlx-popup {
	position: relative;
	width: 100%;
	max-width: 400px;
	background: var(--dlx-card, #FFFFFF);
	color: var(--dlx-text, #2E2434);
	border-radius: 22px;
	padding: 38px 30px 30px;
	text-align: center;
	overflow: hidden;
	box-shadow: 0 24px 70px rgba(124, 92, 255, 0.28);
	transform: translateY(22px) scale(0.96);
	opacity: 0;
	transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.3s ease;
}

.dlx-popup-overlay.is-open .dlx-popup {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.dlx-popup__glow {
	position: absolute;
	top: -70px;
	left: 50%;
	transform: translateX(-50%);
	width: 240px;
	height: 140px;
	background: radial-gradient(ellipse at center, rgba(181, 139, 255, 0.35), rgba(255, 125, 186, 0.18) 55%, transparent 75%);
	pointer-events: none;
}

.dlx-popup__bow {
	font-size: 34px;
	line-height: 1;
	margin-bottom: 6px;
	position: relative;
}

.dlx-popup__close {
	position: absolute;
	top: 10px;
	right: 12px;
	z-index: 2;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	opacity: 0.55;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition: opacity 0.2s ease, background 0.2s ease;
}

.dlx-popup__close:hover,
.dlx-popup__close:focus-visible {
	opacity: 1;
	background: rgba(181, 139, 255, 0.14);
	outline: none;
}

.dlx-popup__heading {
	margin: 0 0 8px;
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.2;
	position: relative;
}

.dlx-popup__text {
	margin: 0 0 18px;
	font-family: 'Poppins', system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.55;
	opacity: 0.8;
	position: relative;
}

.dlx-popup__form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	position: relative;
}

.dlx-popup__input {
	width: 100%;
	box-sizing: border-box;
	padding: 13px 16px;
	border: 1.5px solid rgba(181, 139, 255, 0.45);
	border-radius: 999px;
	background: var(--dlx-bg, #FFF9FC);
	color: inherit;
	font-family: 'Poppins', system-ui, sans-serif;
	font-size: 14px;
	text-align: center;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dlx-popup__input:focus {
	outline: none;
	border-color: var(--dlx-accent, #7C5CFF);
	box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.16);
}

.dlx-popup__button {
	width: 100%;
	padding: 13px 16px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--dlx-lilac, #B58BFF), var(--dlx-pink, #FF7DBA));
	color: #FFFFFF;
	font-family: 'Poppins', system-ui, sans-serif;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.3px;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.dlx-popup__button:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 22px rgba(255, 125, 186, 0.35);
}

.dlx-popup__button:disabled {
	opacity: 0.6;
	cursor: wait;
	transform: none;
}

.dlx-popup__button--ghost {
	background: transparent;
	color: var(--dlx-accent, #7C5CFF);
	border: 1.5px solid rgba(124, 92, 255, 0.4);
	margin-top: 6px;
}

.dlx-popup__button--ghost:hover {
	box-shadow: none;
	background: rgba(124, 92, 255, 0.07);
}

.dlx-popup__note {
	min-height: 18px;
	margin: 10px 0 0;
	font-family: 'Poppins', system-ui, sans-serif;
	font-size: 12.5px;
	color: #E24C6B;
}

.dlx-popup__fineprint {
	margin: 12px 0 0;
	font-family: 'Poppins', system-ui, sans-serif;
	font-size: 11px;
	opacity: 0.55;
}

.dlx-popup__success-icon {
	font-size: 34px;
	margin-bottom: 6px;
}

.dlx-popup__coupon {
	display: flex;
	align-items: stretch;
	justify-content: center;
	gap: 8px;
	margin: 4px 0 18px;
	position: relative;
}

.dlx-popup__coupon-code {
	flex: 1;
	max-width: 220px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px 14px;
	border: 2px dashed var(--dlx-lilac, #B58BFF);
	border-radius: 12px;
	background: var(--dlx-bg, #FFF9FC);
	font-family: 'Outfit', 'Poppins', monospace, sans-serif;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 1.5px;
}

.dlx-popup__copy {
	padding: 0 18px;
	border: 0;
	border-radius: 12px;
	background: var(--dlx-accent, #7C5CFF);
	color: #fff;
	font-family: 'Poppins', system-ui, sans-serif;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
}

.dlx-popup__copy:hover {
	transform: translateY(-1px);
}

.dlx-popup__copy.is-copied {
	background: #2FB57C;
}

/* ── Dark mode ─────────────────────────────────────────────────── */

html[data-dlx-theme="dark"] .dlx-popup {
	background: var(--dlx-card, #241B2E);
	color: var(--dlx-text, #F2EAF7);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

html[data-dlx-theme="dark"] .dlx-popup__input,
html[data-dlx-theme="dark"] .dlx-popup__coupon-code {
	background: rgba(255, 255, 255, 0.05);
	color: inherit;
}

html[data-dlx-theme="dark"] .dlx-popup-overlay {
	background: rgba(10, 6, 16, 0.6);
}

/* ── Mobile ────────────────────────────────────────────────────── */

@media (max-width: 480px) {
	.dlx-popup {
		max-width: 340px;
		padding: 32px 22px 24px;
	}

	.dlx-popup__heading {
		font-size: 22px;
	}
}

/* Respect users who prefer no animation. */
@media (prefers-reduced-motion: reduce) {
	.dlx-popup-overlay,
	.dlx-popup,
	.dlx-popup__button,
	.dlx-popup__copy {
		transition: none;
	}
}
