/**
 * 购物车即时可售标示 —— 已售罄 / 库存不足。
 * 只在 /cart/ 载入(inc/frontend-cart.php: porto_child_cart_oos_assets)。
 */

/* 顶部横幅 */
.yb-cart-oos-notice {
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid #e6b8bf;
	border-left: 4px solid #b3244a;
	border-radius: 6px;
	background: #f9f0f1;
	color: #7d1732;
	font-size: 14px;
	line-height: 1.5;
	word-break: break-word;
}

/* 问题行:淡粉底色 */
.woocommerce-cart-form__cart-item.yb-cart-line-oos > td,
.woocommerce-cart-form__cart-item.yb-cart-line-short > td,
tr.yb-cart-line-oos > td,
tr.yb-cart-line-short > td {
	background-color: #f9f0f1;
}

/* 行内徽章 */
.yb-cart-badge {
	display: inline-block;
	margin: 4px 0 0;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
}

.yb-cart-badge--oos {
	background: #b3244a;
	color: #fff;
}

.yb-cart-badge--short {
	background: #fbe4c8;
	color: #8a4b06;
}

/* 售罄行的数量框 */
.shop_table.cart input.qty[disabled],
.woocommerce-cart-form input.qty[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
	background: #f2f2f2;
}

.yb-cart-line-oos .quantity .plus,
.yb-cart-line-oos .quantity .minus {
	opacity: 0.45;
	pointer-events: none;
}

/* 被挡住的结帐钮 */
.checkout-button.yb-checkout-blocked,
.checkout-button.yb-checkout-blocked:hover {
	opacity: 0.55;
	cursor: not-allowed;
	pointer-events: none;
	border: 0;
	width: 100%;
	text-align: center;
}

@media (max-width: 480px) {
	.yb-cart-oos-notice {
		font-size: 13px;
		padding: 10px 12px;
	}

	.yb-cart-badge {
		white-space: normal;
	}
}
