/* ============================================================================
 * CHECKOUT OFFERS, one card for all of them
 *
 * Type weight is 400 throughout, matching the checkout's own
 * `#wfacp-e-form * { font-weight: 400 !important }`. Hierarchy is carried by
 * size and colour instead, so the card does not shout against the form.
 *
 * Paired with bb-offer-card.js, which rebuilds .bb-checkout-subup and every
 * .wfob_bump into the same .bbx-* markup, so the subscription upgrade and the
 * order bumps finally look like siblings.
 *
 * Layout: checkbox and headline only in the header, so it stays one short row.
 * The price moves down beside the image and copy, which is where a shopper
 * compares it with what they are getting.
 *
 * System fonts only: no webfont request, nothing external.
 * ========================================================================== */

/* hide the original markup only once a card exists, so a JS failure still
   leaves a usable offer rather than an empty box */
html body.woocommerce-checkout #wfacp-e-form .wfob_bump .wfob_sec_start.bbx-ready > *:not(.bbx-card),
html body.woocommerce-checkout #wfacp-e-form .bb-checkout-subup.bbx-ready > *:not(.bbx-card) { display: none !important; }

html body.woocommerce-checkout #wfacp-e-form .wfob_bump,
html body.woocommerce-checkout #wfacp-e-form .bb-checkout-subup {
	background: transparent !important; border: 0 !important; box-shadow: none !important;
	padding: 0 !important; margin: 0 0 14px !important; min-height: 0 !important;
}
html body.woocommerce-checkout #wfacp-e-form .wfob_bump .wfob_sec_start {
	background: transparent !important; border: 0 !important; padding: 0 !important; margin: 0 !important;
}

/* ---------------------------------------------------------------- card --- */
html body.woocommerce-checkout #wfacp-e-form .wfob_bump,
html body.woocommerce-checkout #wfacp-e-form .bb-checkout-subup { opacity: 1 !important; }

html body.woocommerce-checkout #wfacp-e-form .bbx-card {
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background: #fff;
	border: 1px solid rgba(200,55,132,.28);
	border-radius: 14px;
	overflow: hidden;
	cursor: pointer;
	transition: border-color .18s ease, box-shadow .18s ease;
	box-shadow: 0 2px 10px -4px rgba(200,55,132,.14);
}
html body.woocommerce-checkout #wfacp-e-form .bbx-card:hover { border-color: rgba(200,55,132,.5); }
html body.woocommerce-checkout #wfacp-e-form .bbx-card.is-on {
	border-color: #c83784;
	box-shadow: 0 0 0 3px rgba(200,55,132,.12), 0 2px 10px -4px rgba(200,55,132,.2);
}

/* --------------------------------------------------- header: one row ---- */
html body.woocommerce-checkout #wfacp-e-form .bbx-head {
	display: flex; align-items: center; gap: 11px;
	padding: 12px 14px; background: #fdf4f9; border-bottom: 1px solid rgba(200,55,132,.12);
}
html body.woocommerce-checkout #wfacp-e-form .bbx-check {
	position: relative; flex: 0 0 22px; width: 22px; height: 22px;
}
html body.woocommerce-checkout #wfacp-e-form .bbx-check input {
	position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 2;
}
/* <i>, not an empty <span>: the checkout stylesheet hides spans with no text */
html body.woocommerce-checkout #wfacp-e-form i.bbx-box {
	position: absolute; inset: 0; border-radius: 7px;
	background: #fff; border: 2px solid #d9c3d0; transition: background .15s ease, border-color .15s ease;
	pointer-events: none; display: block;
}
html body.woocommerce-checkout #wfacp-e-form i.bbx-box::after {
	content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
	border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0);
	transition: transform .15s ease;
}
html body.woocommerce-checkout #wfacp-e-form .bbx-card.is-on i.bbx-box { background: #c83784; border-color: #c83784; }
html body.woocommerce-checkout #wfacp-e-form .bbx-card.is-on i.bbx-box::after { transform: rotate(45deg) scale(1); }
html body.woocommerce-checkout #wfacp-e-form .bbx-check input:focus-visible ~ i.bbx-box { outline: 2px solid #c83784; outline-offset: 2px; }

html body.woocommerce-checkout #wfacp-e-form .bbx-title {
	font-size: 14.5px; line-height: 1.3; font-weight: 400; color: #111827; letter-spacing: -.01em; min-width: 0;
}

/* ------------------------------------------- body: image, copy, price --- */
html body.woocommerce-checkout #wfacp-e-form .bbx-body {
	display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: #fff;
}
html body.woocommerce-checkout #wfacp-e-form .bbx-img {
	flex: 0 0 64px; width: 64px; height: 64px; overflow: hidden;
	background: transparent; border: 0;
	display: flex; align-items: center; justify-content: center;
}
/* The checkout stylesheet puts a 1px pink border and a 10px radius on images
   inside the offer blocks, and that applies to the <img> itself, not the wrapper.
   Clear it here or the product photo keeps a frame nobody asked for. */
html body.woocommerce-checkout #wfacp-e-form .bbx-img img {
	width: 100%; height: 100%; object-fit: contain; display: block;
	border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
	padding: 0 !important; background: transparent !important;
}
html body.woocommerce-checkout #wfacp-e-form .bbx-copy { flex: 1 1 auto; min-width: 0; }
html body.woocommerce-checkout #wfacp-e-form .bbx-name {
	display: block; font-size: 13.5px; font-weight: 400; color: #111827; line-height: 1.3; margin-bottom: 3px;
}
/* No line clamp. This line carries the renewal terms ("renews at $67.99 every
 * 90 days. Cancel any time."), and truncating it hid how often the customer
 * would be charged. A slightly taller card is the right trade. */
html body.woocommerce-checkout #wfacp-e-form .bbx-meta {
	display: block; font-size: 12.5px; line-height: 1.45; color: #6b7280;
	overflow: visible;
}
html body.woocommerce-checkout #wfacp-e-form .bbx-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
html body.woocommerce-checkout #wfacp-e-form .bbx-pills small {
	font-size: 11px; font-weight: 400; color: #166534; background: #dcfce7;
	padding: 3px 8px; border-radius: 999px; line-height: 1.3;
}
html body.woocommerce-checkout #wfacp-e-form .bbx-price { flex: 0 0 auto; text-align: right; padding-left: 4px; }
html body.woocommerce-checkout #wfacp-e-form .bbx-was {
	display: block; font-size: 11.5px; font-weight: 400; color: #9ca3af; text-decoration: line-through; margin-bottom: 1px;
}
html body.woocommerce-checkout #wfacp-e-form .bbx-now {
	display: block; font-size: 17px; font-weight: 400; color: #c83784; line-height: 1.15; letter-spacing: -.01em;
}

/* -------------------------------------------------------------- phones --- */
@media (max-width: 767px) {
	html body.woocommerce-checkout #wfacp-e-form .bbx-head { padding: 10px 12px; gap: 10px; }
	html body.woocommerce-checkout #wfacp-e-form .bbx-title { font-size: 13.5px; }
	html body.woocommerce-checkout #wfacp-e-form .bbx-body { padding: 10px 12px; gap: 10px; }
	/* compact image on a phone, full size from 768px up */
	html body.woocommerce-checkout #wfacp-e-form .bbx-img { flex-basis: 46px; width: 46px; height: 46px; border-radius: 8px; }
	html body.woocommerce-checkout #wfacp-e-form .bbx-name { font-size: 12.5px; }
	html body.woocommerce-checkout #wfacp-e-form .bbx-meta { font-size: 11.5px; line-height: 1.4; }
	html body.woocommerce-checkout #wfacp-e-form .bbx-pills { gap: 5px; margin-top: 6px; }
	html body.woocommerce-checkout #wfacp-e-form .bbx-pills small { font-size: 10px; padding: 2px 7px; }
	html body.woocommerce-checkout #wfacp-e-form .bbx-now { font-size: 15.5px; }
	html body.woocommerce-checkout #wfacp-e-form .bbx-was { font-size: 11px; }
}
@media (min-width: 768px) {
	html body.woocommerce-checkout #wfacp-e-form .bbx-img { flex-basis: 78px; width: 78px; height: 78px; }
	html body.woocommerce-checkout #wfacp-e-form .bbx-now { font-size: 18px; }
}
