/**
 * UniteElements 10% Voucher & OTP Lead Capture Widget Stylesheet
 *
 * Implements high-converting AppSumo-style layout, Cyber Bot Mascot,
 * glassmorphic blur overlay, auto-advancing OTP digit boxes, and mobile optimization.
 *
 * @package UniteElements_Core
 * @author Jyotirmay Ray <https://jyotirmayray.in/>
 */

/* ==========================================================================
   1. Floating Right-Side Animated Launcher Tab
   ========================================================================== */
.ue-voucher-side-tab {
	position: fixed;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 99998;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #F59E0B;
	background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
	color: #000000;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-weight: 800;
	font-size: 13px;
	letter-spacing: 0.04em;
	padding: 10px 14px 10px 12px;
	border-radius: 14px 0 0 14px;
	border: none;
	cursor: pointer;
	box-shadow: -4px 6px 20px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	outline: none;
	user-select: none;
}

.ue-voucher-side-tab:hover {
	transform: translateY(-50%) translateX(-6px);
	box-shadow: -6px 8px 24px rgba(245, 158, 11, 0.55);
}

.ue-voucher-tab-icon {
	font-size: 16px;
	line-height: 1;
}

.ue-voucher-tab-text {
	text-transform: uppercase;
	font-weight: 900;
	line-height: 1;
}

/* Pulsing radar dot on the side tab */
.ue-voucher-tab-pulse {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #DC2626;
	box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.4);
	animation: ueVoucherPulse 2s infinite;
}

@keyframes ueVoucherPulse {
	0% {
		box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
	}
	70% {
		box-shadow: 0 0 0 6px rgba(220, 38, 38, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
	}
}

/* ==========================================================================
   2. Glassmorphic Modal Backdrop Overlay
   ========================================================================== */
.ue-voucher-modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.ue-voucher-modal-backdrop.is-open {
	opacity: 1;
	visibility: visible;
}

/* ==========================================================================
   3. Voucher Card Container & Mascot Peeking
   ========================================================================== */
.ue-voucher-card-wrap {
	width: 100%;
	max-width: 480px;
	position: relative;
	perspective: 1000px;
}

.ue-voucher-card {
	background: #FFFFFF;
	border-radius: 24px;
	border: 1px solid rgba(226, 232, 240, 0.95);
	box-shadow: 0 25px 60px -12px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.8);
	padding: 44px 34px 32px;
	position: relative;
	text-align: center;
	transform: scale(0.92) translateY(14px);
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
}

.ue-voucher-modal-backdrop.is-open .ue-voucher-card {
	transform: scale(1) translateY(0);
}

/* Close Button */
.ue-voucher-close-btn {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #F1F5F9;
	border: 1px solid #E2E8F0;
	color: #64748B;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	outline: none;
	padding: 0;
}

.ue-voucher-close-btn:hover {
	background: #E2E8F0;
	color: #0F172A;
	transform: rotate(90deg);
}

/* Option B: Cyber Bot Mascot Peeking Over Card */
.ue-voucher-mascot-wrap {
	position: absolute;
	top: -38px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
}

.ue-voucher-mascot {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: #0F172A;
	border: 3px solid #FFFFFF;
	box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	animation: ueVoucherFloat 3s ease-in-out infinite alternate;
}

@keyframes ueVoucherFloat {
	0% {
		transform: translateY(0);
	}
	100% {
		transform: translateY(-4px);
	}
}

/* ==========================================================================
   4. Step Content & Typography
   ========================================================================== */
.ue-voucher-step {
	display: none;
}

.ue-voucher-step.is-active {
	display: block;
	animation: ueVoucherFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ueVoucherFadeIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.ue-voucher-heading {
	font-size: 23px;
	font-weight: 800;
	color: #0F172A;
	line-height: 1.3;
	margin: 12px 0 8px;
	letter-spacing: -0.02em;
}

.ue-voucher-subheading {
	font-size: 14.5px;
	line-height: 1.55;
	color: #64748B;
	margin: 0 0 24px;
	font-weight: 500;
}

/* ==========================================================================
   5. Form Inputs & Buttons
   ========================================================================== */
.ue-voucher-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ue-voucher-input-group {
	position: relative;
	width: 100%;
}

.ue-voucher-input {
	width: 100%;
	height: 50px;
	border: 1.5px solid #CBD5E1;
	border-radius: 12px;
	padding: 0 16px;
	font-size: 15px;
	color: #0F172A;
	background: #FFFFFF;
	transition: all 0.2s ease;
	box-sizing: border-box;
	font-family: inherit;
}

.ue-voucher-input:focus {
	border-color: #2563EB;
	outline: none;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Gold CTA Button (Matching Screenshot) */
.ue-voucher-btn-gold {
	width: 100%;
	height: 50px;
	background: #F59E0B;
	border: none;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 800;
	color: #000000;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-decoration: none !important;
	transition: all 0.2s ease;
	box-shadow: 0 4px 14px rgba(245, 158, 11, 0.32);
	box-sizing: border-box;
	user-select: none;
}

.ue-voucher-btn-gold:hover {
	background: #E08E0B;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(245, 158, 11, 0.42);
}

.ue-voucher-btn-gold:active {
	transform: translateY(1px);
}

.ue-voucher-btn-gold:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* Spinner */
.ue-voucher-spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(0, 0, 0, 0.2);
	border-top-color: #000000;
	border-radius: 50%;
	animation: ueSpinner 0.7s infinite linear;
}

@keyframes ueSpinner {
	to {
		transform: rotate(360deg);
	}
}

/* Error Messages */
.ue-voucher-error-msg {
	font-size: 12.5px;
	font-weight: 600;
	color: #DC2626;
	background: #FEE2E2;
	border: 1px solid #FECACA;
	border-radius: 8px;
	padding: 8px 12px;
	text-align: left;
	line-height: 1.4;
}

/* ==========================================================================
   6. Step 2: OTP 6-Digit Inputs & Spam Notice
   ========================================================================== */
.ue-voucher-otp-inputs {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin-bottom: 6px;
}

.ue-otp-digit {
	width: 48px;
	height: 56px;
	font-size: 26px;
	font-weight: 900;
	text-align: center;
	border: 2px solid #CBD5E1;
	border-radius: 12px;
	color: #1D4ED8;
	font-family: "Space Grotesk", monospace;
	background: #F8FAFC;
	transition: all 0.18s ease;
	box-sizing: border-box;
	outline: none;
	caret-color: #2563EB;
}

.ue-otp-digit:focus {
	border-color: #2563EB;
	background: #FFFFFF;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
	transform: scale(1.04);
}

/* Spam Alert Box */
.ue-voucher-spam-notice {
	background-color: #FEF3C7;
	border: 1px solid #FDE68A;
	border-radius: 10px;
	padding: 10px 14px;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	text-align: left;
	font-size: 12px;
	line-height: 1.45;
	color: #92400E;
}

.ue-voucher-spam-notice .ue-spam-icon {
	font-size: 14px;
	flex-shrink: 0;
	line-height: 1.2;
}

/* Resend Row */
.ue-voucher-resend-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 14px;
	font-size: 12.5px;
	color: #64748B;
}

.ue-voucher-resend-btn,
.ue-voucher-link-btn {
	background: none;
	border: none;
	padding: 0;
	font-size: 12.5px;
	color: #2563EB;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	transition: color 0.18s ease;
}

.ue-voucher-resend-btn:disabled {
	color: #94A3B8;
	text-decoration: none;
	cursor: not-allowed;
}

.ue-voucher-resend-btn:hover:not(:disabled),
.ue-voucher-link-btn:hover {
	color: #1D4ED8;
}

/* ==========================================================================
   7. Step 3: Success & Coupon Card
   ========================================================================== */
.ue-voucher-success-badge {
	font-size: 40px;
	margin-bottom: 8px;
	animation: ueVoucherPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ueVoucherPop {
	0% {
		transform: scale(0.5);
		opacity: 0;
	}
	70% {
		transform: scale(1.15);
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

.ue-voucher-code-card {
	background: #F8FAFC;
	border: 2px dashed #3B82F6;
	border-radius: 14px;
	padding: 18px 20px;
	text-align: center;
	margin-bottom: 20px;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.ue-voucher-card-tag {
	display: inline-block;
	font-size: 11px;
	font-weight: 800;
	color: #2563EB;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	background: #EFF6FF;
	padding: 2px 10px;
	border-radius: 999px;
	margin-bottom: 8px;
}

.ue-voucher-code-val {
	font-size: 32px;
	font-weight: 900;
	letter-spacing: 3px;
	color: #D97706;
	font-family: "Space Grotesk", monospace;
	margin-bottom: 12px;
}

.ue-voucher-copy-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	background: #2563EB;
	color: #FFFFFF;
	font-weight: 700;
	font-size: 13px;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.ue-voucher-copy-btn:hover {
	background: #1D4ED8;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.ue-voucher-copy-btn.copied {
	background: #10B981;
}

.ue-voucher-shop-btn {
	margin-bottom: 16px;
}

.ue-voucher-emailed-note {
	font-size: 12px;
	color: #64748B;
	line-height: 1.5;
	margin: 0;
}

/* Micro Trust Line */
.ue-voucher-micro-trust {
	font-size: 11.5px;
	color: #94A3B8;
	margin-top: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

/* ==========================================================================
   8. Mobile Responsive Breakpoint (<768px)
   ========================================================================== */
@media (max-width: 767px) {
	/* Pinned floating button docked on right edge above WhatsApp Help Desk */
	.ue-voucher-side-tab {
		top: auto;
		bottom: 96px;
		right: 18px;
		transform: none;
		border-radius: 999px;
		padding: 8px 14px;
		box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
	}

	.ue-voucher-side-tab:hover {
		transform: translateY(-2px);
	}

	.ue-voucher-card {
		padding: 38px 22px 26px;
		border-radius: 20px;
	}

	.ue-voucher-heading {
		font-size: 20px;
	}

	.ue-voucher-subheading {
		font-size: 13.5px;
		margin-bottom: 20px;
	}

	.ue-otp-digit {
		width: 40px;
		height: 48px;
		font-size: 22px;
		border-radius: 8px;
	}

	.ue-voucher-otp-inputs {
		gap: 6px;
	}
}
