/**
 * LBBA MCLE checkout and thank-you pages (CartFlows Instant Layout inside the
 * Kadence header and footer). Navy and gold, same as the course pages.
 * Layout approach follows the SERU site's funnel.
 */

body.cartflows_step-template {
	--lbba-navy: #0b2a5b;
	--lbba-navy-dark: #071a3d;
	--lbba-gold: #c9a43a;
	--lbba-gold-dark: #8a6d1d;
	--lbba-ink: #0f1e36;
	--lbba-text: #3b4a61;
	--lbba-muted: #5b6b82;
	--lbba-line: #e3e8f0;
	--lbba-soft: #f3f5f9;
}

/* ---------- Page frame inside the theme ---------- */

body.cartflows_step-template .lbba-funnel-page {
	position: relative;
	padding: 48px 0 0;
	background: var(--lbba-soft);
}

body.cartflows_step-template .lbba-funnel-page .main-container--wrapper,
body.cartflows_step-template .lbba-funnel-page.wrapper .main-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px 80px !important;
}

body.cartflows_step-template .lbba-funnel-page,
body.cartflows_step-template .lbba-funnel-page .main-container--wrapper,
body.cartflows_step-template .lbba-funnel-page .checkout-form--wrapper {
	min-height: 0 !important;
	height: auto !important;
}

/* Form column as a white card; the Instant Layout columns must not paint full-height panels. */
body.cartflows_step-template .lbba-funnel-page .wcf-ic-layout-left-column {
	padding: 36px 36px 28px !important;
	border: 1px solid var(--lbba-line);
	border-radius: 18px;
	background: #fff;
}

body.cartflows_step-template .lbba-funnel-page .wcf-customer-info-main-wrapper {
	border: 0 !important;
	background: transparent !important;
}

body.cartflows_step-template .lbba-funnel-page .wcf-ic-layout-right-column {
	min-height: 0 !important;
	background: transparent !important;
}

/* Space between the form card and the order summary card (two-column layout only). */
@media (min-width: 769px) {
	body.cartflows_step-template .lbba-funnel-page .wcf-instant-checkout-wrapper {
		column-gap: 32px;
	}
}

/* ---------- Form ---------- */

body.cartflows_step-template .wcf-embed-checkout-form .woocommerce h3,
body.cartflows_step-template .wcf-embed-checkout-form #order_review_heading {
	color: var(--lbba-ink) !important;
	font-size: 22px !important;
	font-weight: 800 !important;
	letter-spacing: -0.01em;
	text-transform: none !important;
}

body.cartflows_step-template .wcf-embed-checkout-form .woocommerce form .form-row input.input-text,
body.cartflows_step-template .wcf-embed-checkout-form .woocommerce form .form-row select,
body.cartflows_step-template .wcf-embed-checkout-form .select2-container--default .select2-selection--single {
	min-height: 54px;
	border: 1.5px solid #d5dce7 !important;
	border-radius: 10px !important;
	background: #fff;
	box-shadow: none !important;
	color: var(--lbba-ink) !important;
	font-size: 16px !important;
}

body.cartflows_step-template .wcf-embed-checkout-form .woocommerce form .form-row input.input-text:focus,
body.cartflows_step-template .wcf-embed-checkout-form .select2-container--focus .select2-selection--single {
	border-color: var(--lbba-navy) !important;
	box-shadow: 0 0 0 4px rgba(11, 42, 91, 0.12) !important;
	outline: 0;
}

body.cartflows_step-template .wcf-embed-checkout-form .woocommerce form .form-row label {
	color: var(--lbba-muted) !important;
	font-size: 14px !important;
}

body.cartflows_step-template .wcf-embed-checkout-form .woocommerce-privacy-policy-text p {
	color: var(--lbba-muted);
	font-size: 14px;
}

body.cartflows_step-template .wcf-embed-checkout-form a {
	color: var(--lbba-navy);
}

/*
 * Show / hide password: WooCommerce draws the eye in ::before, and Kadence
 * plus CartFlows add a second one in ::after. Keep one, centred inside the field.
 */
body.cartflows_step-template .wcf-embed-checkout-form .woocommerce-input-wrapper.password-input {
	position: relative;
	display: block;
}

body.cartflows_step-template .wcf-embed-checkout-form .woocommerce-input-wrapper.password-input input.input-text {
	padding-right: 48px !important;
}

body.cartflows_step-template .wcf-embed-checkout-form .show-password-input {
	position: absolute !important;
	top: 50% !important;
	right: 14px !important;
	width: 24px !important;
	height: 24px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	opacity: 0.6;
	transform: none !important; /* WooCommerce already centres it with `translate`. */
	translate: 0 -50% !important;
	cursor: pointer;
}

body.cartflows_step-template .wcf-embed-checkout-form .show-password-input:hover,
body.cartflows_step-template .wcf-embed-checkout-form .show-password-input:focus-visible {
	opacity: 1;
}

body.cartflows_step-template .wcf-embed-checkout-form .show-password-input::after {
	display: none !important;
	content: none !important;
}

body.cartflows_step-template .wcf-embed-checkout-form .show-password-input::before {
	position: absolute;
	inset: 0;
	margin: auto;
}

/* Pay button */
body.cartflows_step-template .wcf-embed-checkout-form .woocommerce #payment #place_order,
body.cartflows_step-template .wcf-embed-checkout-form #place_order {
	min-height: 60px;
	border: 0 !important;
	border-radius: 12px !important;
	background: var(--lbba-navy) !important;
	box-shadow: 0 14px 28px -14px rgba(11, 42, 91, 0.8) !important;
	color: #fff !important;
	font-size: 18px !important;
	font-weight: 800 !important;
	transition: background-color 0.2s, transform 0.2s;
}

body.cartflows_step-template .wcf-embed-checkout-form #place_order:hover,
body.cartflows_step-template .wcf-embed-checkout-form #place_order:focus {
	background: var(--lbba-navy-dark) !important;
	transform: translateY(-1px);
}

/* Payment method box */
body.cartflows_step-template .wcf-embed-checkout-form #payment ul.payment_methods {
	overflow: hidden;
	border: 1.5px solid #d5dce7 !important;
	border-radius: 12px !important;
	background: #fff;
}

body.cartflows_step-template .wcf-embed-checkout-form #payment div.payment_box {
	background: var(--lbba-soft) !important;
	color: var(--lbba-text) !important;
}

/* Account creation visible from the start (CartFlows still switches to login when needed). */
body.cartflows_step-template .wcf-create-account-section {
	display: block !important;
}

body.cartflows_step-template .wcf-customer-login-section.wcf-show ~ .wcf-create-account-section {
	display: none !important;
}

/* "Already have an account? Log in here" */
body.cartflows_step-template .woocommerce-billing-fields__customer-login-label {
	display: none !important;
}

body.cartflows_step-template .lbba-co-account-note {
	margin: -6px 0 18px;
	color: var(--lbba-text);
	font-size: 15px;
	line-height: 1.6;
}

body.cartflows_step-template .lbba-co-account-note span {
	color: var(--lbba-ink);
	font-weight: 700;
}

body.cartflows_step-template .lbba-co-account-note a {
	color: var(--lbba-navy) !important;
	font-weight: 800;
	text-decoration: underline;
	text-underline-offset: 3px;
}

body.cartflows_step-template .wcf-customer-login-section__login-button {
	padding: 14px 28px !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: var(--lbba-navy) !important;
	color: #fff !important;
	font-weight: 800 !important;
	cursor: pointer;
}

/* ---------- Order summary ---------- */

body.cartflows_step-template .wcf-ic-layout-right-column .wcf-order-wrap {
	min-height: 0 !important;
	padding: 26px 26px 10px;
	border: 1px solid var(--lbba-line);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 24px 48px -32px rgba(11, 42, 91, 0.35);
}

body.cartflows_step-template .wcf-embed-checkout-form #order_review {
	min-height: 0 !important;
}

body.cartflows_step-template .wcf-embed-checkout-form .instant-checkout-order-review-table .wcf-product-name {
	color: var(--lbba-ink) !important;
	font-size: 17px !important;
	font-weight: 800 !important;
	line-height: 1.35;
}

body.cartflows_step-template .wcf-embed-checkout-form .wcf-product-thumbnail img {
	width: 92px !important;
	height: auto !important;
	border-radius: 10px !important;
}

body.cartflows_step-template .wcf-embed-checkout-form .instant-checkout-batch {
	background: var(--lbba-navy) !important;
}

body.cartflows_step-template .wcf-embed-checkout-form .instant-checkout-order-review-table tr.order-total th,
body.cartflows_step-template .wcf-embed-checkout-form .instant-checkout-order-review-table tr.order-total td,
body.cartflows_step-template .wcf-embed-checkout-form .instant-checkout-order-review-table tr.order-total .amount {
	font-size: 24px !important;
	font-weight: 800 !important;
}

body.cartflows_step-template .wcf-embed-checkout-form .wcf-optimized-coupon-field {
	color: var(--lbba-navy) !important;
	font-weight: 700;
}

/* What's included + trust */
.lbba-co-included {
	margin-top: 18px;
	padding: 22px 26px;
	border: 1px solid var(--lbba-line, #e3e8f0);
	border-radius: 18px;
	background: #fff;
}

.lbba-co-included h4 {
	margin: 0 0 12px;
	color: #0f1e36;
	font-size: 18px;
	font-weight: 800;
	text-transform: none;
}

.lbba-co-included ul {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lbba-co-included li {
	position: relative;
	padding-left: 32px;
	color: #0f1e36;
	font-size: 15px;
	line-height: 1.5;
}

.lbba-co-included li::before {
	content: "";
	position: absolute;
	top: 1px;
	left: 0;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #f7f0dc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a6d1d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") no-repeat center / 13px;
}

.lbba-co-trust {
	display: grid;
	gap: 10px;
	margin-top: 16px;
	padding: 4px 6px;
}

.lbba-co-trust span {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #3b4a61;
	font-size: 14px;
	font-weight: 600;
}

.lbba-co-trust .lbba-icon {
	color: #0b2a5b;
}

/* ---------- Thank you ---------- */

body.cartflows_step-template .wcf-thankyou-wrap {
	display: contents; /* Wrapper only appears on Windows hosts. */
}

body.cartflows_step-template .lbba-funnel-page.wrapper {
	padding-top: 0 !important;
	background: transparent;
}

body.cartflows_step-template .lbba-funnel-page.wrapper .main-container {
	max-width: none;
	padding: 0 !important;
}

body.cartflows_step-template .lbba-funnel-page.wrapper .wcf-ic-layout-left-column {
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: #fff !important;
}

body.cartflows_step-template .lbba-funnel-page.wrapper .wcf-ic-layout-right-column {
	background: var(--lbba-soft) !important;
}

body.cartflows_step-template .lbba-ty-box {
	display: grid;
	gap: 8px;
	justify-items: start;
	margin: 0 0 22px;
	padding: 22px 24px;
	border: 1px solid #b9c7de;
	border-radius: 16px;
	background: #eef2f8;
}

body.cartflows_step-template .lbba-ty-box.is-pending {
	border-color: #f5d7a1;
	background: #fff8eb;
}

body.cartflows_step-template .lbba-ty-box strong {
	color: var(--lbba-ink);
	font-size: 22px;
	font-weight: 800;
	line-height: 1.3;
}

body.cartflows_step-template .lbba-ty-box span {
	color: var(--lbba-text);
	font-size: 16px;
	line-height: 1.6;
}

body.cartflows_step-template .lbba-ty-box__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 8px;
}

body.cartflows_step-template .lbba-ty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 22px;
	border-radius: 10px;
	background: var(--lbba-navy);
	color: #fff !important;
	font-size: 16px;
	font-weight: 800;
	text-decoration: none !important;
}

body.cartflows_step-template .lbba-ty-btn:hover {
	background: var(--lbba-navy-dark);
}

body.cartflows_step-template .lbba-ty-btn.is-ghost {
	border: 2px solid var(--lbba-line);
	background: #fff;
	color: var(--lbba-ink) !important;
}

body.cartflows_step-template .lbba-ty-btn.is-ghost:hover {
	border-color: var(--lbba-navy);
}

body.cartflows_step-template .wcf-ic-button--ty,
body.cartflows_step-template a.wcf-ic-button {
	padding: 14px 24px !important;
	border-color: var(--lbba-navy) !important;
	border-radius: 10px !important;
	background: var(--lbba-navy) !important;
	color: #fff !important;
	font-weight: 800 !important;
}

/* ---------- Phones ---------- */

@media (max-width: 768px) {
	body.cartflows_step-template .lbba-funnel-page {
		padding-top: 16px;
	}

	body.cartflows_step-template .lbba-funnel-page .main-container--wrapper,
	body.cartflows_step-template .lbba-funnel-page.wrapper .main-container {
		padding: 0 14px 48px !important;
	}

	body.cartflows_step-template .lbba-funnel-page .wcf-ic-layout-left-column {
		padding: 18px 4px 8px !important;
		border: 0 !important;
		background: transparent !important;
	}

	body.cartflows_step-template .wcf-ic-layout-right-column .wcf-order-wrap {
		padding: 18px 18px 6px;
	}

	body.cartflows_step-template .lbba-ty-btn {
		width: 100%;
	}
}
