/**
 * Promo SDK Source CSS - Premium Design
 *
 * @package PromoSDK
 */

@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom component styles */
@layer components {
	.ps-modal {
		@apply ps-fixed ps-inset-0 ps-z-modal ps-flex ps-items-center ps-justify-center;
		animation: ps-fadeIn 0.3s ease-out;
	}

	.ps-modal-overlay {
		@apply ps-absolute ps-inset-0 ps-bg-black ps-bg-opacity-60;
		backdrop-filter: blur(4px);
	}

	.ps-modal-container {
		@apply ps-relative ps-z-10 ps-w-full ps-max-w-lg ps-mx-4;
	}

	.ps-modal-content {
		@apply ps-rounded-2xl ps-shadow-2xl ps-overflow-hidden;
		animation: ps-slideUp 0.4s ease-out;
	}

	.ps-modal-close {
		@apply ps-absolute ps-top-4 ps-right-4 ps-text-white ps-text-3xl ps-leading-none ps-cursor-pointer ps-z-20 ps-transition-opacity;
		text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	}

	.ps-countdown-value {
		@apply ps-font-mono ps-tabular-nums;
	}

	.ps-notice {
		position: fixed !important;
		bottom: 0 !important;
		left: 160px !important;
		right: 0 !important;
		z-index: 100 !important;
		margin: 0 !important;
		overflow: hidden !important;
		animation: ps-fadeIn 0.4s ease-out;
		padding: 0 !important;
	}

	/* Adjust for folded admin menu */
	@media screen and (max-width: 960px) {
		.ps-notice {
			left: 36px !important;
		}
	}

	/* Adjust for mobile - no sidebar */
	@media screen and (max-width: 782px) {
		.ps-notice {
			left: 0 !important;
		}
	}

	/* When admin menu is folded */
	body.folded .ps-notice {
		left: 36px !important;
	}

}

/* Custom animations */
@keyframes ps-fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes ps-slideUp {
	from {
		opacity: 0;
		transform: translateY(30px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes ps-slideDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}


/* Black Friday Notice Styles */
.ps-notice-wave {
	position: relative;
	width: 100%;
	height: 100px;
	background: linear-gradient(90deg, #a855f7 0%, #7c3aed 100%);
}

.ps-notice-wave::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #f4f7ff;
	border-radius: 0 0 80px 80px;
}

.ps-notice-bar {
	position: relative;
	background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
	background-size: 400% 400%;
	animation: ps-promo-flow 30s ease-in-out infinite;
	z-index: 1;
	box-shadow: 0 -4px 30px rgba(102, 126, 234, 0.4);
}

.ps-notice-inner {
	max-width: 1140px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.ps-timer-number {
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 8px;
	padding: 6px 10px;
	font-size: 22px;
	font-weight: 700;
	color: #ffffff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(10px);
}

.ps-timer-label {
	color: #ffffff66;
	font-size: 17px;
	margin-left: 2px;
}

/* WordPress Dismiss Button Styling */
.ps-notice .notice-dismiss {
	position: absolute !important;
	top: auto !important;
	bottom: 20px !important;
	right: 20px !important;
	padding: 0 !important;
	background: none !important;
	border: none !important;
	cursor: pointer !important;
	color: #ffffff80 !important;
	z-index: 10 !important;
}

.ps-notice .notice-dismiss:before {
	color: #ffffff80 !important;
	font-size: 20px !important;
	transition: color 0.2s ease !important;
}

.ps-notice .notice-dismiss:hover:before {
	color: #ffffff !important;
}

/* Timer glow animation for urgency */
@keyframes ps-countdown-glow {
	0%, 100% {
		transform: scale(1);
		text-shadow: 0 0 5px rgba(246, 255, 0, 0.5);
	}
	50% {
		transform: scale(1.1);
		text-shadow: 0 0 15px rgba(246, 255, 0, 0.8), 0 0 25px rgba(246, 255, 0, 0.4);
	}
}

/* Button animations */
@keyframes ps-arrow-slide {
	0%, 100% {
		transform: translateX(0);
	}
	50% {
		transform: translateX(5px);
	}
}

.ps-arrow-bounce {
	display: inline-block;
	animation: ps-arrow-slide 1s ease-in-out infinite;
}

/* Button pulse animation */
@keyframes ps-cta-pulse {
	0% {
		transform: scale(1);
	}
	14% {
		transform: scale(1.05);
	}
	28% {
		transform: scale(1);
	}
	42% {
		transform: scale(1.05);
	}
	70% {
		transform: scale(1);
	}
}

.ps-cta-button {
	position: relative;
	overflow: hidden;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
	animation: ps-cta-pulse 2s ease-in-out infinite !important;
	box-shadow: 0 4px 15px rgba(116, 40, 248, 0.3), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ps-cta-button::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
	transition: left 0.6s ease;
}

.ps-cta-button::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 12px;
	padding: 2px;
	background: linear-gradient(135deg, rgba(116, 40, 248, 0.5), rgba(246, 255, 0, 0.3));
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.ps-cta-button:hover::before {
	left: 100%;
}

.ps-cta-button:hover::after {
	opacity: 1;
}

.ps-cta-button:hover {
	animation: none !important;
	transform: translateY(-3px) scale(1.05) !important;
	box-shadow: 0 8px 30px rgba(116, 40, 248, 0.4), 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

/* Enhanced gradient flow animation with multiple stops */
@keyframes ps-promo-flow {
	0% {
		background-position: 0% 50%;
	}
	25% {
		background-position: 50% 100%;
	}
	50% {
		background-position: 100% 50%;
	}
	75% {
		background-position: 50% 0%;
	}
	100% {
		background-position: 0% 50%;
	}
}

/* Blur utility for backdrop */
@layer utilities {
	.ps-blur-3xl {
		filter: blur(64px);
	}

	.ps-backdrop-blur-sm {
		backdrop-filter: blur(4px);
	}
}
