/**
 * Frontend Styles for WAMY Promotional Flyer Popup
 */

:root {
	--wamy-flyer-primary: #047857;
	--wamy-flyer-primary-dark: #065f46;
	--wamy-flyer-gold: #f59e0b;
	--wamy-flyer-whatsapp: #25D366;
	--wamy-flyer-whatsapp-dark: #1da851;
}

/* Modal Overlay */
.wamy-flyer-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
}

.wamy-flyer-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

/* Glassmorphism Backdrop */
.wamy-flyer-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.78);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	cursor: pointer;
}

/* Modal Dialog Box */
.wamy-flyer-container {
	position: relative;
	z-index: 2;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15);
	max-width: 500px;
	width: 100%;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: scale(0.92) translateY(12px);
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.wamy-flyer-overlay.is-visible .wamy-flyer-container {
	transform: scale(1) translateY(0);
}

/* Touch-friendly Close Button */
.wamy-flyer-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 20;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.65);
	color: #ffffff;
	border: 2px solid rgba(255, 255, 255, 0.85);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	box-shadow: 0 4px 12px rgba(0,0,0,0.3);
	padding: 0;
}

.wamy-flyer-close:hover,
.wamy-flyer-close:focus {
	background: rgba(220, 38, 38, 0.9);
	color: #ffffff;
	transform: scale(1.08);
	outline: none;
}

/* Countdown Bar */
.wamy-flyer-countdown-bar {
	background: linear-gradient(135deg, #065f46 0%, #047857 100%);
	color: #ffffff;
	padding: 12px 16px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	border-bottom: 2px solid var(--wamy-flyer-gold);
}

.wamy-cd-label {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.3px;
	color: #fef08a;
	text-transform: uppercase;
}

.wamy-cd-ticker {
	display: flex;
	align-items: center;
	gap: 6px;
	font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.wamy-cd-box {
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	padding: 4px 8px;
	min-width: 44px;
	text-align: center;
}

.wamy-cd-box span {
	display: block;
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	line-height: 1.2;
}

.wamy-cd-box small {
	display: block;
	font-size: 9px;
	color: #d1fae5;
	text-transform: uppercase;
	font-weight: 500;
}

.wamy-cd-sep {
	font-weight: 700;
	color: var(--wamy-flyer-gold);
	font-size: 14px;
}

/* Flyer Image Area */
.wamy-flyer-media {
	flex: 1;
	overflow-y: auto;
	background: #0f172a;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	max-height: 60vh;
}

.wamy-flyer-link {
	display: block;
	width: 100%;
	text-decoration: none;
}

.wamy-flyer-img {
	width: 100%;
	height: auto;
	max-height: 60vh;
	object-fit: contain;
	display: block;
	margin: 0 auto;
}

/* Action Buttons Bar */
.wamy-flyer-actions {
	display: flex;
	gap: 10px;
	padding: 14px 16px;
	background: #ffffff;
	border-top: 1px solid #f1f5f9;
}

.wamy-btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(0,0,0,0.08);
	cursor: pointer;
	box-sizing: border-box;
}

.wamy-btn-whatsapp {
	background: var(--wamy-flyer-whatsapp);
	color: #ffffff !important;
}

.wamy-btn-whatsapp:hover {
	background: var(--wamy-flyer-whatsapp-dark);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.wamy-btn-cta {
	background: linear-gradient(135deg, #047857 0%, #065f46 100%);
	color: #ffffff !important;
}

.wamy-btn-cta:hover {
	background: linear-gradient(135deg, #065f46 0%, #047857 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3);
}

.wamy-btn-icon {
	flex-shrink: 0;
}

/* Responsive Scaling for Small Screens */
@media (max-width: 480px) {
	.wamy-flyer-container {
		max-width: 95vw;
		border-radius: 12px;
	}

	.wamy-flyer-countdown-bar {
		padding: 10px;
	}

	.wamy-cd-label {
		font-size: 11px;
	}

	.wamy-cd-box {
		min-width: 36px;
		padding: 3px 5px;
	}

	.wamy-cd-box span {
		font-size: 14px;
	}

	.wamy-flyer-actions {
		flex-direction: column;
		padding: 12px;
	}

	.wamy-btn {
		width: 100%;
		padding: 10px 14px;
	}
}

/* ─── Full-Screen Mode Overrides ─────────────────────────────────────────── */
.wamy-flyer-overlay.wamy-flyer-fullscreen {
	padding: 0;
}

.wamy-flyer-overlay.wamy-flyer-fullscreen .wamy-flyer-container {
	max-width: 100vw;
	width: 100vw;
	height: 100vh;
	max-height: 100vh;
	border-radius: 0;
	border: none;
	box-shadow: none;
	background: #0f172a;
}

.wamy-flyer-overlay.wamy-flyer-fullscreen .wamy-flyer-close {
	top: 16px;
	right: 16px;
	width: 44px;
	height: 44px;
	font-size: 28px;
	background: rgba(0, 0, 0, 0.8);
	border-color: #ffffff;
}

.wamy-flyer-overlay.wamy-flyer-fullscreen .wamy-flyer-media {
	max-height: calc(100vh - 130px);
	height: 100%;
	background: #0f172a;
	padding: 10px 0;
}

.wamy-flyer-overlay.wamy-flyer-fullscreen .wamy-flyer-img {
	max-height: 100%;
	height: 100%;
	width: 100%;
	object-fit: contain;
}

.wamy-flyer-overlay.wamy-flyer-fullscreen .wamy-flyer-actions {
	background: #1e293b;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding: 16px 24px;
	max-width: 600px;
	margin: 0 auto;
	width: 100%;
	border-radius: 12px 12px 0 0;
}

/* ─── Half-Screen Mode Overrides (50% Viewport Banner) ────────────────── */
.wamy-flyer-overlay.wamy-flyer-halfscreen {
	align-items: flex-end;
	justify-content: center;
	padding: 0 16px 16px 16px;
}

.wamy-flyer-overlay.wamy-flyer-halfscreen .wamy-flyer-container {
	max-width: 680px;
	width: 100%;
	max-height: 52vh;
	border-radius: 16px;
	box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
	background: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.wamy-flyer-overlay.wamy-flyer-halfscreen .wamy-flyer-media {
	max-height: 32vh;
	background: #0f172a;
}

.wamy-flyer-overlay.wamy-flyer-halfscreen .wamy-flyer-img {
	max-height: 32vh;
	object-fit: contain;
}

.wamy-flyer-overlay.wamy-flyer-halfscreen .wamy-flyer-actions {
	padding: 10px 14px;
}


