/*
 * Footer builder (src/FooterBuilder/). Colours and sizes come from custom properties set in style
 * attributes; the mobile rules depend on the store's breakpoint and are printed inline by the renderer.
 * Logical properties only, so the same rules work in RTL and LTR.
 */

#jfb-wrap {
	display: contents;
}

.jfb {
	--jfb-text: var(--jfb-color, #cbd5e1);
	--jfb-line: var(--jfb-border, color-mix(in srgb, var(--jfb-text) 18%, transparent));
	--jfb-accent-color: var(--jfb-accent, var(--jfb-heading, #ffffff));
	background: var(--jfb-bg, #0f172a);
	color: var(--jfb-text);
	font-size: var(--jfb-fs, 14px);
	line-height: 1.75;
	margin-block-start: 0;
}

.jfb a {
	color: var(--jfb-link, var(--jfb-text));
	text-decoration: none;
	transition: color 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.jfb a:hover,
.jfb a:focus-visible {
	color: var(--jfb-link-hover, var(--jfb-heading, #ffffff));
}

/* Rows */

.jfb-row {
	background: var(--jfb-row-bg, transparent);
	color: var(--jfb-row-color, inherit);
	padding-block: var(--jfb-pad, 40px);
}

.jfb-row--border {
	border-block-start: 1px solid var(--jfb-row-border, var(--jfb-line));
}

.jfb .jfb-row:first-of-type {
	border-block-start: 0;
}

.jfb-container--full {
	padding-inline: clamp(16px, 4vw, 48px);
}

.jfb-grid {
	display: grid;
	grid-template-columns: var(--jfb-cols, 1fr);
	column-gap: var(--jfb-gap, 32px);
	row-gap: 24px;
	align-items: start;
}

.jfb-col {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}

.jfb-align-center .jfb-col {
	align-items: center;
	text-align: center;
}

.jfb-align-edges .jfb-grid {
	align-items: center;
}

.jfb-align-edges .jfb-col:last-child:not(:first-child) {
	align-items: flex-end;
	text-align: end;
}

.jfb-align-edges .jfb-col:not(:first-child):not(:last-child) {
	align-items: center;
	text-align: center;
}

.jfb-row--bottom {
	font-size: 0.93em;
}

/* Elements */

.jfb-el {
	min-width: 0;
	max-width: 100%;
}

/* The advantages grid needs the column's full width, also in a centred row. */
.jfb-el--features {
	align-self: stretch;
}

.jfb .jfb-title {
	color: var(--jfb-heading, #ffffff);
	font-size: var(--jfb-hs, 16px);
	font-weight: 700;
	line-height: 1.4;
	margin: 0 0 14px;
	padding: 0;
	border: 0;
	background: none;
}

.jfb--upper .jfb-title {
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.jfb-text p {
	margin: 0 0 0.8em;
}

.jfb-text p:last-child {
	margin-block-end: 0;
}

.jfb-logo {
	display: inline-block;
	line-height: 0;
}

.jfb-logo img {
	width: var(--jfb-logo-w, 150px);
	max-width: 100%;
	height: auto;
}

.jfb-site-name {
	display: inline-block;
	color: var(--jfb-heading, #ffffff);
	font-size: 1.6em;
	font-weight: 800;
	line-height: 1.2;
}

/* Lists: menus, categories, contact */

.jfb-menu,
.jfb-contact,
.jfb-social,
.jfb-features,
.jfb-payments {
	list-style: none;
	margin: 0;
	padding: 0;
}

.jfb-menu li {
	margin: 0 0 8px;
	padding: 0;
}

.jfb-menu li:last-child {
	margin-block-end: 0;
}

.jfb-menu a {
	opacity: 0.88;
}

.jfb-menu a:hover {
	opacity: 1;
}

.jfb-menu--inline {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
}

.jfb-align-center .jfb-menu--inline,
.jfb-align-edges .jfb-col:not(:first-child):not(:last-child) .jfb-menu--inline {
	justify-content: center;
}

.jfb-menu--inline li {
	margin: 0;
}

.jfb-count {
	opacity: 0.6;
	font-size: 0.9em;
}

.jfb-contact li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 10px;
}

.jfb-contact li:last-child {
	margin-block-end: 0;
}

.jfb-contact i {
	color: var(--jfb-accent-color);
	width: 16px;
	margin-block-start: 0.45em;
	text-align: center;
	flex: none;
}

.jfb-align-center .jfb-contact li {
	justify-content: center;
}

/* Social icons */

.jfb-social {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.jfb-align-center .jfb-social {
	justify-content: center;
}

.jfb-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--jfb-social-size, 38px);
	height: var(--jfb-social-size, 38px);
	font-size: calc(var(--jfb-social-size, 38px) * 0.42);
	color: var(--jfb-social-color, var(--jfb-heading, #ffffff));
	background: var(--jfb-social-bg, color-mix(in srgb, var(--jfb-text) 14%, transparent));
}

.jfb-social--circle a {
	border-radius: 50%;
}

.jfb-social--square a {
	border-radius: 10px;
}

.jfb-social--plain a {
	background: none;
	width: auto;
	height: auto;
	font-size: calc(var(--jfb-social-size, 30px) * 0.6);
	padding: 2px;
}

.jfb-social a:hover {
	color: var(--jfb-social-color, var(--jfb-heading, #ffffff));
	opacity: 0.8;
	transform: translateY(-2px);
}

/* Store advantages */

.jfb-features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 18px 28px;
	width: 100%;
	text-align: start;
}

.jfb-feature {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
}

.jfb-features--boxed .jfb-feature {
	padding: 16px 18px;
	border: 1px solid var(--jfb-line);
	border-radius: 14px;
	background: color-mix(in srgb, var(--jfb-text) 5%, transparent);
}

.jfb-feature-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	flex: none;
	border-radius: 50%;
	font-size: 20px;
	color: var(--jfb-feature-icon, var(--jfb-accent-color));
	background: color-mix(in srgb, var(--jfb-feature-icon, var(--jfb-accent-color)) 14%, transparent);
}

.jfb-feature-text {
	display: flex;
	flex-direction: column;
	line-height: 1.45;
}

.jfb-feature-text strong {
	color: var(--jfb-heading, #ffffff);
	font-size: 1.02em;
}

.jfb-feature-text small {
	font-size: 0.9em;
	opacity: 0.85;
}

/* Payment methods */

.jfb-payments {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.jfb-align-center .jfb-payments,
.jfb-align-edges .jfb-col:last-child:not(:first-child) .jfb-payments {
	justify-content: flex-end;
}

.jfb-align-center .jfb-payments {
	justify-content: center;
}

.jfb-pay {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	padding: 5px 12px;
	border: 1px solid var(--jfb-line);
	border-radius: 999px;
	font-size: 0.86em;
	line-height: 1.4;
	white-space: nowrap;
}

.jfb-pay i {
	color: var(--jfb-accent-color);
	font-size: 1.15em;
}

/* Button */

.jfb-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 22px;
	border-radius: 999px;
	font-weight: 700;
	background: var(--jfb-btn-bg, #25d366);
	color: var(--jfb-btn-color, #ffffff) !important;
}

.jfb-button:hover {
	opacity: 0.9;
}

/* Widget areas (classic footer widgets inside the builder) */

.jfb-widgets .widget {
	margin: 0 0 24px;
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
}

.jfb-widgets .widget:last-child {
	margin-block-end: 0;
}

.jfb-widgets .widget-title,
.jfb-widgets .widgettitle,
.jfb-widgets h2,
.jfb-widgets h3,
.jfb-widgets h4 {
	color: var(--jfb-heading, inherit);
	font-size: var(--jfb-hs, 16px);
}

.jfb-widgets ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.jfb-copyright {
	opacity: 0.9;
}

/* Customizer preview only */

.jfb-placeholder {
	display: inline-block;
	padding: 6px 10px;
	border: 1px dashed currentColor;
	border-radius: 6px;
	font-size: 12px;
	opacity: 0.7;
}

/* Mobile accordion: keyboard focus on the titles */

.jfb-acc-ready .jfb-collapsible > .jfb-title:focus-visible {
	outline: 2px solid var(--jfb-accent-color);
	outline-offset: 2px;
}
