/**
 * NB Designer — Vorlagen-Sidebar: responsive Vorschaubilder ohne Beschnitt.
 */
#tab-product-template .result-loaded .content-items .item-img,
#tab-product-template .nbd-templates .item .item-img,
.template-tags-wrap .result-loaded .item-img {
	display: block;
	overflow: hidden;
	background: #eef0f2;
	border-radius: 4px;
	line-height: 0;
	aspect-ratio: unset;
	width: 100%;
	max-width: 100%;
	height: auto;
	min-height: 0;
	padding: 0;
	container-type: inline-size;
}

#tab-product-template .result-loaded .content-items .item-img img,
#tab-product-template .nbd-templates .item .item-img img,
.template-tags-wrap .result-loaded .item-img img {
	display: block !important;
	width: 100% !important;
	height: auto !important;
	max-width: 100% !important;
	max-height: none !important;
	object-fit: unset !important;
	object-position: center center !important;
	border-radius: 4px;
	background: transparent !important;
	vertical-align: top;
}

#tab-product-template .result-loaded .content-items .item-img.tma-am-tpl-thumb-ready,
#tab-product-template .nbd-templates .item .item-img.tma-am-tpl-thumb-ready,
.template-tags-wrap .result-loaded .item-img.tma-am-tpl-thumb-ready {
	aspect-ratio: var(--tma-am-tpl-ratio, auto);
	width: 100%;
	max-width: 100%;
	max-height: clamp(80px, 22vh, 180px);
}

#tab-product-template .result-loaded .content-items .item-img.tma-am-tpl-thumb-ready img,
#tab-product-template .nbd-templates .item .item-img.tma-am-tpl-thumb-ready img,
.template-tags-wrap .result-loaded .item-img.tma-am-tpl-thumb-ready img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain !important;
}

@container (max-width: 120px) {
	#tab-product-template .result-loaded .content-items .item-img.tma-am-tpl-thumb-ready,
	#tab-product-template .nbd-templates .item .item-img.tma-am-tpl-thumb-ready,
	.template-tags-wrap .result-loaded .item-img.tma-am-tpl-thumb-ready {
		max-height: clamp(72px, 20vh, 140px);
	}
}

#tab-product-template .nbd-templates .items .item .main-item.global {
	padding-top: 0 !important;
	height: auto !important;
}

#tab-product-template .nbd-templates .item .main-item.global .item-img,
#tab-product-template .nbd-templates .items .item .main-item.global .item-img {
	position: relative !important;
	inset: auto !important;
	width: 100% !important;
}

#tab-product-template .nbd-templates .items .item,
#tab-product-template .result-loaded .content-items .item {
	height: auto !important;
}
