/**
 * Simple Ad Styling
 * Google AdSense/AdManager Compliant
 * Better Ads Standard Compliant
 *
 * @package HTG
 * @since 2.2.0
 */

/* ===================================
   Ad Container
   =================================== */
.HTG-ad-container {
	margin: 30px 0;
	padding: 0;
	text-align: center;
	clear: both;
	overflow: hidden;
}

/* Policy-compliant spacing */
.HTG-ad-container + .HTG-ad-container {
	margin-top: 50px; /* Minimum spacing between ads */
}

/* ===================================
   Ad Label (Required by AdSense)
   =================================== */
.HTG-ad-label {
	display: block;
	font-size: 10px;
	font-size: 0.625rem;
	text-transform: uppercase;
	color: #999;
	margin-bottom: 8px;
	letter-spacing: 1px;
	font-weight: 600;
}

/* Dark mode */
body.HTG-dark-mode .HTG-ad-label {
	color: #666;
}

/* ===================================
   Ad Slot
   =================================== */
.HTG-ad-slot {
	min-height: 50px; /* Prevent layout shift */
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
}

/* Ensure responsive ads work */
.HTG-ad-slot ins {
	display: block !important;
	text-align: center;
}

/* ===================================
   Header Ad Placement
   =================================== */
.HTG-ad-header_top {
	margin: 20px 0;
	padding: 20px 0;
	border-bottom: 1px solid #f0f0f0;
}

body.HTG-dark-mode .HTG-ad-header_top {
	border-bottom-color: #2a2a2a;
}

/* ===================================
   Homepage Ad Placements
   =================================== */
.HTG-ad-homepage_top {
	margin: 40px 0;
}

/* ===================================
   Post Ad Placements
   =================================== */
.HTG-ad-post_top {
	margin: 30px 0;
}

.HTG-ad-post_content_middle {
	margin: 40px 0;
	padding: 30px 0;
	border-top: 1px solid #f0f0f0;
	border-bottom: 1px solid #f0f0f0;
}

body.HTG-dark-mode .HTG-ad-post_content_middle {
	border-color: #2a2a2a;
}

.HTG-ad-post_bottom {
	margin: 40px 0 30px;
	padding: 30px 0;
	border-top: 1px solid #f0f0f0;
}

body.HTG-dark-mode .HTG-ad-post_bottom {
	border-top-color: #2a2a2a;
}

/* ===================================
   Sidebar Ad Placements
   =================================== */
.HTG-ad-sidebar_top,
.HTG-ad-sidebar_middle {
	margin: 0 0 30px 0;
}

/* Sticky sidebar ads (optional) */
.HTG-ad-sidebar_top.sticky {
	position: sticky;
	top: 100px;
	z-index: 10;
}

/* ===================================
   Footer Ad Placement
   =================================== */
.HTG-ad-footer_top {
	margin: 50px 0 30px;
	padding: 30px 0;
	border-top: 2px solid #f0f0f0;
}

body.HTG-dark-mode .HTG-ad-footer_top {
	border-top-color: #2a2a2a;
}

/* ===================================
   Responsive Behavior
   =================================== */
@media (max-width: 768px) {
	.HTG-ad-container {
		margin: 20px 0;
	}
	
	/* Reduce spacing on mobile */
	.HTG-ad-container + .HTG-ad-container {
		margin-top: 30px;
	}
	
	/* Adjust padding */
	.HTG-ad-post_content_middle,
	.HTG-ad-post_bottom,
	.HTG-ad-footer_top {
		padding: 20px 0;
	}
}

/* ===================================
   Better Ads Standard Compliance
   =================================== */

/* NO pop-ups */
/* NO pop-unders */
/* NO prestitial ads */
/* NO auto-play video with sound */
/* NO large sticky ads */
/* NO flashing animated ads */
/* NO full-screen scroll-over ads */

/* Ensure no intrusive ad formats */
.HTG-ad-slot > iframe,
.HTG-ad-slot > ins {
	max-width: 100%;
	height: auto;
}

/* ===================================
   AdSense Auto Ads Support
   =================================== */
.adsbygoogle {
	display: block;
	text-align: center;
}

/* ===================================
   Loading State
   =================================== */
.HTG-ad-slot:empty::after {
	content: '';
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 2px solid #f0f0f0;
	border-top-color: #1a1f36;
	border-radius: 50%;
	animation: HTG-ad-spin 0.8s linear infinite;
}

@keyframes HTG-ad-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ===================================
   Print Styles
   =================================== */
@media print {
	.HTG-ad-container,
	.HTG-ad-label,
	.HTG-ad-slot {
		display: none !important;
	}
}

/* ===================================
   Accessibility
   =================================== */
.HTG-ad-container[aria-hidden="true"] {
	display: none;
}

/* Focus states for interactive ads */
.HTG-ad-slot a:focus {
	outline: 2px solid #00d4aa;
	outline-offset: 2px;
}

/* ===================================
   Performance Optimization
   =================================== */

/* GPU acceleration for animations */
.HTG-ad-slot {
	will-change: contents;
	transform: translateZ(0);
}

/* Prevent layout shifts */
.HTG-ad-slot[style*="height"] {
	min-height: attr(style);
}

/* ===================================
   End of Simple Ads CSS
   =================================== */
