/**
 * TEB Sale Manager — Public styles.
 *
 * Handles: sale/normal element visibility via body class toggle,
 * sale price display formatting, and banner styling.
 *
 * @package TEB_Sale_Manager
 */

/* ---------------------------------------------------------------
 * Sale / Normal visibility toggle
 *
 * Usage in Elementor: Advanced tab → CSS Classes field.
 *   - "teb-show-sale"   → visible only during an active sale.
 *   - "teb-show-normal" → visible only when NO sale is active.
 * Works with both Elementor Free and Pro, v3 and v4.
 * ------------------------------------------------------------- */

body.teb-sale-active .teb-show-normal {
	display: none !important;
}

body:not(.teb-sale-active) .teb-show-sale {
	display: none !important;
}

/* ---------------------------------------------------------------
 * Sale price display (shortcodes + dynamic tags)
 * ------------------------------------------------------------- */

.teb-sale-price {
	display: inline;
}

.teb-sale-price .teb-original-price {
	text-decoration: line-through;
	opacity: 0.7;
	margin-right: 0.3em;
}

.teb-sale-price .teb-current-price {
	font-weight: 700;
}

.teb-sale-price .teb-savings {
	color: #28a745;
	font-weight: 600;
}

/* ---------------------------------------------------------------
 * Banner
 * ------------------------------------------------------------- */

.teb-sale-banner {
	width: 100%;
	text-align: center;
	line-height: 0;
}

.teb-sale-banner img {
	width: 100%;
	height: auto;
	display: block;
}

.teb-sale-banner a {
	display: block;
}
