/**
 * Banner Ads Styling
 * Responsive design for desktop (728x90) and mobile (320x50) ad placements
 * @package theme-movie-manager
 * @since 2026
 * 
 * NOTE: Old complex banner CSS has been replaced with simple .ads-section class
 * See main.css for new ad section styling
 * ============================================================================ */

/* ============================================================================
 * POPUNDER ADS - Advanced Pop-Under Advertisement System
 * Features: Exit intent, rate limiting, responsive, accessible
 * NO BACKGROUND - Just ad + close button in center-bottom
 * ============================================================================ */

#mmp-popunder-wrapper {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9998;
	display: none;
	opacity: 0;
	transform: translateY(100%);
	transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	pointer-events: none;
	background: transparent;
	padding: 0;
	margin: 0;
	border: none;
}

/* Show state - fully visible */
#mmp-popunder-wrapper.shown {
	display: flex;
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
	justify-content: center;
	align-items: flex-end;
	flex-direction: column;
}

/* Main popunder container - NO BACKGROUND */
.mmp-popunder-container {
	position: relative;
	z-index: 9999;
	background: transparent;
	border: none;
	box-shadow: none;
	max-width: 100%;
	width: auto;
	min-height: auto;
	max-height: none;
	overflow: visible;
	display: flex;
	flex-direction: column;
	animation: slideUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
	box-sizing: border-box;
	padding: 0;
	margin-bottom: 10px;
	margin-right: 10px;
	align-items: center;
	position: relative;
}

@keyframes slideUp {
	from {
		transform: translateY(100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* Close button */
.mmp-popunder-close {
	position: absolute;
	top: -30px;
	right: 0;
	width: 28px;
	height: 28px;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 50%;
	color: #333;
	font-size: 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	transition: all 0.3s ease;
	padding: 0;
	line-height: 1;
}

.mmp-popunder-close:hover {
	background: rgba(255, 255, 255, 1);
	transform: scale(1.1);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mmp-popunder-close:active {
	transform: scale(0.95);
}

/* Content area - Ad only */
.mmp-popunder-content {
	flex: 1;
	overflow: visible;
	padding: 0;
	width: auto;
	display: flex;
	justify-content: center;
	align-items: center;
}

/* Responsive for all screen sizes */
@media (max-width: 1024px) {
	.mmp-popunder-container {
		margin-bottom: 5px;
		margin-right: 5px;
	}
}

/* Responsive adjustments for tablets */
@media (max-width: 768px) {
	.mmp-popunder-container {
		width: auto;
		max-width: calc(100% - 10px);
		margin: 5px;
	}

	.mmp-popunder-close {
		top: -25px;
		width: 24px;
		height: 24px;
		font-size: 16px;
	}
}

/* Responsive adjustments for mobile */
@media (max-width: 480px) {
	#mmp-popunder-wrapper {
		padding: 5px;
	}

	.mmp-popunder-container {
		width: calc(100% - 10px);
		max-width: 100%;
		margin: 0 auto 5px auto;
	}

	.mmp-popunder-close {
		top: -22px;
		width: 22px;
		height: 22px;
		font-size: 14px;
	}

	.mmp-popunder-content {
		width: 100%;
		max-height: 50vh;
		overflow-y: auto;
	}
}

/* Hide popunder on very small screens (under 280px) */
@media (max-width: 280px) {
	.mmp-popunder-container {
		display: none;
	}
}

/* Print media - hide popunder when printing */
@media print {
	#mmp-popunder-wrapper,
	.mmp-popunder-container {
		display: none !important;
	}
}

/* Accessibility - reduce motion */
@media (prefers-reduced-motion: reduce) {
	#mmp-popunder-wrapper,
	.mmp-popunder-container,
	.mmp-popunder-close {
		transition: none;
		animation: none;
	}
}

/* Legacy fallback - hide old overlay styling if any */
.mmp-popunder-overlay {
	display: none !important;
}
.popunder-container *,
.popunder-wrapper * {
	max-width: 100%;
	overflow-x: auto;
}
