/**
 * Badge Master — frontend styles.
 */

.bgbm-anchor {
	position: relative;
	display: block;
}

/* When relocated inside the image container, the anchor must overlay it fully
   without affecting layout. */
.bgbm-anchor[data-bgbm-done="1"] {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	display: block;
	margin: 0;
	padding: 0;
}

.woocommerce ul.products li.product .bgbm-anchor,
.woocommerce-page ul.products li.product .bgbm-anchor {
	position: static;
}

.bgbm-badges {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
}

/* Ensure the product image wrapper is the positioning context. */
.woocommerce ul.products li.product a img,
.woocommerce div.product div.images {
	position: relative;
}

.bgbm-badge {
	pointer-events: auto;
	box-sizing: border-box;
	max-width: 90%;
	overflow: hidden;
	text-overflow: ellipsis;
	z-index: inherit;
}

.bgbm-badge-image {
	display: block;
	max-width: 100%;
	height: auto;
}

.bgbm-type-image {
	background: transparent !important;
	padding: 0 !important;
	border: 0 !important;
}

.bgbm-shape-ribbon {
	position: relative;
}

/* Context tweaks */
.bgbm-context-single .bgbm-badge {
	font-size: 1.05em;
}
