/**
 * DKM Breadcrumbs.
 *
 * Ink on the page, links a shade lighter until hovered, a separator between.
 * On a phone the whole trail is one line that scrolls sideways, scrolled to
 * its end. The link, hover, current page and separator colours are chosen
 * under DKM - Breadcrumbs.
 */

.wcg-bc {
	--wcg-bc-text: var(--text-primary);
	--wcg-bc-link: var(--text-secondary);
	--wcg-bc-link-hover: var(--wcg-link-hover, var(--action-primary-hover));
	--wcg-bc-current: var(--text-primary);
	--wcg-bc-sep: var(--text-tertiary);
	--wcg-bc-bg: var(--bg-surface);
	--wcg-bc-muted: var(--text-tertiary);
	--wcg-bc-hover: var(--button-tertiary-hover-bg);
	--wcg-bc-focus: var(--border-focus);

	display: block;
	margin: 0;
	padding: 0;
	color: var(--wcg-bc-text);
	font-size: 16px;
	line-height: 1.4;
}

.wcg-bc__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wcg-bc__item {
	display: inline-flex;
	align-items: center;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.wcg-bc__item.is-folded {
	display: none;
}

.wcg-bc.is-open .wcg-bc__item.is-folded {
	display: inline-flex;
}

.wcg-bc.is-open .wcg-bc__more {
	display: none;
}

.wcg-bc .wcg-bc__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--wcg-bc-link);
	text-decoration: none;
}

.wcg-bc .wcg-bc__link:hover {
	color: var(--wcg-bc-link-hover);
	text-decoration: none;
}

.wcg-bc__current {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--wcg-bc-current);
	font-weight: 500;
}

.wcg-bc__sep {
	flex: none;
	margin: 0 8px;
	color: var(--wcg-bc-sep);
	line-height: 1;
}

.wcg-bc__house {
	display: block;
	flex: none;
}

/* Home as a house alone: the name is still there for screen readers. */
.wcg-bc__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Doubled class: themes reach buttons as `.elementor button`. */
.wcg-bc .wcg-bc__more-btn.wcg-bc__more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 28px;
	margin: 0;
	padding: 0 6px;
	border: 0;
	border-radius: var(--button-radius);
	background: var(--button-tertiary-bg);
	color: var(--wcg-bc-link);
	font: inherit;
	font-weight: 700;
	line-height: 1;
	/* The ellipsis sits on the baseline; lift it to the middle of the line. */
	padding-bottom: 6px;
	cursor: pointer;
	box-shadow: none;
}

.wcg-bc .wcg-bc__more-btn.wcg-bc__more-btn:hover {
	background: var(--wcg-bc-hover);
	color: var(--wcg-bc-text);
}

.wcg-bc a:focus-visible,
.wcg-bc button:focus-visible {
	outline: 2px solid var(--wcg-bc-focus);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

/* A phone: the whole trail on one line, swiped sideways, nothing folded. */
@media (max-width: 767px) {
	.wcg-bc__list {
		flex-wrap: nowrap;
		/* Room for the focus ring, which the scroll box would otherwise cut. */
		padding: 4px 2px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scrollbar-width: none;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
	}

	.wcg-bc__list::-webkit-scrollbar {
		display: none;
	}

	.wcg-bc__item {
		flex: none;
	}


	.wcg-bc .wcg-bc__item.is-folded {
		display: inline-flex;
	}

	.wcg-bc .wcg-bc__more {
		display: none;
	}
}
