/* FunnelKit checkout pages in the Culinartica look. Scoped to the checkout body so nothing else changes. */

/* Every text in our font (prices and summary rows included); icon fonts keep theirs. */
body.wfacp_checkout-template,
body.wfacp_checkout-template :where(*:not(i):not([class*="icon"]):not([class*="dashicons"]):not([class^="fa"])) {
	font-family: var(--font, Heebo, system-ui, sans-serif) !important;
}

body.wfacp_checkout-template { background: var(--c-ground, #F7F6F3); color: var(--c-ink, #1C1B1F); }

/* The form card */
body.wfacp_checkout-template .wfacp_main_form,
body.wfacp_checkout-template .wfacp_form_cart {
	background: #FFFFFF;
	border: 1px solid var(--c-line, #EFECE7) !important;
	border-radius: 24px !important;
	box-shadow: 0 18px 48px rgb(0 0 0 / 0.06);
}
body.wfacp_checkout-template .wfacp_main_form { padding: 22px 20px !important; }

body.wfacp_checkout-template .wfacp_section_heading,
body.wfacp_checkout-template .wfacp_section_title,
body.wfacp_checkout-template .wfacp-comm-title h2 {
	font-size: 18px !important;
	font-weight: 800 !important;
	color: var(--c-ink, #1C1B1F) !important;
}

/* Fields */
body.wfacp_checkout-template .wfacp-form-control-label { font-size: 14px !important; font-weight: 700 !important; color: var(--c-ink, #1C1B1F) !important; }
body.wfacp_checkout-template .wfacp-form-control,
body.wfacp_checkout-template .wfacp_main_form input[type="text"],
body.wfacp_checkout-template .wfacp_main_form input[type="email"],
body.wfacp_checkout-template .wfacp_main_form input[type="tel"],
body.wfacp_checkout-template .wfacp_main_form select {
	min-height: 50px !important;
	border: 1px solid var(--c-line-strong, #DDD9D3) !important;
	border-radius: 16px !important;
	background: #FFFFFF !important;
	font-size: 16px !important; /* No zoom-in on iPhone. */
	box-shadow: none !important;
}
body.wfacp_checkout-template .wfacp-form-control:focus,
body.wfacp_checkout-template .wfacp_main_form input:focus {
	border-color: var(--c-accent, #D9262E) !important;
	box-shadow: 0 0 0 3px rgb(217 38 46 / 0.12) !important;
	outline: none !important;
}

/* Pay button */
body.wfacp_checkout-template #place_order,
body.wfacp_checkout-template .wfacp-next-btn-wrap button,
body.wfacp_checkout-template .wfacp_main_form .button.alt {
	width: 100% !important;
	min-height: 58px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--c-accent, #D9262E) !important;
	color: #FFFFFF !important;
	font-size: 18px !important;
	font-weight: 800 !important;
	box-shadow: 0 10px 24px rgb(217 38 46 / 0.25) !important;
	transition: background .15s ease;
}
body.wfacp_checkout-template #place_order:hover { background: #BD1F26 !important; }

/* Order summary */
body.wfacp_checkout-template .wfacp_order_summary_container,
body.wfacp_checkout-template .wfacp_collapsible_order_summary_wrap {
	border-radius: 16px !important;
	background: var(--c-ground, #F7F6F3) !important;
}
body.wfacp_checkout-template .wfacp_order_sum .amount,
body.wfacp_checkout-template .order-total .amount { font-weight: 800 !important; color: var(--c-ink, #1C1B1F) !important; }

/* Payment methods */
body.wfacp_checkout-template .wc_payment_methods { border-radius: 16px !important; overflow: hidden; }

/* Links and small print */
body.wfacp_checkout-template a { color: var(--c-accent, #D9262E); }
body.wfacp_checkout-template .woocommerce-terms-and-conditions-wrapper,
body.wfacp_checkout-template .woocommerce-privacy-policy-text { font-size: 13px !important; color: var(--c-muted, #5E5B57) !important; }

/* One frame: ours. Elementor's coloured border around the form widget goes. */
body.wfacp_checkout-template .elementor-widget-wfacp_form > .elementor-widget-container { border: 0 !important; padding: 0 !important; box-shadow: none !important; background: transparent !important; }

/* The site's logo instead of the old English one ("Culinartica · Discover culinary continent"). */
body.wfacp_checkout-template img[src$="svg.svg"] { display: none !important; }
body.wfacp_checkout-template .elementor-widget-image:has(img[src$="svg.svg"]) .elementor-widget-container::before {
	content: "קולינרטיקה";
	display: inline-flex; align-items: center; gap: 10px;
	min-height: 40px; padding-inline-start: 46px;
	background: url("../img/icon.png") no-repeat right center / 36px 36px;
	font: 800 22px/1 var(--font, Heebo, sans-serif); color: var(--c-ink, #1C1B1F);
}

/* Phones: less padding, nothing wider than the screen */
@media (max-width: 767px) {
	body.wfacp_checkout-template { overflow-x: hidden; }
	body.wfacp_checkout-template .elementor-section > .elementor-container { padding-inline: 12px !important; }
	body.wfacp_checkout-template .wfacp_main_form { padding: 18px 14px !important; border-radius: 20px !important; }
	body.wfacp_checkout-template img { max-width: 100%; height: auto; }
}

/* What you're buying: one strip above the form */
body.wfacp_checkout-template .checkout-strip {
	margin: 0 0 14px;
	padding: 14px 18px;
	border: 1px solid var(--c-line, #EFECE7);
	border-radius: 20px;
	background: #FFFFFF;
	box-shadow: 0 10px 30px rgb(0 0 0 / 0.05);
}
body.wfacp_checkout-template .checkout-strip__main { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
body.wfacp_checkout-template .checkout-strip__title { font-size: 15px; font-weight: 700; color: var(--c-ink, #1C1B1F); }
body.wfacp_checkout-template .checkout-strip__price { font-size: 20px; font-weight: 800; color: var(--c-accent, #D9262E); white-space: nowrap; }
body.wfacp_checkout-template .checkout-strip__note { margin: 4px 0 0; font-size: 14px; color: var(--c-ink, #1C1B1F); }
body.wfacp_checkout-template .checkout-strip__safe { margin: 6px 0 0; font-size: 13px; color: var(--c-muted, #5E5B57); }
body.wfacp_checkout-template .checkout-strip__safe::before { content: "🔒 "; }

/* Order summary: room inside the box, so prices don't touch its edge */
body.wfacp_checkout-template .wfacp_order_summary_container { padding: 6px 16px 12px !important; }
body.wfacp_checkout-template .wfacp_order_summary_container table { margin: 0 !important; }
body.wfacp_checkout-template .wfacp_order_summary_container td:last-child,
body.wfacp_checkout-template .wfacp_order_summary_container th:last-child { white-space: nowrap; }

@media (max-width: 767px) {
	/* One card, not a card inside a grey panel: the form gets the full width */
	body.wfacp_checkout-template .elementor-top-column > .elementor-widget-wrap { padding: 0 !important; background: transparent !important; }
	body.wfacp_checkout-template h1.elementor-heading-title,
	body.wfacp_checkout-template h2.elementor-heading-title { font-size: 22px !important; line-height: 1.3 !important; }
	body.wfacp_checkout-template .elementor-top-section:nth-of-type(2) > .elementor-container { padding-block: 8px !important; }
	body.wfacp_checkout-template .elementor-top-section:nth-of-type(2) .elementor-widget-wrap { padding-block: 0 !important; }
	body.wfacp_checkout-template .checkout-strip { margin-inline: 0; }
	body.wfacp_checkout-template .wfacp_order_summary_container { padding-inline: 12px !important; }
}

/* Phones: the form comes first in its column (perks, image and reviews follow it), so the first field is on screen. */
@media (max-width: 767px) {
	body.wfacp_checkout-template .elementor-widget-wrap > .elementor-widget-wfacp_form { order: -1; }
	body.wfacp_checkout-template .elementor-widget-wrap:has(> .elementor-widget-wfacp_form) > .elementor-widget:not(.elementor-widget-wfacp_form) { margin-block-start: 16px; }
	body.wfacp_checkout-template .wfacp_main_form { padding: 18px 14px !important; }
}

/* An old rule in the checkout pages' Elementor CSS (from the CardCom days, when paying happened on CardCom's page)
   hides the payment methods, and with them Stripe's card fields. Stripe pays on the page, so they must show. */
body.wfacp_checkout-template #payment ul.wc_payment_methods { display: block !important; }
body.wfacp_checkout-template #payment .payment_box { display: block !important; }
body.wfacp_checkout-template #payment .payment_method_label { display: inline-flex !important; }

/* The order bump's description: 8 lines, then "עוד" (the button is added by the page script). */
body.wfacp_checkout-template .is-clamped { display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 8; overflow: hidden; }
body.wfacp_checkout-template .checkout-more { margin-block-start: 6px; padding: 4px 12px; border: 1px solid var(--c-line-strong, #DDD9D3) !important; border-radius: 999px; background: #FFFFFF !important; color: var(--c-ink, #1C1B1F) !important; font-size: 13px !important; font-weight: 700; cursor: pointer; }

/* Recurring totals on phones: the price reads "249 ₪ לחודש" in one piece, the first payment date wraps inside its box. */
body.wfacp_checkout-template .recurring-totals td,
body.wfacp_checkout-template tr.recurring-total td,
body.wfacp_checkout-template .wfacp_recurring_total td { white-space: normal !important; text-align: end; }
body.wfacp_checkout-template .first-payment-date,
body.wfacp_checkout-template .first-payment-date small { display: block; white-space: normal !important; overflow-wrap: anywhere; max-width: 100%; font-size: 12px; color: var(--c-muted, #6B6B6B); }
body.wfacp_checkout-template .woocommerce-Price-amount { white-space: nowrap; unicode-bidi: isolate; }

/* Nothing pops up while paying: OptinMonster's popups and floating bars (its inline forms elsewhere stay). */
.Campaign.CampaignType--popup, .Campaign.CampaignType--fullscreen, .Campaign.CampaignType--floating,
.Campaign.CampaignType--slide, .Campaign.CampaignType--sidebar, .om-holder-popup,
.elementor-location-popup, .elementor-popup-modal { display: none !important; }
html.om-position-popup, html.om-position-popup body, body.om-effect-overlay { overflow: auto !important; }
