/**
 * MP BOGO Manager — Frontend Styles
 *
 * Colours are overridden at :root by inline CSS variables injected from
 * the plugin's admin settings (MPBOGO_Display::add_inline_css_vars()).
 *
 * Variables:
 *   --mpbogo-badge-bg     badge background colour  (default #e74c3c)
 *   --mpbogo-badge-color  badge text colour        (default #ffffff)
 */

/* ------------------------------------------------------------------
   Badge shown next to the item name in cart / checkout / mini-cart
   ------------------------------------------------------------------ */

.mpbogo-free-badge {
	display: inline-block;
	padding: 2px 8px;
	margin-left: 6px;
	border-radius: 3px;
	font-size: 0.75em;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	vertical-align: middle;
	white-space: nowrap;
	color: var(--mpbogo-badge-color, #fff) !important;
	background-color: var(--mpbogo-badge-bg, #e74c3c);

	/* Subtle animation when the badge first appears */
	animation: mpbogo-pop-in 0.25s ease-out both;
}

/* ------------------------------------------------------------------
   Badge shown on product listing grid  ([mpbogo_promo_badge] shortcode)
   ------------------------------------------------------------------ */

.mpbogo-promo-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 3px;
	font-size: 0.78em;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--mpbogo-badge-color, #fff);
	background-color: var(--mpbogo-badge-bg, #e74c3c);
}

/* ------------------------------------------------------------------
   Price column — "FREE" ins tag
   ------------------------------------------------------------------ */

ins.mpbogo-free-price {
	display: inline-block;
	text-decoration: none;
	font-weight: 700;
	color: var(--mpbogo-badge-bg, #e74c3c);
}

/* ------------------------------------------------------------------
   Strikethrough price that WooCommerce outputs via wc_format_sale_price
   We amplify the style so it's clearly visible.
   ------------------------------------------------------------------ */

.woocommerce-cart .cart_item del,
.woocommerce-checkout .cart_item del,
.woocommerce-mini-cart__item del {
	opacity: 0.65;
}

/* ------------------------------------------------------------------
   Pop-in animation
   ------------------------------------------------------------------ */

@keyframes mpbogo-pop-in {
	from {
		opacity: 0;
		transform: scale(0.75);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* ------------------------------------------------------------------
   Responsive / mobile  — keep badges from breaking layout
   ------------------------------------------------------------------ */

@media (max-width: 480px) {
	.mpbogo-free-badge,
	.mpbogo-promo-badge {
		font-size: 0.7em;
		padding: 2px 6px;
	}
}
