/* 区块结帐 / 区块购物车的促销显示，视觉抄自 LSC 的 .lsc-savings-box（虚线折叠盒） */

.yb-promo-box {
	border: 1px dashed var(--yb-sf-ink, currentColor);
	border-radius: 4px;
	background: none;
	overflow: hidden;
	margin: 0 0 8px;
	max-width: 100%;
	box-sizing: border-box;
}

.yb-promo-header {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 10px;
	font-weight: 600;
	font-size: 13px;
	line-height: 1.3;
	user-select: none;
}

.yb-promo-header.is-toggle {
	cursor: pointer;
}

.yb-promo-header.is-toggle:hover {
	background: color-mix( in srgb, currentColor 6%, transparent );
}

.yb-promo-chevron {
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	flex-shrink: 0;
	transition: transform 0.15s ease;
}

.yb-promo-box.is-collapsed .yb-promo-chevron {
	transform: rotate( -90deg );
}

.yb-promo-label {
	flex: 1;
	min-width: 0;
}

.yb-promo-amount {
	flex-shrink: 0;
	font-variant-numeric: tabular-nums;
}

.yb-promo-details {
	border-top: 1px dashed color-mix( in srgb, currentColor 35%, transparent );
	padding: 6px 10px 8px;
}

.yb-promo-box.is-collapsed .yb-promo-details {
	display: none;
}

/* 单条规则行：名称可折行、金额永远靠右不被挤掉（手机 390px 也不横向溢出） */
.yb-promo-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 8px;
	margin-bottom: 4px;
	padding-left: 14px;
	font-size: 12px;
	line-height: 1.35;
	font-weight: 600;
	color: #0d9488;
}

.yb-promo-row:last-child {
	margin-bottom: 0;
}

.yb-promo-row__name {
	min-width: 0;
	overflow-wrap: anywhere;
}

.yb-promo-row__amt {
	flex-shrink: 0;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

/* 规则类型配色，与 LSC .lsc-discount-row--* 同色 */
.yb-promo-row--mix_tier { color: #0d9488; }
.yb-promo-row--live_price { color: #ea580c; }
.yb-promo-row--quantity_tier { color: #3b82f6; }
.yb-promo-row--mixed_discount { color: #7c3aed; }
.yb-promo-row--amount_tier { color: #ec4899; }

/* 折扣已经进 savings box，区块内建的负数 fee 行藏起来 */
.yb-promo-hidden-fee {
	display: none !important;
}
