/**
 * استایل‌های Badge افزونه تجدید موجودی
 * کاملاً مستقل، بدون وابستگی به Bootstrap یا هر فریم‌ورک دیگر.
 */

:root {
	--ir-badge-bg: #e53935;
	--ir-badge-color: #ffffff;
}

/* اطمینان از موقعیت‌دهی صحیح Badge نسبت به تصویر محصول. */
ul.products li.product,
.woocommerce div.product {
	position: relative;
}

.inventory-renewal-badge {
	position: absolute;
	z-index: 9;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 11px;
	border-radius: 7px;
	background-color: var(--ir-badge-bg);
	color: var(--ir-badge-color);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.6;
	letter-spacing: 0.2px;
	white-space: nowrap;
	box-shadow: 0 2px 7px rgba(0, 0, 0, 0.16);
	opacity: 0;
	animation: inventoryRenewalFadeIn 0.25s ease forwards;
	pointer-events: none;
}

.inventory-renewal-badge__icon {
	flex-shrink: 0;
}

.inventory-renewal-badge__text {
	text-transform: uppercase;
}

/* موقعیت‌های Badge (فیزیکی، مستقل از جهت RTL/LTR، طبق انتخاب دستی در تنظیمات). */
.inventory-renewal-badge--top-right {
	top: 10px;
	right: 10px;
}

.inventory-renewal-badge--top-left {
	top: 10px;
	left: 10px;
}

.inventory-renewal-badge--bottom-right {
	bottom: 10px;
	right: 10px;
}

.inventory-renewal-badge--bottom-left {
	bottom: 10px;
	left: 10px;
}

@keyframes inventoryRenewalFadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* واکنش‌گرا برای دستگاه‌های موبایل. */
@media (max-width: 480px) {
	.inventory-renewal-badge {
		padding: 3px 8px;
		font-size: 10px;
	}

	.inventory-renewal-badge--top-right,
	.inventory-renewal-badge--top-left {
		top: 6px;
	}

	.inventory-renewal-badge--bottom-right,
	.inventory-renewal-badge--bottom-left {
		bottom: 6px;
	}

	.inventory-renewal-badge--top-right,
	.inventory-renewal-badge--bottom-right {
		right: 6px;
	}

	.inventory-renewal-badge--top-left,
	.inventory-renewal-badge--bottom-left {
		left: 6px;
	}
}

/* استایل شورتکد. */
.inventory-renewal-shortcode ul.products {
	margin: 0;
}
