/* WooBundle Suite frontend styles */

/* --------------------------------------------------------------------------
   Quantity breaks card widget
   -------------------------------------------------------------------------- */
.cb-quantity-breaks {
	margin: 1.5em 0;
}

.cb-quantity-breaks__heading {
	margin: 0 0 12px;
	font-weight: 700;
	font-size: 1.05em;
	color: #111827;
}

.cb-qb-rows {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cb-qb-row {
	position: relative;
	padding: 12px 14px;
	border: 1px solid #e5e7eb;
	border-radius: 9px;
	cursor: pointer;
	background: #fff;
	transition: border-color 0.13s, box-shadow 0.13s;
}

.cb-qb-row:hover { border-color: #c4c9d4; }

.cb-qb-row.is-selected {
	border-color: #111827;
	border-width: 1.5px;
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}

.cb-qb-ribbon {
	background: #111827;
	border-radius: 5px;
	color: #ffffff;
	font-size: 10.5px;
	font-weight: 600;
	padding: 2px 10px;
	position: absolute;
	right: 14px;
	top: -12px;
	white-space: nowrap;
	line-height: 15px;
}

.cb-qb-row__main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.cb-qb-row__left {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}

.cb-qb-row__top {
	display: flex;
	align-items: center;
	gap: 10px;
}

.cb-qb-row__radio {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1.5px solid #d1d5db;
	flex-shrink: 0;
	position: relative;
	transition: border-color 0.13s;
}

.cb-qb-row.is-selected .cb-qb-row__radio { border-color: #111827; }

.cb-qb-row.is-selected .cb-qb-row__radio::after {
	content: '';
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: #111827;
}

.cb-qb-row__title {
	font-size: 13.5px;
	font-weight: 600;
	color: #111827;
}

.cb-qb-row__sub {
	display: block;
	padding-left: 26px;
	font-size: 12px;
	font-weight: 400;
	color: #9ca3af;
}

.cb-qb-pill {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	background: #eff6ff;
	color: #2563eb;
	font-size: 11px;
	font-weight: 600;
	border-radius: 100px;
	white-space: nowrap;
}

.cb-qb-row__price {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	flex-shrink: 0;
}

.cb-qb-row__price-final {
	font-size: 14px;
	font-weight: 700;
	color: #111827;
}

.cb-qb-row__price-strike {
	font-size: 12px;
	color: #9ca3af;
	text-decoration: line-through;
}

/* --------------------------------------------------------------------------
   Quantity + Add to cart: intentionally left unstyled so the active theme's
   own quantity input and add-to-cart button design applies.
   -------------------------------------------------------------------------- */
form.cart:has(.cb-qb-rows) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

form.cart:has(.cb-qb-rows) .cb-quantity-breaks {
	flex: 1 0 100%;
}

/* --------------------------------------------------------------------------
   Per-tier extras: image, deal tag, ranged/unlimited stepper
   -------------------------------------------------------------------------- */
.cb-qb-row__image {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 7px;
	overflow: hidden;
	background: #f3f4f6;
}

.cb-qb-row__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cb-qb-deal-tag {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	background: #eff6ff;
	color: #2563eb;
	font-size: 11px;
	font-weight: 600;
	border-radius: 100px;
	white-space: nowrap;
}

.cb-qb-row__stepper {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding-left: 26px;
	margin-top: 2px;
}

.cb-qb-row__stepper-btn {
	width: 22px;
	height: 22px;
	border: 1px solid #e5e7eb;
	border-radius: 5px;
	background: #fff;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
}

.cb-qb-row__stepper-btn:hover { background: #f3f4f6; }

.cb-qb-row__stepper-val {
	font-size: 12.5px;
	font-weight: 600;
	color: #111827;
	min-width: 14px;
	text-align: center;
}

.cb-qb-gift-price {
	color: #16a34a;
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   Per-unit variant picker (variable products) — one dropdown per unit in
   the tier, so each unit can be a different size/color/etc.
   -------------------------------------------------------------------------- */
.cb-qb-row__variants {
	display: none;
	flex-direction: column;
	gap: 8px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e5e7eb;
	cursor: default;
}

.cb-qb-row.is-selected .cb-qb-row__variants {
	display: flex;
}

.cb-qb-variant-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.cb-qb-variant-row__label {
	flex-shrink: 0;
	width: 22px;
	font-size: 12.5px;
	font-weight: 600;
	color: #6b7280;
}

.cb-qb-variant-row__selects {
	display: flex;
	flex: 1;
	gap: 8px;
}

.cb-qb-variant-attr {
	flex: 1;
	height: 36px;
	padding: 0 10px;
	border: 1px solid #e5e7eb;
	border-radius: 7px;
	background: #fff;
	font-size: 13px;
	font-weight: 500;
	color: #111827;
	cursor: pointer;
	min-width: 0;
}

.cb-qb-variant-attr:disabled {
	background: #f9fafb;
	color: #9ca3af;
	cursor: default;
}

/* --------------------------------------------------------------------------
   Per-tier addons (upsell + gifts) — shown only under the selected tier,
   matching the admin "Live preview" behavior.
   -------------------------------------------------------------------------- */
.cb-qb-row__addons {
	display: none;
	flex-direction: column;
	gap: 10px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e5e7eb;
	cursor: default;
}

.cb-qb-row.is-selected .cb-qb-row__addons {
	display: flex;
}

.cb-qb-gift-item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	border-radius: 9px;
	background: #fefce8;
	overflow: hidden;
}

.cb-qb-gift-item__ribbon {
	position: absolute;
	right: 10px;
	top: 0;
	bottom: 0;
	width: 3px;
	background: #eab308;
}

.cb-qb-gift-item__image {
	width: 40px;
	height: 40px;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	flex-shrink: 0;
}

.cb-qb-gift-item__image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cb-qb-gift-item__name {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #111827;
	min-width: 0;
}

.cb-qb-gift-item__badge {
	display: inline-flex;
	padding: 1px 7px;
	background: #fde047;
	color: #713f12;
	font-size: 10.5px;
	font-weight: 700;
	border-radius: 100px;
}

.cb-qb-gift-item__price-strike {
	font-size: 12px;
	color: #a16207;
	text-decoration: line-through;
	flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Rewards progress bar
   -------------------------------------------------------------------------- */
.cb-qb-rewards-wrap { margin-top: 20px; }

.cb-qb-rewards-heading {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 700;
	color: #111827;
}

.cb-qb-rewards {
	position: relative;
	margin-top: 14px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fafafa;
}

.cb-qb-rewards__items {
	display: flex;
	align-items: stretch;
}

.cb-qb-reward {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 32px 16px 22px;
	text-align: center;
}

.cb-qb-reward:first-child { border-radius: 10px 0 0 10px; }
.cb-qb-reward:last-child { border-radius: 0 10px 10px 0; }
.cb-qb-reward:only-child { border-radius: 10px; }

.cb-qb-reward + .cb-qb-reward { border-left: 1px solid #e5e7eb; }

.cb-qb-reward.is-unlocked { background: #fff; }

.cb-qb-reward__badge {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translate(-50%, -50%);
	padding: 3px 12px;
	border-radius: 999px;
	background: #eff6ff;
	color: #2563eb;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	white-space: nowrap;
	z-index: 1;
}

.cb-qb-reward__icon {
	display: none;
	width: 60px;
	height: 60px;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.cb-qb-reward__icon--locked {
	display: flex;
	color: #9ca3af;
}

.cb-qb-reward__icon--locked svg { width: 100%; height: 100%; }

.is-unlocked .cb-qb-reward__icon--unlocked { width: 80px; height: 80px; }
.cb-qb-reward__icon--unlocked svg { width: 50px; height: 50px; }
.cb-qb-reward__icon--unlocked img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }

.cb-qb-reward__label {
	display: none;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
}

.cb-qb-reward__label--locked { display: block; color: #6b7280; }

.cb-qb-reward.is-unlocked .cb-qb-reward__icon--locked { display: none; }
.cb-qb-reward.is-unlocked .cb-qb-reward__icon--unlocked { display: flex; color: #2563eb; }
.cb-qb-reward.is-unlocked .cb-qb-reward__label--locked { display: none; }
.cb-qb-reward.is-unlocked .cb-qb-reward__label--unlocked {
	display: block;
	color: #111827;
}

@media (max-width: 480px) {
	.cb-qb-reward { padding: 26px 10px 18px; }
}

/* --------------------------------------------------------------------------
   Upsell block
   -------------------------------------------------------------------------- */
.cb-qb-upsell-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	border: 1px solid #e5e7eb;
	border-radius: 9px;
	background: #fff;
}

.cb-qb-upsell-item__check {
	display: inline-flex;
	flex-shrink: 0;
}

.cb-qb-upsell-item__checkbox {
	width: 17px;
	height: 17px;
	cursor: pointer;
}

.cb-qb-upsell-item__image {
	width: 40px;
	height: 40px;
	border-radius: 6px;
	object-fit: cover;
	background: #f3f4f6;
	flex-shrink: 0;
	display: block;
}

.cb-qb-upsell-item__qty {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	font-weight: 600;
	color: #111827;
	flex-shrink: 0;
}

.cb-qb-upsell-item__qty-btn {
	width: 22px;
	height: 22px;
	border: 1px solid #e5e7eb;
	border-radius: 5px;
	background: #fff;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
}

.cb-qb-upsell-item__qty-btn:hover { background: #f3f4f6; }

.cb-qb-upsell-item__qty-val {
	min-width: 14px;
	text-align: center;
}

.cb-qb-upsell-item__name {
	flex: 1;
	font-size: 13px;
	font-weight: 500;
	color: #111827;
	min-width: 0;
}

.cb-qb-upsell-item__price {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	white-space: nowrap;
}

.cb-qb-upsell-item__price-final { font-weight: 700; color: #111827; }
.cb-qb-upsell-item__price-strike { color: #9ca3af; text-decoration: line-through; }

