/* BB Cart Sub-Upsell — frontend card (v1.0.5, Figma 48:9206 rebuild) */

.bbsu-card {
	position: relative;
	overflow: hidden;
	padding: 24px 14px;
	margin: 32px 0;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	box-sizing: border-box;
}
.bbsu-card *,
.bbsu-card *::before,
.bbsu-card *::after { box-sizing: border-box; }

.bbsu-card.is-loading { opacity: 0.7; pointer-events: none; }

/* Transient error message shown in-card when AJAX rejects. */
.bbsu-card__error {
	position: absolute;
	left: 16px; right: 16px; bottom: 16px;
	padding: 10px 14px;
	background: rgba(198, 40, 40, 0.92);
	color: #fff;
	font-size: 13px;
	border-radius: 8px;
	z-index: 3;
	animation: bbsu-fade-in 0.18s ease;
}
@keyframes bbsu-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Toggle (top-right) */
.bbsu-toggle {
	position: absolute;
	top: 24px;
	right: 24px;
	width: 56px;
	height: 32px;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.18);
	border: 0;
	padding: 0;
	cursor: pointer;
	transition: background 0.18s ease;
	z-index: 2;
}
.bbsu-toggle__thumb {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.18s ease, background 0.18s ease;
}
.bbsu-card[data-state="on"] .bbsu-toggle { background: var(--bbsu-accent, #00CC66); }
.bbsu-card[data-state="on"] .bbsu-toggle__thumb { transform: translateX(24px); }

/* Card body container */
.bbsu-card__inner {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.bbsu-card__top-text {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.7;
}

/* Top two-column section (text + features) */
.bbsu-card__top {
	display: flex;
	flex-direction: row;
	gap: 32px;
	align-items: flex-start;
	padding-right: 72px; /* room for toggle */
}

/* Left column: icon + text */
.bbsu-card__left {
	display: flex;
	flex-direction: row;
	gap: 32px;
	align-items: flex-start;
	flex: 0 1 auto;
	min-width: 0;
}

.bbsu-card__icon {
	flex: 0 0 80px;
	width: 80px;
	height: 80px;
	border-radius: 8px;
	background: #FFFFFF;
	padding: 16px 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.bbsu-card__icon img {
	width: 40px;
	height: 40px;
	object-fit: contain;
	display: block;
}

.bbsu-card__text {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	flex: 1 1 auto;
	max-width: 260px; /* Figma: text column is 222px wide; cap for wider cards. */
}

.bbsu-card__headline {
	font-family: "Awesome Serif VAR", "AwesomeSerif", Georgia, "Times New Roman", serif;
	font-size: 24px;
	line-height: 26.4px;
	font-weight: 350;
	color: inherit;
	margin: 0;
}
.bbsu-card__headline .bbsu-accent,
.bbsu-card__headline em,
.bbsu-card__headline i {
	color: #FAC370;
	font-style: normal;
	font-weight: inherit;
}

.bbsu-card__name {
	font-family: "Inter", sans-serif;
	font-size: 16px;
	line-height: 19.2px;
	font-weight: 500;
	color: inherit;
	margin-top: 16px; /* 16 + 8 parent gap = 24px below headline */
}

.bbsu-card__price-stack {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 4px;
}

.bbsu-card__price-row {
	display: flex;
	align-items: baseline;
	gap: 8px;
}
.bbsu-card__price-old {
	font-family: "Inter", sans-serif;
	font-size: 24px;
	line-height: 24px;
	font-weight: 400;
	color: #FFFFFF;
	text-decoration: line-through;
}
.bbsu-card__price-current {
	font-family: "Inter", sans-serif;
	font-size: 24px;
	line-height: 24px;
	font-weight: 700;
	color: #00CC66; /* default, can be overridden inline */
}
.bbsu-card__price-suffix {
	font-size: 14px;
	font-weight: 500;
	margin-left: 4px;
}

.bbsu-card__renew {
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: flex-start;
}
.bbsu-card__renew-text {
	font-family: "Inter", sans-serif;
	font-size: 10px;
	line-height: 13px;
	font-weight: 400;
	color: inherit;
}
.bbsu-card__cancel-tag {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 4px 8px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.2);
	color: #FFFFFF;
	font-family: "Inter", sans-serif;
	font-size: 10px;
	line-height: 8px;
	font-weight: 500;
}
.bbsu-card__cancel-tag .bbsu-check {
	width: 12px;
	height: 12px;
	flex: 0 0 12px;
}

/* Right column: feature pills */
.bbsu-card__features {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 0 0 343px;
	max-width: 343px;
}
.bbsu-feature {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 20px;
	min-height: 48px;
	font-family: "Inter", sans-serif;
	font-size: 12px;
	line-height: 18px;
	font-weight: 500;
	color: inherit;
}
.bbsu-feature__icon {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #FFFFFF;
}
.bbsu-feature__icon svg,
.bbsu-feature__icon img {
	width: 32px;
	height: 32px;
	display: block;
	object-fit: contain;
}
.bbsu-feature__text {
	flex: 1 1 auto;
	min-width: 0;
	color: #FFF;
	font-family: "Inter", sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: 500;
	line-height: 18px;
	letter-spacing: 0.2px;
}

/* Bottom image — Figma: image is symmetrically inset on both sides (left and right ≈ 112px).
   Left edge aligns with text column start (past the 80px icon + 32px gap).
   Right edge mirrors that inset so there's matching empty teal space on the right. */
.bbsu-card__image {
	margin: -30px 112px 0 112px;
	overflow: hidden;
	display: block;
}
.bbsu-card__image img {
	width: 100%;
	height: auto;
	display: block;
}

/* Pay-later block in right column — unchanged from v1.0.4 */
.bbsu-pay-later {
	margin: 0;
	padding: 0;
}
.bbsu-pay-later__title {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	font-weight: 700;
	color: #002914;
	line-height: 24px;
	margin: 0 0 8px;
}
.bbsu-pay-later__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.bbsu-pay-later__label-block { display: flex; flex-direction: column; }
.bbsu-pay-later__label {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	font-weight: 400;
	color: #938B8B;
	line-height: 24px;
}
.bbsu-pay-later__trial {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: #77B48C;
	line-height: 12px;
	margin-top: 4px;
}
.bbsu-pay-later__amount-block { display: flex; flex-direction: column; align-items: flex-end; }
.bbsu-pay-later__amount {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	font-weight: 400;
	color: #070707;
	line-height: 24px;
	text-decoration-line: line-through;
}
.bbsu-pay-later__first {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: #77B48C;
	line-height: 12px;
	margin-top: 4px;
	text-align: right;
}

/* Mobile */
@media (max-width: 767px) {
	.bbsu-card { padding: 20px 16px; margin: 24px 0; }
	.bbsu-toggle { top: 20px; right: 20px; }
	.bbsu-card__top {
		flex-direction: column;
		gap: 20px;
		padding-right: 64px;
	}
	.bbsu-card__left { gap: 16px; }
	.bbsu-card__icon { flex: 0 0 64px; width: 64px; height: 64px; padding: 12px 6px; }
	.bbsu-card__icon img { width: 36px; height: 36px; }
	.bbsu-card__headline { font-size: 20px; line-height: 22px; }
	.bbsu-card__price-old,
	.bbsu-card__price-current { font-size: 22px; line-height: 22px; }
	.bbsu-card__features { flex: 1 1 auto; max-width: none; }
	.bbsu-card__image { margin: 20px 0 0; } /* mobile: stacked layout, no icon offset */
}
