/**
 * MemberDiscount Module Styles.
 *
 * Styles for tier-based member discount display throughout the store.
 *
 * @package TPGEO\Modules\MemberDiscount
 */

/* ==========================================================================
   Product Price Display (Catalog & Product Pages)
   ========================================================================== */

/**
 * Original price strikethrough.
 */
.tpgeo-original-price {
	opacity: 0.6;
	text-decoration: line-through;
	margin-right: 0.5em;
}

/**
 * Member discounted price.
 */
.tpgeo-member-price {
	color: #C6B671;
	font-weight: 600;
	text-decoration: none;
}

/**
 * Discount badge below price.
 */
.tpgeo-discount-badge {
	display: block;
	color: #C6B671;
	font-size: 0.85em;
	margin-top: 0.25em;
	font-weight: 500;
}

/* ==========================================================================
   Cart Item Display
   ========================================================================== */

/**
 * Strikethrough price in cart.
 */
.tpgeo-price-strikethrough {
	opacity: 0.6;
	text-decoration: line-through;
	margin-right: 0.5em;
}

/**
 * Discount label under cart item subtotal.
 */
.tpgeo-discount-label {
	display: block;
	color: #C6B671;
	font-size: 0.85em;
	margin-top: 0.25em;
}

/**
 * Discount applied indicator after item name.
 */
.tpgeo-discount-applied {
	display: flex;
	align-items: center;
	gap: 0.35em;
	color: #C6B671;
	font-size: 0.9em;
	margin-top: 0.25em;
	animation: tpgeo-discount-pulse 1s ease-in-out;
}

.tpgeo-discount-checkmark {
	font-weight: bold;
}

/**
 * Pulse animation for discount indicator.
 */
@keyframes tpgeo-discount-pulse {
	0% {
		opacity: 0;
		transform: translateY(-5px);
	}
	50% {
		opacity: 1;
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==========================================================================
   WooCommerce Blocks Compatibility
   ========================================================================== */

/**
 * Ensure proper display in block-based cart/checkout.
 */
.wc-block-cart .tpgeo-price-strikethrough,
.wc-block-checkout .tpgeo-price-strikethrough {
	display: inline;
}

.wc-block-cart .tpgeo-discount-label,
.wc-block-checkout .tpgeo-discount-label {
	display: block;
	font-size: 0.8em;
}

/* ==========================================================================
   Product Loop / Archive Styles
   ========================================================================== */

/**
 * Ensure consistent display in product loops.
 */
.woocommerce ul.products li.product .price .tpgeo-original-price,
.woocommerce-page ul.products li.product .price .tpgeo-original-price {
	display: inline;
}

.woocommerce ul.products li.product .price .tpgeo-member-price,
.woocommerce-page ul.products li.product .price .tpgeo-member-price {
	display: inline;
}

.woocommerce ul.products li.product .price .tpgeo-discount-badge,
.woocommerce-page ul.products li.product .price .tpgeo-discount-badge {
	display: block;
	text-align: center;
}

/* ==========================================================================
   Single Product Page
   ========================================================================== */

/**
 * Single product price display.
 */
.single-product .summary .price .tpgeo-original-price {
	font-size: 0.9em;
}

.single-product .summary .price .tpgeo-member-price {
	font-size: 1.1em;
}

.single-product .summary .price .tpgeo-discount-badge {
	margin-top: 0.5em;
}

/* ==========================================================================
   Mini Cart Widget
   ========================================================================== */

/**
 * Mini cart discount display.
 */
.widget_shopping_cart .tpgeo-price-strikethrough {
	font-size: 0.9em;
}

.widget_shopping_cart .tpgeo-discount-label {
	font-size: 0.75em;
}
