/*
 * Smart Breadcrumbs for Elementor
 * Preset and alignment rules use :where() so they have very low specificity
 * and Elementor's style controls always win over them.
 */

.sbfe-breadcrumbs {
	font-size: 14px;
	line-height: 1.6;
}

:where(.sbfe-breadcrumbs) ol.sbfe-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sbfe-breadcrumbs .sbfe-item {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0;
	min-width: 0;
}

.sbfe-breadcrumbs .sbfe-item::before,
.sbfe-breadcrumbs .sbfe-item::marker {
	content: none;
}

.sbfe-breadcrumbs a {
	text-decoration: none;
}

.sbfe-breadcrumbs .sbfe-box {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
}

.sbfe-breadcrumbs .sbfe-sep {
	display: inline-flex;
	align-items: center;
	margin-inline: 6px;
}

.sbfe-breadcrumbs .sbfe-current {
	font-weight: 600;
	overflow-wrap: anywhere;
}

/* Icons (Elementor icon library: SVG or icon font) */
.sbfe-breadcrumbs .sbfe-icon-wrap,
.sbfe-breadcrumbs .sbfe-sep-icon {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.sbfe-breadcrumbs .sbfe-icon-wrap svg,
.sbfe-breadcrumbs .sbfe-sep-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.sbfe-breadcrumbs .sbfe-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Alignment (physical left/right, also in RTL) ---------- */
:where(.sbfe-align-left) .sbfe-list   { justify-content: flex-start; }
:where(.sbfe-align-center) .sbfe-list { justify-content: center; }
:where(.sbfe-align-right) .sbfe-list  { justify-content: flex-end; }

:where([dir="rtl"]) :where(.sbfe-align-left) .sbfe-list  { justify-content: flex-end; }
:where([dir="rtl"]) :where(.sbfe-align-right) .sbfe-list { justify-content: flex-start; }

/* ---------- Preset: Pills ---------- */
:where(.sbfe-pill) ol.sbfe-list { gap: 4px; }
:where(.sbfe-pill) .sbfe-box {
	padding: 4px 14px;
	border-radius: 999px;
	background: #f1f3f5;
}
:where(.sbfe-pill) a.sbfe-box:hover { background: #e3e7eb; }
:where(.sbfe-pill) .sbfe-current    { background: #dfe6ee; }
:where(.sbfe-pill) .sbfe-sep        { margin-inline: 2px; }

/* ---------- Preset: Arrow chips (separators are replaced by the arrow shape) ---------- */
.sbfe-arrow .sbfe-sep { display: none; }
:where(.sbfe-arrow) ol.sbfe-list { gap: 0; }
:where(.sbfe-arrow) .sbfe-item + .sbfe-item { margin-inline-start: -6px; }
:where(.sbfe-arrow) .sbfe-box {
	padding: 6px 20px 6px 26px;
	background: #e9ecef;
	clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%);
}
:where(.sbfe-arrow) .sbfe-item:first-child .sbfe-box {
	padding-inline-start: 16px;
	clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
}
:where(.sbfe-arrow) a.sbfe-box:hover { background: #dde1e5; }
:where(.sbfe-arrow) .sbfe-current    { background: #ced4da; }

:where([dir="rtl"]) :where(.sbfe-arrow) .sbfe-box {
	padding: 6px 26px 6px 20px;
	clip-path: polygon(100% 0, 12px 0, 0 50%, 12px 100%, 100% 100%, calc(100% - 12px) 50%);
}
:where([dir="rtl"]) :where(.sbfe-arrow) .sbfe-item:first-child .sbfe-box {
	padding-inline-start: 16px;
	clip-path: polygon(100% 0, 12px 0, 0 50%, 12px 100%, 100% 100%);
}

/* ---------- Preset: Boxed (the whole trail sits in a bordered box) ---------- */
:where(.sbfe-boxed) ol.sbfe-list {
	padding: 10px 16px;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #fff;
}

/* ---------- Mobile (matches Elementor's default mobile breakpoint) ---------- */
@media (max-width: 767px) {
	.sbfe-breadcrumbs { font-size: 13px; }

	/* Horizontal scroll instead of wrapping */
	.sbfe-scroll ol.sbfe-list {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}
	.sbfe-scroll .sbfe-item {
		flex: 0 0 auto;
		white-space: nowrap;
	}

	/* Show only the parent as a "back" link */
	.sbfe-mobile-parent .sbfe-item { display: none; }
	.sbfe-mobile-parent .sbfe-item--parent { display: inline-flex; }
	.sbfe-mobile-parent .sbfe-item--parent .sbfe-sep { display: none; }
	.sbfe-mobile-parent .sbfe-item--parent .sbfe-link::before {
		content: "\2190";
		margin-inline-end: 0.2em;
	}
	:where([dir="rtl"]) .sbfe-mobile-parent .sbfe-item--parent .sbfe-link::before {
		content: "\2192";
	}
}
