/**
 * Adify front-end styles. Tiny and theme-agnostic: ad containers, the label,
 * responsive device hiding, sticky bars and the sticky sidebar.
 */

.adify-ad {
	display: block;
	margin: 1.4em auto;
	clear: both;
	max-width: 100%;
}
.adify-ad--center { text-align: center; }
.adify-ad--left { text-align: left; }
.adify-ad--right { text-align: right; }

.adify-ad__label {
	display: block;
	margin-bottom: 4px;
	font-size: 11px;
	line-height: 1.4;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.55;
}

.adify-ad__code,
.adify-ad__frame,
.adify-ad__placeholder {
	display: inline-block;
	max-width: 100%;
}
.adify-ad__frame { border: 0; }
.adify-ad__placeholder { width: 100%; }

/* Cache-safe device targeting: the wrong-device copy is display:none, so a
   lazy ad inside it never enters the viewport and never loads. */
@media (max-width: 781px) {
	.adify-ad--desktop-only { display: none !important; }
}
@media (min-width: 782px) {
	.adify-ad--mobile-only { display: none !important; }
}

/* ---- Sticky header / footer bars ---- */
.adify-sticky {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px 34px;
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 0 0 16px rgba(0, 0, 0, 0.16);
	box-sizing: border-box;
}
.adify-sticky--top { top: 0; border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.adify-sticky--bottom { bottom: 0; border-top: 1px solid rgba(0, 0, 0, 0.08); }
.adify-sticky__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	overflow: hidden;
}
.adify-sticky .adify-ad { margin: 0 auto; }
.adify-sticky .adify-ad__label { margin-bottom: 0; font-size: 9px; }
.adify-sticky__close {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	border: 0;
	border-radius: 50%;
	background: #111;
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.85;
	padding: 0;
}
.adify-sticky__close:hover { opacity: 1; }
.adify-sticky--hidden { display: none !important; }

/* ---- Sticky sidebar ---- */
.adify-sidebar-ad { margin: 0 0 20px; }
.adify-sidebar-ad:last-child { margin-bottom: 0; }
.adify-sidebar-ad--sticky {
	position: -webkit-sticky;
	position: sticky;
	top: 90px;
	overflow-anchor: none;
}
