/* Dentcademy Funnels — inherits Woodmart tokens, safe fallbacks for other themes. */
.dcf-bump,
.dcf-upsell,
.dcf-pay-note,
.dcf-offers,
.dcf-paybadges,
.dcf-email-hint,
body.dcf-express {
	--dcf-ink: var(--wd-primary-color, #0e0e0f);
	--dcf-muted: #666;
	--dcf-line: var(--brdcolor-gray-300, rgba(0, 0, 0, .105));
	--dcf-surface: var(--bgcolor-white, #fff);
	--dcf-soft: var(--bgcolor-gray-100, #f7f7f7);
	--dcf-radius: var(--wd-brd-radius, 0px);
}

/* ---------- Order bump ---------- */
.dcf-bump-slot:empty { display: none; }
.dcf-bump-slot,
.wp-block-dentcademy-funnels-order-bump { margin: 0 0 16px; }
.wp-block-dentcademy-funnels-order-bump:empty { display: none; }

.dcf-bump {
	border: 1px dashed var(--dcf-ink);
	border-radius: var(--dcf-radius);
	background: var(--dcf-surface);
	color: var(--dcf-ink);
	text-align: start;
	transition: box-shadow .2s ease, border-color .2s ease;
}
.dcf-bump.is-checked {
	border-style: solid;
	box-shadow: inset 0 0 0 1px var(--dcf-ink);
}
.dcf-bump.is-loading { opacity: .6; pointer-events: none; }

.woocommerce-checkout .dcf-bump .dcf-bump__label,
.dcf-bump .dcf-bump__label {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin: 0;
	padding: 12px 14px 8px;
	cursor: pointer;
	font-weight: 400;
	line-height: 1.4;
	color: var(--dcf-ink);
}
.dcf-bump .dcf-bump__check {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--dcf-ink);
	cursor: pointer;
}
.dcf-bump__label:focus-within { outline: 2px solid var(--dcf-ink); outline-offset: 2px; }
.dcf-bump__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dcf-bump__tag {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.dcf-bump__headline { font-size: 15px; }
.dcf-bump__headline strong { font-weight: 600; }
.dcf-bump__price { white-space: nowrap; font-weight: 600; }
.dcf-bump__price del { margin-inline-start: 4px; font-weight: 400; opacity: .6; }
.dcf-bump__price ins { text-decoration: none; }

.dcf-bump__body {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 0 14px 12px 46px;
	color: var(--dcf-muted);
	font-size: 14px;
	line-height: 1.45;
}
.dcf-bump__body img,
.dcf-bump__body .dcf-bump__img {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	object-fit: cover;
	margin: 0;
}
.dcf-bump__body p { margin: 0; }

/* ---------- Cart recommendation ----------
 * In the side cart the block sits inside the theme's list of cart items, so theme rules written for
 * product rows (flex rows, fixed image widths, link styles, separators) also reach it.
 * The !important declarations below neutralise exactly those, inside our own namespace only.
 */
.widget_shopping_cart li.dcf-upsell-li,
.woocommerce-mini-cart li.dcf-upsell-li,
li.dcf-upsell-li {
	display: block !important;
	flex: 1 1 100% !important;
	float: none !important;
	position: static !important;
	width: 100% !important;
	max-width: none !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 4px 15px 15px !important;
	border: 0 !important;
	background: none !important;
	list-style: none !important;
	box-sizing: border-box !important;
}
li.dcf-upsell-li::before,
li.dcf-upsell-li::after { content: none !important; display: none !important; }

.dcf-upsell {
	box-sizing: border-box;
	width: 100%;
	margin: 12px 0 0;
	padding: 12px;
	border: 1px solid var(--dcf-line);
	border-radius: var(--dcf-radius);
	background: var(--dcf-soft);
	color: var(--dcf-ink);
	text-align: start;
}
.dcf-upsell--cart_page { margin: 0 0 16px; }
.wp-block-dentcademy-funnels-cart-offer:empty { display: none; }
.dcf-upsell--cart_block { margin: 16px 0; }
.dcf-upsell .dcf-upsell__title { margin: 0 0 10px !important; padding: 0 !important; font-size: 14px !important; font-weight: 600; line-height: 1.3 !important; color: var(--dcf-ink); }

/* Thumbnail | name + price | button under the price: readable from 180 px to full width. */
.dcf-upsell .dcf-upsell__item {
	display: grid !important;
	grid-template-columns: 56px minmax(0, 1fr);
	grid-template-rows: auto auto;
	column-gap: 12px;
	row-gap: 8px;
	align-items: start;
	position: relative;
	margin: 0;
	padding: 0;
}
.dcf-upsell .dcf-upsell__item + .dcf-upsell__item { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--dcf-line); }
.dcf-upsell .dcf-upsell__thumb {
	grid-column: 1;
	grid-row: 1 / span 2;
	display: block !important;
	position: static !important;
	width: 56px !important;
	height: 56px !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	overflow: hidden;
}
.dcf-upsell .dcf-upsell__thumb img {
	display: block !important;
	width: 56px !important;
	min-width: 0 !important;
	max-width: 56px !important;
	height: 56px !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	object-fit: cover;
}
.dcf-upsell .dcf-upsell__info {
	grid-column: 2;
	grid-row: 1;
	display: flex !important;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	font-size: 14px;
	line-height: 1.35;
}
.dcf-upsell .dcf-upsell__name {
	display: -webkit-box !important;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	position: static !important;
	visibility: visible !important;
	opacity: 1 !important;
	font-size: 14px !important;
	font-weight: 500;
	line-height: 1.35 !important;
	color: var(--dcf-ink) !important;
}
.dcf-upsell .dcf-upsell__price { font-size: 14px; color: var(--dcf-muted); white-space: nowrap; }
.dcf-upsell .dcf-upsell__add {
	grid-column: 2;
	grid-row: 2;
	justify-self: start;
	width: auto !important;
	min-width: 0 !important;
	min-height: 34px;
	margin: 0 !important;
	padding: 0 18px !important;
	font-size: 13px !important;
	line-height: 34px !important;
}
.dcf-upsell .added_to_cart { display: none !important; }

/* ---------- Note under the checkout button ---------- */
.dcf-pay-note {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin: 10px 0 0;
	color: var(--dcf-muted);
	font-size: 13px;
	line-height: 1.45;
}
.dcf-pay-note svg { flex: 0 0 14px; margin-top: 2px; }

/* ---------- Checkout add-ons (Checkout block, up to 3, one tap) ---------- */
.dcf-offers { margin: 0 0 20px; color: var(--dcf-ink); text-align: start; }
.dcf-offers__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.dcf-offers .dcf-offers__title { margin: 0; font-size: 20px; font-weight: 500; line-height: 1.3; color: var(--dcf-ink); }
.dcf-offers .dcf-offers__all {
	min-height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--dcf-ink);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	box-shadow: none;
}
.dcf-offers .dcf-offers__all:disabled { opacity: .5; cursor: default; }
.dcf-offers .dcf-offers__sub { margin: 4px 0 12px; font-size: 14px; color: #555; }
.dcf-offers .dcf-offers__list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--dcf-line); }
.dcf-offers .dcf-offer {
	display: flex;
	gap: 14px;
	align-items: center;
	margin: 0;
	padding: 14px 16px;
	list-style: none;
	background: var(--dcf-surface);
	transition: background-color .15s ease;
}
.dcf-offers .dcf-offer + .dcf-offer { border-top: 1px solid var(--dcf-line); }
.dcf-offers .dcf-offer.is-added { background: var(--dcf-soft); }
.dcf-offers .dcf-offer.is-loading { opacity: .6; }
.dcf-offers .dcf-offer__img { flex: 0 0 48px; width: 48px !important; height: 64px !important; margin: 0; object-fit: cover; }
.dcf-offers .dcf-offer__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dcf-offers .dcf-offer__reason { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #333; }
.dcf-offers .dcf-offer__name { font-size: 15px; font-weight: 500; line-height: 1.35; }
.dcf-offers .dcf-offer__meta { font-size: 13px; color: var(--dcf-muted); }
.dcf-offers .dcf-offer__side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.dcf-offers .dcf-offer__price { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.dcf-offers .dcf-offer__price del { font-size: 13px; color: var(--dcf-muted); }
.dcf-offers .dcf-offer__price strong { font-weight: 600; }
.dcf-offers .dcf-offer__btn {
	min-width: 96px;
	min-height: 40px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--dcf-ink);
	border-radius: var(--dcf-radius);
	background: var(--dcf-surface);
	color: var(--dcf-ink);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	box-shadow: none;
}
.dcf-offers .dcf-offer__btn:hover { background: var(--dcf-soft); }
.dcf-offers .dcf-offer.is-added .dcf-offer__btn { background: var(--dcf-ink); color: #fff; }
.dcf-offers .dcf-offer__btn:focus-visible,
.dcf-offers .dcf-offers__all:focus-visible { outline: 2px solid #2798fe; outline-offset: 2px; }
.dcf-offers .dcf-offer__btn:disabled { cursor: default; }

/* ---------- Payment methods under the checkout button ---------- */
.dcf-paybadges {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}
.dcf-paybadges .dcf-paybadges__item {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 52px;
	height: 32px;
	margin: 0;
	padding: 0 10px;
	box-sizing: border-box;
	border: 1px solid #d0d0d0;
	border-radius: var(--dcf-radius);
	background: #fff;
	color: var(--dcf-ink);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	list-style: none;
}
.dcf-paybadges .dcf-paybadges__item--img { min-width: 0; padding: 0; border: 0; background: none; }
.dcf-paybadges .dcf-paybadges__item img { display: block; height: 28px; width: auto; max-width: 72px; margin: 0; object-fit: contain; }
.dcf-paybadges .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Email typo check ---------- */
.dcf-email-hint {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
	margin: 8px 0 0;
	padding: 8px 12px;
	border: 1px solid #e9c46a;
	background: #fff6e5;
	color: #5c4300;
	font-size: 14px;
	line-height: 1.45;
}
.dcf-email-hint .dcf-email-hint__fix {
	min-height: 40px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #5c4300;
	border-radius: 0;
	background: #fff;
	color: #5c4300;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

/* ---------- Express design (Checkout block page only: body.dcf-express) ---------- */
body.dcf-express .wp-block-woocommerce-checkout .wc-block-components-text-input input,
body.dcf-express .wp-block-woocommerce-checkout .wc-block-components-combobox .wc-block-components-combobox-control input,
body.dcf-express .wp-block-woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__select,
body.dcf-express .wp-block-woocommerce-checkout .wc-block-components-country-input input {
	border: 1px solid var(--dcf-ink);
	border-radius: 0;
}
body.dcf-express .wp-block-woocommerce-checkout .wc-block-components-checkout-step__title { font-weight: 500; }

body.dcf-express .wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button {
	width: 100%;
	min-height: 58px;
	border: 0;
	border-radius: 0;
	background: var(--dcf-ink);
	color: #fff;
	font-size: 17px;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
}
body.dcf-express .wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button:hover:not(:disabled) { background: #333; color: #fff; }
body.dcf-express .wp-block-woocommerce-checkout .wc-block-checkout__actions_row { flex-wrap: wrap; }
body.dcf-express .wp-block-woocommerce-checkout .wc-block-checkout__actions_row .wc-block-components-checkout-return-to-cart-button { order: 2; margin-top: 12px; }
body.dcf-express .wp-block-woocommerce-checkout .wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button { order: 1; }

/* Order summary column: soft panel, like the payment page. */
body.dcf-express .wp-block-woocommerce-checkout .wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block {
	border: 1px solid var(--dcf-line);
	border-radius: 0;
	background: #f9f9fa;
}
body.dcf-express .wp-block-woocommerce-checkout .wc-block-components-order-summary-item__image img { border-radius: 0; }
body.dcf-express .wp-block-woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-size: 22px; font-weight: 600; }

body.dcf-express .wp-block-woocommerce-checkout .dcf-pay-note { justify-content: center; text-align: center; }

@media (max-width: 767px) {
	.dcf-bump__body { padding-left: 14px; }
	.dcf-offers .dcf-offer { gap: 10px; padding: 12px; }
	.dcf-offers .dcf-offer__img { flex-basis: 36px; width: 36px !important; height: 48px !important; }
	.dcf-offers .dcf-offer__btn { min-width: 76px; min-height: 44px; padding: 0 10px; }
	.dcf-paybadges { gap: 4px; }
	.dcf-paybadges .dcf-paybadges__item { min-width: 0; height: 26px; padding: 0 6px; font-size: 11px; }
	.dcf-paybadges .dcf-paybadges__item img { height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.dcf-bump,
	.dcf-offers .dcf-offer { transition: none; }
}
