/* BadgeMa - front-end styles */
.badgema-badge {
	--bm-size: 34px;
	--bm-x: 10px;
	--bm-y: 10px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	line-height: 1;
	vertical-align: middle;
	box-sizing: border-box;
	pointer-events: auto;
}

.badgema-badge .badgema-icon {
	display: inline-block;
	flex: 0 0 auto;
	width: var(--bm-size);
	height: var(--bm-size);
}

.badgema-badge .badgema-svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.badgema-badge.badgema-shadow .badgema-icon {
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

/* Optional text label (pill) */
.badgema-badge.badgema-has-label {
	background: rgba(255, 255, 255, 0.94);
	border-radius: 999px;
	padding: 3px 12px 3px 3px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.badgema-badge .badgema-label {
	font-size: calc(var(--bm-size) * 0.38);
	font-weight: 600;
	color: #1d2327;
	white-space: nowrap;
}

/* Absolute positioning (card + single image) */
.badgema-badge.badgema-abs {
	position: absolute;
	z-index: 12;
}

.badgema-abs.badgema-pos-bottom-left  { left: var(--bm-x);  bottom: var(--bm-y); }
.badgema-abs.badgema-pos-bottom-right { right: var(--bm-x); bottom: var(--bm-y); }
.badgema-abs.badgema-pos-top-left     { left: var(--bm-x);  top: var(--bm-y); }
.badgema-abs.badgema-pos-top-right    { right: var(--bm-x); top: var(--bm-y); }

/* Containers that receive the badge */
.directorist-listing-single__thumb,
.directorist-single-listing-slider {
	position: relative;
}

/* Tooltip */
.badgema-has-tip {
	cursor: default;
}

.badgema-has-tip::after {
	content: attr(data-badgema-tip);
	position: absolute;
	z-index: 30;
	left: 0;
	bottom: calc(100% + 8px);
	padding: 6px 10px;
	background: #1d2327;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	border-radius: 6px;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity 0.15s ease, transform 0.15s ease;
	pointer-events: none;
}

.badgema-has-tip:hover::after,
.badgema-has-tip:focus::after {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.badgema-pos-bottom-right.badgema-has-tip::after,
.badgema-pos-top-right.badgema-has-tip::after {
	left: auto;
	right: 0;
}

.badgema-pos-top-left.badgema-has-tip::after,
.badgema-pos-top-right.badgema-has-tip::after {
	bottom: auto;
	top: calc(100% + 8px);
}

/* Inline (next to the listing title) */
.badgema-badge.badgema-inline {
	position: relative;
	margin-left: 6px;
}

.badgema-badge.badgema-inline.badgema-has-tip::after {
	left: 0;
}
