/* TRT Badge Manager – frontend styles */

/* Make product containers positioning contexts. */
.woocommerce ul.products li.product,
.woocommerce div.product div.images {
	position: relative;
}

.tbm-badges {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 9;
}

.tbm-badge {
	position: absolute;
	display: inline-block;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

/* Positions */
.tbm-badge.tbm-pos-top-left {
	top: 10px;
	left: 10px;
}

.tbm-badge.tbm-pos-top-right {
	top: 10px;
	right: 10px;
}

.tbm-badge.tbm-pos-top-center {
	top: 10px;
	left: 50%;
	transform: translateX(-50%);
}

.tbm-badge.tbm-pos-bottom-left {
	bottom: 10px;
	left: 10px;
}

.tbm-badge.tbm-pos-bottom-right {
	bottom: 10px;
	right: 10px;
}

/* Stack multiple badges in the same corner */
.tbm-badges .tbm-badge.tbm-pos-top-left ~ .tbm-badge.tbm-pos-top-left {
	top: 46px;
}

.tbm-badges .tbm-badge.tbm-pos-top-right ~ .tbm-badge.tbm-pos-top-right {
	top: 46px;
}

/* CSS badge shapes */
.tbm-badge.tbm-css-circle {
	border-radius: 50% !important;
	width: 3.6em;
	height: 3.6em;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	white-space: normal;
	padding: 0 !important;
}

.tbm-badge.tbm-css-pill {
	border-radius: 999px !important;
}

.tbm-badge.tbm-css-ribbon {
	border-radius: 0 !important;
}

.tbm-badge.tbm-css-ribbon::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 0;
	border: 5px solid transparent;
	border-top-color: rgba(0, 0, 0, 0.35);
	border-left-color: rgba(0, 0, 0, 0.35);
}

.tbm-badge.tbm-css-corner {
	border-radius: 0 !important;
	transform: rotate(-45deg) !important;
	transform-origin: center;
}

.tbm-badge.tbm-css-corner.tbm-pos-top-left {
	top: 16px;
	left: -24px;
	padding-left: 34px !important;
	padding-right: 34px !important;
}

.tbm-badge.tbm-css-corner.tbm-pos-top-right {
	top: 16px;
	right: -24px;
	transform: rotate(45deg) !important;
	padding-left: 34px !important;
	padding-right: 34px !important;
}

/* Image badges: remove background/shadow */
.tbm-badge.tbm-type-image {
	background: transparent !important;
	box-shadow: none;
	padding: 0 !important;
}

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

/* Static preview (admin list column) */
.tbm-badge.tbm-preview {
	position: static;
	display: inline-block;
}
