/* Beautinow Smart Coupons — storefront styles.
 *
 * Colours come from CSS custom properties set by the appearance settings
 * (WooCommerce → Beautinow Coupons); the fallbacks below are the brand gold:
 *   --bnsc-primary      badges / "%" triangle / grid label / cart chip / borders
 *   --bnsc-on-primary   text/icon on those badges
 *   --bnsc-secondary    the coupon-price highlight
 */

/* Cart / checkout tier nudge */
.bnsc-tier-nudge {
	margin: 0 0 1em;
	padding: 12px 16px;
	background: #fffaeb;                                  /* cream */
	border: 1px solid var( --bnsc-primary, #deab5a );
	border-radius: 6px;
	color: #2a2a2a;
}

.bnsc-tier-nudge__line {
	margin: 0;
	padding: 2px 0;
	font-size: 15px;
	line-height: 1.4;
}

.bnsc-tier-nudge__line + .bnsc-tier-nudge__line {
	border-top: 1px dashed rgba( 222, 171, 90, 0.4 );
	margin-top: 6px;
	padding-top: 8px;
}

/* SWATCH mark — a small, bright corner triangle on the discounted variation
   swatch (size or colour). No text — a clean sale-ribbon marker that pops. */
.wd-swatch.bnsc-has-badge {
	position: relative;
	overflow: visible;
}

.bnsc-corner {
	position: absolute;
	top: 0;
	right: 0;
	width: 16px;
	height: 16px;
	background: var( --bnsc-mark, #f5a623 );
	clip-path: polygon( 100% 0, 0 0, 100% 100% );
	border-radius: 0 3px 0 0;
	z-index: 5;
	pointer-events: none;
}

/* On text (size) swatches, add room on the right so the triangle doesn't
   crowd the label. */
.wd-swatch.wd-text.bnsc-has-badge {
	padding-right: 10px;
}

/* On round colour swatches, sit the triangle at the circle's edge. */
.wd-swatch.wd-bg .bnsc-corner {
	top: -1px;
	right: -1px;
}

/* GRID card label — shows a card in a shop/collection grid contains a
   discounted variant. */
.bnsc-grid-label {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 5;
	background: var( --bnsc-primary, #deab5a );
	color: var( --bnsc-on-primary, #2a2a2a );
	font-size: 11px;
	font-weight: 700;
	line-height: 1.5;
	padding: 2px 8px;
	border-radius: 3px;
	box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.2 );
	pointer-events: none;
}

/* PRODUCT PAGE coupon-price box — the calculated price + "auto-applied" note for
   the selected variation. */
.bnsc-cpn-box {
	margin: 12px 0;
	padding: 12px 16px;
	background: #fffaeb;                                  /* cream */
	border: 1px solid var( --bnsc-primary, #deab5a );
	border-radius: 8px;
	color: #2a2a2a;
}

.bnsc-cpn-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.bnsc-cpn-price {
	color: var( --bnsc-secondary, #9c6b12 );
	font-size: 22px;
	font-weight: 800;
	line-height: 1.2;
}

.bnsc-cpn-tag {
	background: var( --bnsc-primary, #deab5a );
	color: var( --bnsc-on-primary, #2a2a2a );
	font-weight: 700;
	font-size: 12px;
	padding: 2px 8px;
	border-radius: 4px;
}

.bnsc-cpn-note {
	display: block;
	font-size: 12px;
	color: #6b6b6b;
	margin-top: 3px;
}

@media ( max-width: 768px ) {
	.bnsc-cpn-price {
		font-size: 20px;
	}
}

/* GRID card — concise coupon price shown under the card price when a discounted
   variation is selected. */
.bnsc-cpn-mini {
	margin: 2px 0 0;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	color: var( --bnsc-secondary, #9c6b12 );
}

/* Cart / checkout — "-X% discount" chip under a line item. */
.bnsc-cart-badge-line {
	display: block;
	margin-top: 4px;
}

.bnsc-cart-badge {
	display: inline-block;
	padding: 1px 8px;
	background: var( --bnsc-primary, #deab5a );
	color: var( --bnsc-on-primary, #2a2a2a );
	font-size: 11px;
	font-weight: 700;
	line-height: 1.6;
	border-radius: 3px;
	white-space: nowrap;
}

/* Mini-cart / widgets — coupon-discounted line price (original struck + new).
   Uses !important on our own classes to win over the theme's price colouring
   inside the mini-cart. */
.bnsc-cpn-was,
.bnsc-cpn-was .woocommerce-Price-amount,
.bnsc-cpn-was bdi {
	color: #9a948a !important;
	text-decoration: line-through !important;
}

.bnsc-cpn-was {
	margin-right: 5px;
	opacity: 0.9;
}

.bnsc-cpn-now,
.bnsc-cpn-now .woocommerce-Price-amount,
.bnsc-cpn-now bdi {
	color: var( --bnsc-secondary, #9c6b12 ) !important;
	text-decoration: none !important;
	font-weight: 700;
}

/* "Reapply flash sale discount" notice + button (cart / checkout).
   !important on colours because WoodMart's .woocommerce-info styling (and WP Engine's
   cascade) otherwise wins and washes out the text. */
.bnsc-reapply {
	display: flex !important;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 1em !important;
	padding: 12px 16px !important;
	background: #fffaeb !important;                       /* cream */
	border-left: 3px solid var( --bnsc-primary, #deab5a ) !important;
	border-radius: 4px;
	color: #2a2a2a !important;
	font-size: 15px;
	line-height: 1.45;
}

.bnsc-reapply .bnsc-reapply-text {
	flex: 1 1 auto;
	color: #2a2a2a !important;
	font-weight: 500;
}

.bnsc-reapply .bnsc-reapply-btn {
	flex: 0 0 auto;
	background: var( --bnsc-primary, #deab5a ) !important;
	color: var( --bnsc-on-primary, #2a2a2a ) !important;
	border: none !important;
	font-weight: 700;
	text-decoration: none !important;
	white-space: nowrap;
}

.bnsc-reapply .bnsc-reapply-btn:hover {
	filter: brightness( 0.96 );
}

/* The "an exclusive coupon is blocking the flash sale" heads-up reads as info,
   so give it a neutral tint distinct from the positive reapply prompt. */
.bnsc-reapply.bnsc-exclusive-block {
	background: #f4f6fb !important;
	border-left-color: #6b7a99 !important;
}

/* Block Cart & Checkout notice host spacing. */
#bnsc-block-notice:empty {
	display: none;
}
