/**
 * NewsMaker Ad Slot widget.
 */

.nm-ad-slot {
	--nm-ad-bg: transparent;
	--nm-ad-padding: 0;
	--nm-ad-margin: 18px auto;
	--nm-ad-radius: 0;
	--nm-ad-width: 728px;
	--nm-ad-height: 90px;
	--nm-ad-max-width: 728px;
	--nm-ad-min-height: 90px;
	--nm-ad-label-color: #667085;
	--nm-ad-label-bg: transparent;
	--nm-ad-label-border: transparent;
	--nm-ad-label-padding: 0;
	--nm-ad-label-margin: 0 0 6px;
	--nm-ad-label-radius: 0;
	--nm-ad-image-radius: 0;
	--nm-ad-object-fit: contain;
	background: var(--nm-ad-bg);
	margin: var(--nm-ad-margin);
	max-width: min(100%, var(--nm-ad-max-width));
	padding: var(--nm-ad-padding);
	width: var(--nm-ad-width);
}

.nm-ad-slot *,
.nm-ad-slot *::before,
.nm-ad-slot *::after {
	box-sizing: border-box;
}

.nm-ad-slot--align-left {
	margin-inline-start: 0;
	margin-inline-end: auto;
}

.nm-ad-slot--align-center {
	margin-inline-start: auto;
	margin-inline-end: auto;
}

.nm-ad-slot--align-right {
	margin-inline-start: auto;
	margin-inline-end: 0;
}

.nm-ad-slot--align-stretch {
	max-width: 100%;
	width: 100%;
}

.nm-ad-slot__inner {
	width: 100%;
}

.nm-ad-slot__frame {
	align-items: center;
	border-radius: var(--nm-ad-radius);
	display: flex;
	justify-content: center;
	min-height: var(--nm-ad-min-height);
	overflow: hidden;
	width: 100%;
}

.nm-ad-slot--label-inline .nm-ad-slot__frame {
	gap: 10px;
}

.nm-ad-slot__label {
	background: var(--nm-ad-label-bg);
	border: 1px solid var(--nm-ad-label-border);
	border-radius: var(--nm-ad-label-radius);
	color: var(--nm-ad-label-color);
	display: inline-flex;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.2;
	margin: var(--nm-ad-label-margin);
	padding: var(--nm-ad-label-padding);
	text-transform: uppercase;
}

.nm-ad-slot--label-bottom .nm-ad-slot__label {
	margin: 6px 0 0;
}

.nm-ad-slot__content {
	align-items: center;
	display: flex;
	justify-content: center;
	min-height: var(--nm-ad-min-height);
	width: 100%;
}

.nm-ad-slot__link {
	display: block;
	max-width: 100%;
	text-decoration: none;
}

.nm-ad-slot__image {
	border-radius: var(--nm-ad-image-radius);
	display: block;
	height: auto;
	max-height: var(--nm-ad-height);
	max-width: 100%;
	object-fit: var(--nm-ad-object-fit);
	width: auto;
}

.nm-ad-slot--align-stretch .nm-ad-slot__image,
.nm-ad-slot--size-fluid .nm-ad-slot__image {
	width: 100%;
}

.nm-ad-slot__placeholder {
	align-items: center;
	background: repeating-linear-gradient(
		-45deg,
		#f6f7f7,
		#f6f7f7 10px,
		#eef0f2 10px,
		#eef0f2 20px
	);
	border: 1px dashed #b8c0cc;
	color: #667085;
	display: flex;
	flex-direction: column;
	gap: 4px;
	justify-content: center;
	min-height: var(--nm-ad-min-height);
	padding: 14px;
	text-align: center;
	width: 100%;
}

.nm-ad-slot__placeholder strong {
	color: #344054;
	font-size: 13px;
}

.nm-ad-slot__placeholder span {
	font-size: 11px;
}

.nm-ad-slot--html .nm-ad-slot__content,
.nm-ad-slot--adsense .nm-ad-slot__content,
.nm-ad-slot--shortcode .nm-ad-slot__content {
	display: block;
	text-align: center;
}

.nm-ad-slot--html .nm-ad-slot__content > *,
.nm-ad-slot--adsense .nm-ad-slot__content > *,
.nm-ad-slot--shortcode .nm-ad-slot__content > * {
	max-width: 100%;
}

@media (min-width: 1025px) {
	.nm-ad-slot--hide-desktop {
		display: none !important;
	}
}

@media (min-width: 768px) and (max-width: 1024px) {
	.nm-ad-slot--hide-tablet {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.nm-ad-slot {
		margin-block: 14px;
		max-width: 100%;
		width: 100%;
	}

	.nm-ad-slot--hide-mobile {
		display: none !important;
	}

	.nm-ad-slot__frame,
	.nm-ad-slot__content,
	.nm-ad-slot__placeholder {
		min-height: min(var(--nm-ad-min-height), 280px);
	}

	.nm-ad-slot--label-inline .nm-ad-slot__frame {
		align-items: stretch;
		flex-direction: column;
		gap: 6px;
	}

	.nm-ad-slot__label {
		font-size: 10px;
	}

	.nm-ad-slot__image {
		height: auto;
		max-height: none;
		max-width: 100%;
	}
}
