/*
 * FunnelKit Shop Checkout, SFD Custom 50/50 Split Design (Figma Modal Match)
 *
 * Custom checkout template matching the checkout modal design:
 *   LEFT:  Logo, order summary (FunnelKit shop_table), review carousel
 *   RIGHT: Form fields, payment, place order
 *
 * The custom header.php/footer.php wrap everything in:
 *   .sfd-checkout-embed-wrapper > .sfd-checkout-inner > .sfd-checkout-left + .sfd-checkout-right
 *
 * Loaded via wfacp_before_template_load hook in inc/funnelkit-sfd-template.php
 */

/* ============================================
   GOOGLE FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* ============================================
   PAGE BACKGROUND, 50/50 Split (full width)
   ============================================ */
body.sfd-shop-checkout,
body.sfd-plan-checkout {
	background: #F8F8F8 !important;
	min-height: 100vh;
	font-family: 'Nunito', sans-serif;
	margin: 0;
	padding: 0;
}

/* ============================================
   MAIN WRAPPER, 50/50 Flex Layout (full width)
   ============================================ */
.sfd-checkout-embed-wrapper {
	display: flex;
	min-height: 100vh;
	width: 100%;
	max-width: 100%;
	margin: 0;
	background: linear-gradient(to right, #F8F8F8 50%, #FFFFFF 50%);
}

/* ============================================
   INNER CONTENT, Centered at 1440px
   ============================================ */
.sfd-checkout-inner {
	display: flex;
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
}

/* ============================================
   LEFT COLUMN, Logo, Order Summary, Testimonial
   ============================================ */
.sfd-checkout-left {
	flex: 1;
	background: #F8F8F8;
	padding: 48px 40px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

/* ============================================
   RIGHT COLUMN, Form Fields, Payment
   ============================================ */
.sfd-checkout-right {
	flex: 1;
	background: #FFFFFF;
	padding: 48px 40px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

/* ============================================
   LOGO, SuperFastDiet Branding
   ============================================ */
.sfd-checkout-logo {
	font-size: 24px;
	font-weight: 800;
	margin-bottom: 32px;
	letter-spacing: -0.5px;
	font-family: 'Nunito', sans-serif;
}

.sfd-checkout-logo .logo-super { color: #6EC417; }
.sfd-checkout-logo .logo-fast { color: #FBA223; }
.sfd-checkout-logo .logo-diet { color: #F34188; }

/* ============================================
   PRODUCT TITLE
   ============================================ */
.sfd-checkout-title {
	font-family: 'Nunito', sans-serif;
	font-weight: 700;
	font-size: 36px;
	color: #262626;
	margin: 0 0 12px;
	letter-spacing: -0.72px;
	line-height: 1.2;
}

.sfd-checkout-subtitle {
	font-family: 'Nunito', sans-serif;
	font-size: 16px;
	color: #646464;
	margin: 0 0 32px;
	line-height: 1.5;
}

/* ============================================
   ORDER SUMMARY, Left Column
   ============================================ */
.sfd-checkout-order-summary {
	margin-bottom: 24px;
}

.sfd-checkout-order-summary .wfacp_order_summary {
	margin: 0;
	padding: 0;
	background: transparent;
	border: none;
	box-shadow: none;
}

.sfd-checkout-order-summary .wfacp_order_summary_container {
	background: #FFFFFF;
	border: 2px solid #D9D9D9;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sfd-checkout-order-summary .wfacp-order-summary-label {
	font-family: 'Nunito', sans-serif;
	font-weight: 800 !important;
	font-size: 14px !important;
	color: #262626 !important;
	margin-bottom: 16px !important;
	letter-spacing: 0;
	text-transform: none;
	display: block;
}

.sfd-checkout-order-summary .shop_table {
	width: 100%;
	border-collapse: collapse;
}

.sfd-checkout-order-summary .shop_table th {
	font-family: 'Nunito', sans-serif;
	font-size: 12px;
	font-weight: 700;
	color: #808080;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 8px 0;
	border-bottom: 1px solid #E5E5E5;
}

.sfd-checkout-order-summary .shop_table td {
	padding: 12px 0;
	border-bottom: 1px solid #E5E5E5;
	font-family: 'Nunito', sans-serif;
	font-size: 14px;
	color: #262626;
}

.sfd-checkout-order-summary .shop_table .product-name .product-name-inner {
	font-weight: 700;
}

.sfd-checkout-order-summary .shop_table .product-total {
	text-align: right;
	font-weight: 700;
}

.sfd-checkout-order-summary .shop_table tr.cart_item:last-child td {
	border-bottom: 1px solid #E5E5E5;
}

.sfd-checkout-order-summary .shop_table tr.order-total td,
.sfd-checkout-order-summary .shop_table tr.order-total th {
	font-size: 18px;
	font-weight: 800;
	color: #262626;
	padding: 16px 0;
	border-bottom: none;
}

.sfd-checkout-order-summary .shop_table tr.order-total .woocommerce-Price-amount {
	font-size: 24px;
	font-weight: 800;
	color: #262626;
}

/* ============================================
   REVIEW CAROUSEL, Left Column (dynamic)
   ============================================ */
.sfd-checkout-left .sfd-review-carousel {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid #E5E5E5;
	max-width: 100%;
}

/* ============================================
   FORM CONTAINER, Right Column (Figma Modal Style)
   ============================================ */
.sfd-checkout-right .wfacp_main_form.woocommerce {
	background: #FFFFFF;
	border: 2px solid #D9D9D9;
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 32px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sfd-checkout-right .wfacp_section_title {
	font-family: 'Nunito', sans-serif;
	font-weight: 800 !important;
	font-size: 14px !important;
	color: #262626 !important;
	margin-bottom: 20px !important;
	letter-spacing: 0;
	text-transform: none;
}

.sfd-checkout-right label.wfacp-form-control-label {
	font-family: 'Nunito', sans-serif;
	font-size: 14px;
	font-weight: 700;
	color: #262626;
	margin-bottom: 8px;
}

.sfd-checkout-right .wfacp-form-control,
.sfd-checkout-right input[type="text"],
.sfd-checkout-right input[type="email"],
.sfd-checkout-right input[type="tel"],
.sfd-checkout-right select {
	width: 100%;
	height: 36px !important;
	padding: 8px 12px !important;
	border: 1px solid #D9D9D9 !important;
	border-radius: 8px !important;
	font-family: 'Nunito', sans-serif;
	font-size: 14px;
	color: #262626;
	background: #FFFFFF;
	transition: all 0.2s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sfd-checkout-right .wfacp-form-control:focus,
.sfd-checkout-right input:focus,
.sfd-checkout-right select:focus {
	outline: none;
	border-color: #8CD933 !important;
	box-shadow: 0 0 0 3px rgba(140, 217, 51, 0.1) !important;
}

.sfd-checkout-right .wfacp-form-control-wrapper {
	margin-bottom: 16px;
}

.sfd-checkout-right input::placeholder {
	color: #808080;
}

/* Two-column grid for first/last name */
.sfd-checkout-right .wfacp-section .wfacp-row:first-child {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

/* ============================================
   PAYMENT METHODS, Right Column
   ============================================ */
.sfd-checkout-right #payment {
	margin-top: 0;
}

.sfd-checkout-right .wc_payment_methods {
	list-style: none;
	padding: 0;
	margin: 0 0 20px;
}

.sfd-checkout-right .wc_payment_method {
	background: #FFFFFF;
	border: 2px solid #D9D9D9;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 16px;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sfd-checkout-right .wc_payment_method:hover {
	border-color: #8CD933;
}

.sfd-checkout-right .wc_payment_method label {
	color: #262626;
	font-weight: 700;
	font-size: 16px;
	font-family: 'Nunito', sans-serif;
}

.sfd-checkout-right .wc_payment_method input[type="radio"] {
	width: 16px;
	height: 16px;
	accent-color: #8CD933;
}

/* ============================================
   PLACE ORDER BUTTON
   ============================================ */
.sfd-checkout-right #place_order,
.sfd-checkout-right .button#place_order {
	width: 100%;
	height: 48px !important;
	background: #8CD933 !important;
	color: #FFFFFF !important;
	border: none !important;
	border-radius: 8px !important;
	font-family: 'Nunito', sans-serif;
	font-size: 16px !important;
	font-weight: 700 !important;
	cursor: pointer;
	transition: all 0.2s ease;
	padding: 0 !important;
	line-height: 48px !important;
}

.sfd-checkout-right #place_order:hover {
	background: #7BC829 !important;
	transform: translateY(-1px);
}

/* ============================================
   COUPON SECTION
   ============================================ */
.sfd-checkout-right .wfacp-coupon-section {
	margin-bottom: 24px;
}

.sfd-checkout-right .wfacp_main_showcoupon {
	color: #8CD933;
	font-weight: 600;
	cursor: pointer;
	font-family: 'Nunito', sans-serif;
}

.sfd-checkout-right .wfacp_woocommerce_form_coupon .wfacp-coupon-row input {
	border: 1px solid #D9D9D9;
	border-radius: 8px;
	padding: 8px 12px;
	height: 36px;
	font-family: 'Nunito', sans-serif;
	font-size: 14px;
}

.sfd-checkout-right .wfacp-coupon-btn {
	background: #8CD933;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-weight: 700;
	font-family: 'Nunito', sans-serif;
	height: 36px;
	padding: 0 16px;
	cursor: pointer;
}

/* ============================================
   TERMS & CONDITIONS
   ============================================ */
.sfd-checkout-right .woocommerce-terms-and-conditions-wrapper {
	margin-bottom: 24px;
	padding: 16px;
	background: #F8F8F8;
	border-radius: 8px;
}

.sfd-checkout-right .woocommerce-terms-and-conditions-wrapper label {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-weight: 400;
	font-size: 14px;
	color: #646464;
	cursor: pointer;
	font-family: 'Nunito', sans-serif;
}

.sfd-checkout-right .woocommerce-terms-and-conditions-wrapper input[type="checkbox"] {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	margin-top: 2px;
	accent-color: #8CD933;
}

.sfd-checkout-right .woocommerce-terms-and-conditions-wrapper a {
	color: #8CD933;
	text-decoration: underline;
}

/* ============================================
   HIDE ORDER SUMMARY IN RIGHT COLUMN (rendered in left column natively)
   ============================================ */
.sfd-checkout-right .wfacp_order_summary {
	display: none;
}

/* ============================================
   RESPONSIVE — TABLET & MOBILE
   ============================================ */
@media (max-width: 1024px) {
	/* Hide FunnelKit's duplicate "top mini-cart" on mobile/tablet.
	   FK renders the order summary in TWO containers — a collapsible
	   accordion at the top (.wfacp_mb_mini_cart_wrap) plus the full
	   summary embedded in the form (#order_summary_field) right above
	   the place-order button. We keep the second one because it's
	   adjacent to the CTA where users verify before paying. */
	.wfacp_mb_mini_cart_wrap,
	.wfacp_mb_mini_cart_sec_accordion,
	.wfacp_mb_mini_cart_sec_accordion_content,
	.wfacp_mb_cart_accordian {
		display: none !important;
	}

	/* Remove the split gradient — solid background when columns stack */
	body.sfd-shop-checkout,
	body.sfd-plan-checkout {
		background: #F8F8F8 !important;
	}
	.sfd-checkout-embed-wrapper {
		background: #F8F8F8 !important;
	}

	/* Stack the inner flex container (this is the actual flex parent of left/right) */
	.sfd-checkout-inner {
		flex-direction: column;
	}

	/* Put the form (right column) first on mobile — users came to buy */
	.sfd-checkout-right {
		order: 1;
		background: #FFFFFF;
		padding: 28px 20px 20px;
		border-bottom: 1px solid #E5E5E5;
	}
	.sfd-checkout-left {
		order: 2;
		background: #F8F8F8;
		padding: 24px 20px;
	}

	/* Font size 16px prevents iOS auto-zoom on input focus */
	.sfd-checkout-right .wfacp-form-control,
	.sfd-checkout-right input[type="text"],
	.sfd-checkout-right input[type="email"],
	.sfd-checkout-right input[type="tel"],
	.sfd-checkout-right select {
		height: 44px !important;
		font-size: 16px !important;
		padding: 10px 14px !important;
	}

	/* Larger, thumb-friendly place-order button */
	.sfd-checkout-right #place_order,
	.sfd-checkout-right .button#place_order {
		height: 52px !important;
		font-size: 18px !important;
		line-height: 52px !important;
	}

	.sfd-checkout-title {
		font-size: 24px;
		margin: 0 0 8px;
	}

	.sfd-checkout-subtitle {
		font-size: 15px;
		margin: 0 0 20px;
	}

	/* On mobile the left column renders order summary — hide the right-column duplicate */
	.sfd-checkout-right .wfacp_order_summary {
		display: none;
	}

	/* Review carousel is nice-to-have, hide on mobile to reduce scroll before CTA */
	.sfd-checkout-left .sfd-review-carousel {
		display: none;
	}

	/* Tighten up the form container */
	.sfd-checkout-right .wfacp_main_form.woocommerce {
		padding: 16px;
		margin-bottom: 20px;
	}

	/* Reduce spacing between form fields */
	.sfd-checkout-right .wfacp-form-control-wrapper {
		margin-bottom: 12px;
	}

	/* Payment method cards */
	.sfd-checkout-right .wc_payment_method {
		padding: 14px;
		margin-bottom: 8px;
	}
}

@media (max-width: 640px) {
	.sfd-checkout-right {
		padding: 20px 16px;
	}
	.sfd-checkout-left {
		padding: 20px 16px;
	}

	/* First/last name: side-by-side on wide mobile, stack on narrow */
	.sfd-checkout-right .wfacp-section .wfacp-row:first-child {
		grid-template-columns: 1fr;
	}

	.sfd-checkout-logo {
		font-size: 20px;
		margin-bottom: 20px;
	}

	.sfd-checkout-title {
		font-size: 22px;
	}

	/* Order summary card compact */
	.sfd-checkout-order-summary .wfacp_order_summary_container {
		padding: 16px;
	}
	.sfd-checkout-order-summary .shop_table tr.order-total .woocommerce-Price-amount {
		font-size: 20px;
		font-weight: 800;
	}
}
