/* AM LP Book Checkout — Atlas-style es-qo stacked option cards */

.bt-lp-book {
	--bt-ink: #000;
	--bt-forest: #1b4332;
	--bt-price: #15ac00;
	--bt-selected-bg: #fff0ea;
	--bt-selected-border: #ff0000;
	--bt-muted-border: #d1d1d1;
	--bt-badge-from: #ff8f59;
	--bt-badge-to: #ff0844;
	--bt-fog: #f5f5f5;
	--bt-line: rgba(0, 0, 0, 0.1);
	--bt-card: #fff;
	font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
	color: var(--bt-ink);
	width: 100%;
	margin: 0 0 2.5rem;
}

.bt-lp-book *,
.bt-lp-book *::before,
.bt-lp-book *::after {
	box-sizing: border-box;
}

/* Optional hero — only when shortcode attrs provide title/subtitle */
.bt-lp-book__hero {
	background: linear-gradient(145deg, #0f241c 0%, #1b4332 48%, #2d6a4f 100%);
	color: #f7faf8;
	border-radius: 12px;
	padding: 1.35rem 1.25rem;
	margin-bottom: 1.1rem;
}

.bt-lp-book__hero h2 {
	margin: 0 0 0.35rem;
	font-size: clamp(1.25rem, 3vw, 1.65rem);
	line-height: 1.25;
	font-weight: 700;
}

.bt-lp-book__hero p {
	margin: 0;
	opacity: 0.88;
	font-size: 0.95rem;
}

/* ONE card per row, full width — Atlas es-qo spacing */
.bt-lp-book__options {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin-bottom: 0.85rem;
	width: 100%;
}

/* Atlas es-qo-container card */
.bt-lp-qty {
	appearance: none;
	-webkit-appearance: none;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.55rem;
	width: 100%;
	border: 1px solid var(--bt-muted-border);
	background: var(--bt-card);
	border-radius: 6px;
	padding: 5px 8px;
	cursor: pointer;
	text-align: left;
	transition: border-color 0.15s ease, background 0.15s ease, border-width 0.15s ease;
	position: relative;
	font: inherit;
	color: inherit;
	margin: 0;
}

.bt-lp-qty:hover {
	border-color: #b8b8b8;
}

/* Selected: peach bg + thick red border (Atlas offer-selected) */
.bt-lp-qty.is-active {
	border: 3px solid var(--bt-selected-border);
	background: var(--bt-selected-bg);
	padding: 3px 6px; /* keep outer size stable when border thickens */
	box-shadow: none;
}

.bt-lp-qty__media {
	flex: 0 0 72px;
	width: 72px;
	height: 72px;
	border-radius: 5px;
	overflow: hidden;
	background: var(--bt-fog);
	display: block;
	align-self: center;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.bt-lp-qty__media img,
.bt-lp-qty__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.bt-lp-qty__mid {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 0.2rem;
	padding: 0 0.15rem;
}

.bt-lp-qty__label {
	display: block;
	font-weight: 800;
	font-size: 16px;
	line-height: 1.25;
	color: #000;
	text-transform: uppercase;
}

/* Atlas es-offer-badge gradient — sentence case (no uppercase transform) */
.bt-lp-qty__badge {
	display: inline-block;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	padding: 0 5px;
	border-radius: 4px;
	background: linear-gradient(270deg, var(--bt-badge-from) 0%, var(--bt-badge-to) 100%);
	white-space: nowrap;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	text-transform: none;
}

.bt-lp-qty__note {
	display: block;
	font-size: 0.78rem;
	font-weight: 700;
	color: #555;
	line-height: 1.2;
	text-transform: none; /* defeat theme button capitalize — keep note casing as written */
}

.bt-lp-qty__extra {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: var(--bt-price);
	line-height: 1.2;
}

.bt-lp-qty__prices {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	white-space: nowrap;
	padding: 0 0.35rem;
	text-align: end;
}

.bt-lp-qty__compare {
	display: block;
	font-size: 14px;
	color: #000;
	text-decoration: line-through;
	line-height: 1.2;
	opacity: 0.85;
}

.bt-lp-qty__price {
	display: block;
	font-size: 18px;
	font-weight: 800;
	color: var(--bt-price);
	line-height: 1.2;
}

.bt-lp-qty__price .amount,
.bt-lp-qty__price .woocommerce-Price-amount {
	font-weight: 800;
	color: var(--bt-price);
}

.bt-lp-book__checkout {
	background: #fff;
	border: 1px solid var(--bt-muted-border);
	border-radius: 6px;
	padding: 1.15rem 1rem 1.4rem;
}

.bt-lp-book__checkout h3 {
	margin: 0 0 1rem;
	font-size: 1.1rem;
	color: #111;
	font-weight: 800;
}

/* Totals-only busy: options stay clickable; no full-form dim */
.bt-lp-book.is-totals-busy .bt-lp-book__options {
	opacity: 1;
	pointer-events: auto;
}

.bt-lp-book .woocommerce-checkout-review-order-table.bt-lp-totals-busy,
.bt-lp-book.is-totals-busy .woocommerce-checkout-review-order-table {
	position: relative;
	opacity: 0.78;
	pointer-events: none;
	transition: opacity 0.12s ease;
}

.bt-lp-book .woocommerce-checkout-review-order-table.bt-lp-totals-busy::after,
.bt-lp-book.is-totals-busy .woocommerce-checkout-review-order-table::after {
	content: "";
	position: absolute;
	top: 0.35rem;
	right: 0.35rem;
	width: 1rem;
	height: 1rem;
	border: 2px solid rgba(0, 0, 0, 0.15);
	border-top-color: var(--bt-price);
	border-radius: 50%;
	animation: bt-lp-spin 0.55s linear infinite;
}

@keyframes bt-lp-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Qty / shipping sync gate: disable Place order + soft-lock Stripe */
.bt-lp-sync-status {
	margin: 0 0 0.65rem;
	font-size: 0.875rem;
	line-height: 1.35;
	color: #444;
	font-weight: 600;
}

.bt-lp-sync-status[hidden] {
	display: none !important;
}

.bt-lp-book.is-checkout-syncing #payment,
.bt-lp-book.is-checkout-syncing .woocommerce-checkout-payment,
body.bt-lp-checkout-syncing #payment,
body.bt-lp-checkout-syncing .woocommerce-checkout-payment {
	position: relative;
	pointer-events: none;
	opacity: 0.62;
	transition: opacity 0.12s ease;
}

.bt-lp-book.is-checkout-syncing #payment::after,
.bt-lp-book.is-checkout-syncing .woocommerce-checkout-payment.bt-lp-payment-locked::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 5;
	background: rgba(255, 255, 255, 0.35);
	pointer-events: none;
}

.bt-lp-book.is-checkout-syncing #place_order,
.bt-lp-book.is-checkout-syncing .place-order .button,
.bt-lp-book.is-checkout-syncing .woocommerce-checkout button[name="woocommerce_checkout_place_order"],
body.bt-lp-checkout-syncing #place_order {
	pointer-events: none !important;
	opacity: 0.55 !important;
	cursor: not-allowed !important;
}

/* Hide Woo blockUI during soft reconcile + never cover Stripe / place-order on LP */
body.bt-lp-soft-checkout .blockUI.blockOverlay,
body.bt-lp-soft-checkout .blockUI.blockMsg,
.bt-lp-book #payment .blockUI,
.bt-lp-book .woocommerce-checkout-payment .blockUI,
.bt-lp-book .place-order .blockUI,
body.bt-lp-book-checkout #payment .blockUI,
body.bt-lp-book-checkout .woocommerce-checkout-payment .blockUI {
	display: none !important;
	pointer-events: none !important;
}

/* Place order clickable only when NOT syncing (overrides leftover overlays) */
.bt-lp-book:not(.is-checkout-syncing) #place_order,
.bt-lp-book:not(.is-checkout-syncing) .place-order .button,
body.bt-lp-book-checkout:not(.bt-lp-checkout-syncing) #place_order {
	pointer-events: auto !important;
	position: relative;
	z-index: 20;
}

.bt-lp-book .woocommerce-billing-fields > h3,
.bt-lp-book .woocommerce-additional-fields,
.bt-lp-book .woocommerce-shipping-fields,
.bt-lp-book #ship-to-different-address,
.bt-lp-book .woocommerce-form-coupon-toggle,
.bt-lp-book form.checkout_coupon,
.bt-lp-book .checkout_coupon {
	display: none !important;
}

.bt-lp-book .form-row {
	margin-bottom: 0.75rem;
}

.bt-lp-book #payment {
	margin-top: 1rem;
}

.bt-lp-book #place_order,
.bt-lp-book .place-order .button,
.bt-lp-book .woocommerce-checkout button[name="woocommerce_checkout_place_order"] {
	background: var(--bt-selected-border) !important;
	border-color: var(--bt-selected-border) !important;
	border-radius: 6px !important;
	font-weight: 800 !important;
	font-size: 18px !important;
	text-transform: uppercase !important;
	padding: 0.95rem 1.4rem !important;
}

.bt-lp-book .order-total .amount {
	color: var(--bt-price);
	font-weight: 800;
}

/* Mobile polish */
@media (max-width: 560px) {
	.bt-lp-book {
		margin-bottom: 1.75rem;
	}

	.bt-lp-qty {
		gap: 0.45rem;
		padding: 5px 6px;
	}

	.bt-lp-qty.is-active {
		padding: 3px 4px;
	}

	.bt-lp-qty__media {
		flex-basis: 60px;
		width: 60px;
		height: 60px;
	}

	.bt-lp-qty__label {
		font-size: 15px;
	}

	.bt-lp-qty__badge {
		font-size: 14px;
		white-space: normal;
	}

	.bt-lp-qty__price {
		font-size: 16px;
	}

	.bt-lp-book__checkout {
		padding: 1rem 0.85rem 1.2rem;
	}
}
