/**
 * Lucky Wheel Frontend CSS.
 * Matches festive campaign design (11.11 / Black Friday / Promotion Lucky Wheel).
 */

:root {
	--tnstack-lw-bg: #2b0b0e;
	--tnstack-lw-bg-gradient: radial-gradient(circle at 75% 50%, #4a151b 0%, #290a0d 100%);
	--tnstack-lw-red: #d90429;
	--tnstack-lw-red-dark: #9e0018;
	--tnstack-lw-gold: #ffbe0b;
	--tnstack-lw-gold-dark: #b35300;
	--tnstack-lw-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Floating Launcher Button */
.tnstack-lw-launcher {
	position: fixed;
	bottom: 24px;
	z-index: 99998;
	animation: tnstack-lw-pulse 2.5s infinite;
}

.tnstack-lw-launcher--bottom-left {
	left: 24px;
}

.tnstack-lw-launcher--bottom-right {
	right: 24px;
}

.tnstack-lw-launcher__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 22px;
	background: linear-gradient(135deg, #e60012 0%, #a6000d 100%);
	color: #ffffff !important;
	border: 2px solid #ffd166;
	border-radius: 50px;
	font-family: var(--tnstack-lw-font);
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(217, 4, 41, 0.45), 0 0 0 4px rgba(255, 209, 102, 0.2);
	transition: all 0.25s ease;
}

.tnstack-lw-launcher__btn:hover {
	transform: translateY(-3px) scale(1.03);
	box-shadow: 0 12px 28px rgba(217, 4, 41, 0.6), 0 0 0 6px rgba(255, 209, 102, 0.35);
}

.tnstack-lw-launcher__icon {
	font-size: 20px;
	animation: tnstack-lw-bounce 1.5s infinite;
}

@keyframes tnstack-lw-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.05); }
}

@keyframes tnstack-lw-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-4px); }
}

/* Overlay & Backdrop */
.tnstack-lw-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: var(--tnstack-lw-font);
	box-sizing: border-box;
}

.tnstack-lw-overlay *,
.tnstack-lw-overlay *::before,
.tnstack-lw-overlay *::after {
	box-sizing: border-box;
}

.tnstack-lw-overlay--inline {
	position: relative;
	z-index: 10;
	padding: 0;
}

.tnstack-lw-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.78);
	backdrop-filter: blur(5px);
	animation: tnstack-lw-fadein 0.3s ease;
}

/* Modal Window */
.tnstack-lw-modal {
	position: relative;
	width: 100%;
	max-width: 960px;
	background: var(--tnstack-lw-bg);
	background-image: var(--tnstack-lw-bg-gradient);
	border-radius: 20px;
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
	color: #ffffff;
	overflow: hidden;
	animation: tnstack-lw-scalein 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	z-index: 2;
}

.tnstack-lw-overlay--inline .tnstack-lw-modal {
	max-width: 100%;
	animation: none;
}

@keyframes tnstack-lw-fadein {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes tnstack-lw-scalein {
	from { opacity: 0; transform: scale(0.92) translateY(15px); }
	to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Close Button */
.tnstack-lw-close {
	position: absolute;
	top: 14px;
	right: 16px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #ffffff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	transition: all 0.2s ease;
}

.tnstack-lw-close:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: rotate(90deg);
}

/* Modal Container (2-Column Layout) */
.tnstack-lw-container {
	display: flex;
	align-items: center;
	padding: 36px 40px;
	gap: 36px;
}

.tnstack-lw-left {
	flex: 1 1 45%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.tnstack-lw-right {
	flex: 1 1 55%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	position: relative;
}

/* Header Banner */
.tnstack-lw-header {
	text-align: center;
	margin-bottom: 24px;
}

.tnstack-lw-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #d90429;
	color: #ffffff;
	border: 2px solid #ffffff;
	border-radius: 6px;
	padding: 4px 14px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
	margin-bottom: 8px;
}

.tnstack-lw-badge__icon {
	color: #ffbe0b;
	font-size: 14px;
}

.tnstack-lw-title {
	font-size: 52px;
	font-weight: 900;
	line-height: 1.05;
	margin: 6px 0 10px 0;
	color: #ffbe0b;
	background: linear-gradient(180deg, #fff275 0%, #ffbe0b 55%, #fb5607 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	filter: drop-shadow(0 3px 0 #b35300) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
	letter-spacing: -1px;
	word-break: break-word;
}

.tnstack-lw-subbadge {
	display: inline-block;
	background: #fff3e6;
	color: #d90429;
	font-size: 14px;
	font-weight: 900;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding: 6px 18px;
	border-radius: 20px;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
	margin-bottom: 8px;
}

.tnstack-lw-highlight {
	font-size: 26px;
	font-weight: 900;
	margin: 8px 0 0 0;
	color: #ffffff;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	text-shadow: 0 2px 0 #b30000, 0 4px 8px rgba(0, 0, 0, 0.6);
}

/* Form Styles */
.tnstack-lw-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.tnstack-lw-form__field {
	position: relative;
}

.tnstack-lw-input {
	width: 100%;
	padding: 13px 22px;
	border-radius: 30px;
	background: #f1f2f4;
	border: 1px solid #e2e8f0;
	font-size: 14px;
	font-family: inherit;
	color: #1e293b;
	outline: none;
	transition: all 0.2s ease;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

.tnstack-lw-input:focus {
	background: #ffffff;
	border-color: #ffbe0b;
	box-shadow: 0 0 0 3px rgba(255, 190, 11, 0.35);
}

.tnstack-lw-input::placeholder {
	color: #94a3b8;
}

.tnstack-lw-error {
	background: rgba(220, 38, 38, 0.18);
	border: 1px solid #ef4444;
	color: #fecaca;
	padding: 10px 16px;
	border-radius: 12px;
	font-size: 13px;
	line-height: 1.4;
	animation: tnstack-lw-shake 0.4s ease;
}

@keyframes tnstack-lw-shake {
	0%, 100% { transform: translateX(0); }
	20%, 60% { transform: translateX(-6px); }
	40%, 80% { transform: translateX(6px); }
}

.tnstack-lw-btn-submit {
	width: 100%;
	padding: 14px 24px;
	border-radius: 30px;
	background: linear-gradient(180deg, #e60012 0%, #aa000c 100%);
	color: #ffffff;
	border: none;
	font-family: inherit;
	font-size: 15px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(230, 0, 18, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
	transition: all 0.2s ease;
	position: relative;
	overflow: hidden;
}

.tnstack-lw-btn-submit:hover:not(:disabled) {
	background: linear-gradient(180deg, #ff1a2b 0%, #b8000d 100%);
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(230, 0, 18, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.tnstack-lw-btn-submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

.tnstack-lw-dismiss-wrap {
	text-align: center;
	margin-top: 4px;
}

.tnstack-lw-dismiss {
	background: transparent;
	border: none;
	color: #d1c4c4;
	font-size: 13px;
	text-decoration: underline;
	cursor: pointer;
	transition: color 0.15s ease;
	padding: 4px 8px;
}

.tnstack-lw-dismiss:hover {
	color: #ffffff;
}

.tnstack-lw-note {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.65);
	font-style: italic;
	text-align: center;
	margin: 8px 0 0 0;
	line-height: 1.4;
}

/* Winner Result Card */
.tnstack-lw-result {
	text-align: center;
	padding: 16px 8px;
	animation: tnstack-lw-fadein 0.4s ease;
}

.tnstack-lw-result__badge {
	font-size: 20px;
	font-weight: 900;
	color: #ffbe0b;
	text-transform: uppercase;
	margin-bottom: 6px;
}

.tnstack-lw-result__desc {
	font-size: 14px;
	color: #e2e8f0;
	margin: 0 0 10px 0;
}

.tnstack-lw-result__prize {
	font-size: 28px;
	font-weight: 900;
	color: #ffffff;
	background: linear-gradient(180deg, #fff5d6 0%, #ffd166 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	filter: drop-shadow(0 2px 8px rgba(255, 209, 102, 0.5));
	margin-bottom: 16px;
	text-transform: uppercase;
}

.tnstack-lw-coupon-box {
	background: rgba(255, 255, 255, 0.1);
	border: 2px dashed #ffd166;
	border-radius: 12px;
	padding: 12px 16px;
	margin-bottom: 14px;
}

.tnstack-lw-coupon-box__label {
	display: block;
	font-size: 12px;
	color: #fbd588;
	margin-bottom: 6px;
	text-transform: uppercase;
	font-weight: 600;
}

.tnstack-lw-coupon-box__row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.tnstack-lw-coupon-box__code {
	font-size: 18px;
	font-weight: 800;
	color: #ffffff;
	background: rgba(0, 0, 0, 0.35);
	padding: 6px 14px;
	border-radius: 6px;
	letter-spacing: 1px;
}

.tnstack-lw-btn-copy {
	padding: 7px 14px;
	border-radius: 6px;
	background: #ffd166;
	color: #2b0b0e;
	border: none;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tnstack-lw-btn-copy:hover {
	background: #ffbe0b;
	transform: scale(1.05);
}

.tnstack-lw-result__note {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
	margin-bottom: 16px;
	line-height: 1.4;
}

.tnstack-lw-btn-shop {
	display: inline-block;
	padding: 12px 30px;
	border-radius: 30px;
	background: linear-gradient(180deg, #e60012 0%, #aa000c 100%);
	color: #ffffff !important;
	font-weight: 800;
	font-size: 14px;
	text-decoration: none;
	cursor: pointer;
	border: none;
	box-shadow: 0 4px 15px rgba(230, 0, 18, 0.4);
	transition: all 0.2s ease;
}

.tnstack-lw-btn-shop:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(230, 0, 18, 0.6);
}

/* Right Column: Wheel & Pointer */
.tnstack-lw-wheel-outer {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tnstack-lw-wheel-wrapper {
	position: relative;
	width: 440px;
	height: 440px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

#tnstack-lw-canvas {
	width: 440px;
	height: 440px;
	display: block;
	border-radius: 50%;
	filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.6));
}

/* Center Pin / Spin Hub */
.tnstack-lw-center {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 86px;
	height: 86px;
	border-radius: 50%;
	background: radial-gradient(circle, #fff7ed 0%, #fed7aa 60%, #fdba74 100%);
	border: 4px solid #f97316;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 5;
	padding: 0;
	transition: transform 0.15s ease;
}

.tnstack-lw-center:hover {
	transform: translate(-50%, -50%) scale(1.06);
}

.tnstack-lw-center__text {
	color: #d90429;
	font-size: 12px;
	font-weight: 900;
	line-height: 1.15;
	text-align: center;
	text-transform: uppercase;
	max-width: 65px;
	display: block;
}

/* Right Pointer Arrow (pointing directly into the wheel at 3 o'clock) */
.tnstack-lw-pointer {
	position: absolute;
	right: -8px;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	z-index: 6;
	pointer-events: none;
	filter: drop-shadow(-3px 2px 5px rgba(0, 0, 0, 0.4));
	transition: transform 0.08s ease;
}

.tnstack-lw-pointer--wiggle {
	transform: translateY(-50%) rotate(-8deg);
}

/* Social Proof & Marquee Ticker */
.tnstack-lw-social {
	width: 100%;
	max-width: 440px;
	text-align: center;
	margin-top: 14px;
}

.tnstack-lw-social__count {
	font-size: 15px;
	font-weight: 800;
	color: #ffffff;
	margin-bottom: 8px;
}

.tnstack-lw-social__number {
	color: #ffd166;
	font-size: 17px;
}

.tnstack-lw-ticker {
	width: 100%;
	background: rgba(0, 0, 0, 0.35);
	border-radius: 20px;
	padding: 6px 14px;
	overflow: hidden;
	white-space: nowrap;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.tnstack-lw-ticker__track {
	display: inline-block;
	white-space: nowrap;
	animation: tnstack-lw-marquee 30s linear infinite;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.85);
}

@keyframes tnstack-lw-marquee {
	0% { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

/* Confetti Burst Overlay */
.tnstack-lw-confetti {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 20;
}

/* Responsive adjustments */
@media (max-width: 900px) {
	.tnstack-lw-container {
		padding: 30px 24px;
		gap: 24px;
	}

	.tnstack-lw-title {
		font-size: 42px;
	}

	.tnstack-lw-highlight {
		font-size: 22px;
	}

	.tnstack-lw-wheel-wrapper,
	#tnstack-lw-canvas {
		width: 360px;
		height: 360px;
	}

	.tnstack-lw-center {
		width: 74px;
		height: 74px;
	}

	.tnstack-lw-center__text {
		font-size: 11px;
	}
}

@media (max-width: 768px) {
	.tnstack-lw-overlay {
		padding: 10px;
		align-items: flex-start;
		overflow-y: auto;
	}

	.tnstack-lw-modal {
		margin: 20px auto;
		border-radius: 16px;
	}

	.tnstack-lw-container {
		flex-direction: column-reverse;
		padding: 24px 16px;
		gap: 20px;
	}

	.tnstack-lw-title {
		font-size: 34px;
	}

	.tnstack-lw-highlight {
		font-size: 20px;
	}

	.tnstack-lw-wheel-wrapper,
	#tnstack-lw-canvas {
		width: 310px;
		height: 310px;
	}

	.tnstack-lw-center {
		width: 66px;
		height: 66px;
	}

	.tnstack-lw-center__text {
		font-size: 10px;
	}

	.tnstack-lw-pointer {
		width: 32px;
		height: 32px;
		right: -6px;
	}

	.tnstack-lw-pointer svg {
		width: 32px;
		height: 32px;
	}

	.tnstack-lw-social {
		max-width: 310px;
	}
}

