/**
 * ST Dollar Shop - Luxury Promo Popup Stylesheet
 *
 * Responsive, Glassmorphic, Accessible Modal Styles
 *
 * @package ST_Dollar_Shop
 * @version 1.0.0
 */

/* ==========================================================================
   1. Popup Root & Backdrop Container
   ========================================================================== */
.st-promo-popup {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100vw;
	height: 100vh;
	z-index: 10000005 !important;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	box-sizing: border-box;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
}

.st-promo-popup--active {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

/* Prevent PWA Smart Banner and other fixed floating elements from clashing with Promo Popup */
body.st-promo-popup-open #st-pwa-smart-banner,
body.st-promo-popup-open .st-pwa-smart-banner {
	opacity: 0 !important;
	pointer-events: none !important;
	visibility: hidden !important;
	transition: opacity 0.25s ease !important;
}

.st-promo-popup__backdrop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	cursor: pointer;
}

/* ==========================================================================
   2. Dialog Card Architecture
   ========================================================================== */
.st-promo-popup__card {
	position: relative;
	width: 100%;
	max-width: 440px;
	background: #ffffff;
	border-radius: 20px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
	overflow: hidden;
	z-index: 2;
	transform: scale(0.92) translateY(20px);
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	direction: rtl;
	text-align: right;
	outline: none;
}

.st-promo-popup--active .st-promo-popup__card {
	transform: scale(1) translateY(0);
}

/* ==========================================================================
   3. Close Button
   ========================================================================== */
.st-promo-popup__close {
	position: absolute;
	top: 14px;
	left: 14px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid rgba(0, 0, 0, 0.08);
	color: #475569;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 10;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.st-promo-popup__close:hover {
	background: #ffffff;
	color: #0f172a;
	transform: scale(1.08);
}

.st-promo-popup__close:focus-visible {
	outline: 2px solid #32BCD6;
	outline-offset: 2px;
}

/* ==========================================================================
   4. Media Banner
   ========================================================================== */
.st-promo-popup__media {
	width: 100%;
	height: 200px;
	background: #f1f5f9;
	overflow: hidden;
	position: relative;
}

.st-promo-popup__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}

.st-promo-popup__card:hover .st-promo-popup__media img {
	transform: scale(1.03);
}

/* ==========================================================================
   5. Content Body & Elements
   ========================================================================== */
.st-promo-popup__body {
	padding: 1.5rem 1.75rem 1.75rem 1.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.st-promo-popup__badge {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.85rem;
	font-size: 0.78rem;
	font-weight: 700;
	color: #ffffff;
	background: linear-gradient(135deg, #F18E29 0%, #D97706 100%);
	border-radius: 9999px;
	box-shadow: 0 2px 8px rgba(241, 142, 41, 0.3);
}

.st-promo-popup__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 800;
	color: #0f172a;
	line-height: 1.4;
}

.st-promo-popup__desc {
	margin: 0;
	font-size: 0.92rem;
	color: #64748b;
	line-height: 1.6;
}

/* Price styling */
.st-promo-popup__price {
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
	margin-top: 0.25rem;
	font-size: 1.15rem;
}

.st-promo-popup__price del {
	color: #94a3b8;
	font-size: 0.95rem;
	text-decoration: line-through;
}

.st-promo-popup__price ins {
	color: #32BCD6;
	font-weight: 800;
	font-size: 1.35rem;
	text-decoration: none;
}

/* ==========================================================================
   6. Action Buttons
   ========================================================================== */
.st-promo-popup__actions {
	margin-top: 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.st-promo-popup__cta {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.85rem 1.5rem;
	background: linear-gradient(135deg, #32BCD6 0%, #1A9CB5 100%);
	color: #ffffff !important;
	font-size: 1rem;
	font-weight: 700;
	border-radius: 12px;
	text-decoration: none !important;
	box-shadow: 0 4px 14px rgba(50, 188, 214, 0.35);
	transition: all 0.25s ease;
	animation: stCtaGlowPulse 4s ease-in-out infinite;
}

/* Subtle Shimmer Light Sweep (Pure CSS, Non-intrusive) */
.st-promo-popup__cta::after {
	content: '';
	position: absolute;
	top: -50%;
	right: -80%;
	width: 50%;
	height: 200%;
	background: linear-gradient(
		to right,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.25) 50%,
		rgba(255, 255, 255, 0) 100%
	);
	transform: rotate(25deg);
	pointer-events: none;
	animation: stCtaShimmer 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes stCtaShimmer {
	0%, 65% {
		right: -80%;
		opacity: 0;
	}
	70% {
		opacity: 1;
	}
	90% {
		right: 150%;
		opacity: 1;
	}
	95%, 100% {
		right: 150%;
		opacity: 0;
	}
}

@keyframes stCtaGlowPulse {
	0%, 100% {
		box-shadow: 0 4px 14px rgba(50, 188, 214, 0.35);
	}
	50% {
		box-shadow: 0 6px 20px rgba(50, 188, 214, 0.5), 0 0 15px rgba(50, 188, 214, 0.25);
	}
}

.st-promo-popup__cta:hover {
	background: linear-gradient(135deg, #1A9CB5 0%, #137C91 100%);
	box-shadow: 0 6px 22px rgba(50, 188, 214, 0.55);
	transform: translateY(-2px);
}

.st-promo-popup__cta svg {
	transition: transform 0.25s ease;
	position: relative;
	z-index: 2;
}

.st-promo-popup__cta:hover svg {
	transform: translateX(-4px);
}

.st-promo-popup__cta:focus-visible {
	outline: 2px solid #0f172a;
	outline-offset: 2px;
}

.st-promo-popup__never {
	background: none;
	border: none;
	padding: 0.4rem;
	color: #94a3b8;
	font-size: 0.82rem;
	cursor: pointer;
	transition: color 0.2s ease;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.st-promo-popup__never:hover {
	color: #64748b;
}

.st-promo-popup__never:focus-visible {
	outline: 2px solid #32BCD6;
	outline-offset: 2px;
}

/* ==========================================================================
   7. Accessibility & Responsive Adjustments
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	.st-promo-popup,
	.st-promo-popup__card,
	.st-promo-popup__media img,
	.st-promo-popup__cta,
	.st-promo-popup__close {
		transition: none !important;
		transform: none !important;
	}
}

@media (max-width: 480px) {
	.st-promo-popup {
		padding: 1rem;
	}
	.st-promo-popup__card {
		max-width: 100%;
		border-radius: 16px;
	}
	.st-promo-popup__media {
		height: 160px;
	}
	.st-promo-popup__body {
		padding: 1.25rem;
	}
	.st-promo-popup__title {
		font-size: 1.125rem;
	}
}
