/* ==========================================================
   Breadcrumbs
   The us_breadcrumbs element (templates/elements/breadcrumbs.php):
   a full-width strip of 0.85rem crumbs between hairline borders.
   Sizes are set on the crumbs rather than the strip, so they win
   over the element's Design font size (an !important on the nav).
   ========================================================== */
.g-breadcrumbs.itx-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	row-gap: 4px;
	width: 100%;
	margin: 4px 0 14px;
	padding: 12px 0 12px 8px;
	border-top: 1px solid #dcdcdc;
	border-bottom: 1px solid #dcdcdc;
	line-height: 1.4;
}

.itx-breadcrumbs > * {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
}

.itx-breadcrumbs .g-breadcrumbs-item {
	min-width: 0;
	font-size: 0.85rem;
	font-weight: 400;
	color: #666;
	overflow-wrap: anywhere;
}

.itx-breadcrumbs .g-breadcrumbs-item a {
	color: #666;
	font-weight: 400;
	text-decoration: none;
}

.itx-breadcrumbs .g-breadcrumbs-item a:hover,
.itx-breadcrumbs .g-breadcrumbs-item a:focus-visible {
	color: #f47b20;
}

/* The dark brand orange used for form focus rings: the hover orange is under 3:1 on white. */
.itx-breadcrumbs .g-breadcrumbs-item a:focus-visible {
	outline: 2px solid #b85200;
	outline-offset: 2px;
	border-radius: 2px;
}

.itx-breadcrumbs .g-breadcrumbs-item[aria-current="page"] {
	color: #333;
	font-weight: 700;
}

.itx-breadcrumbs .itx-breadcrumbs-home {
	display: inline-flex;
}

.itx-breadcrumbs .itx-breadcrumbs-home svg {
	display: block;
	width: 13px;
	height: 13px;
}

.itx-breadcrumbs .g-breadcrumbs-separator {
	margin: 0 12px;
	font-size: 9px;
	line-height: 1;
	color: #aaa;
}

.itx-breadcrumbs .g-breadcrumbs-separator svg {
	display: block;
	width: 9px;
	height: 9px;
}

/*
 * In the header builder. Header rows have a fixed height (Header > row
 * height), so the strip keeps to one line. When the trail is too long,
 * js/breadcrumbs.js folds the ancestors nearest Home into a "…" toggle that
 * reveals them in a stacked panel; crumbs are never squeezed or cut short,
 * except the current page as a last resort (it's the page's H1 too).
 * Until the script runs (.is-enhanced) the strip scrolls sideways, so it
 * can never push the page wider. The row sets the spacing: no outer margin.
 * The strip fills the row's height (align-self: stretch), so its borders sit
 * on the row's edges and the header ends at the bottom border. The 11px
 * padding keeps the tallest content (the 26px "…" toggle) within the 50px
 * row; a taller strip would be centred and spill into the logo row above.
 * The space between the strip and the page is added to the page instead
 * (below), so it scrolls away rather than staying in the fixed header.
 */
.l-header .g-breadcrumbs.itx-breadcrumbs {
	position: relative; /* anchors the panel */
	flex: 1 1 auto;
	flex-wrap: nowrap;
	align-self: stretch;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	padding-top: 11px;
	padding-bottom: 11px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}

.l-header .itx-breadcrumbs::-webkit-scrollbar {
	display: none;
}

/*
 * Space between the breadcrumbs and the first card on the page. Impreza
 * pads the first section by the header's height to clear the fixed header;
 * this adds a little more when the header shows breadcrumbs (they're hidden
 * on the home page). It used to be a margin on the breadcrumbs, inside the
 * fixed header, where it stayed on screen while scrolling.
 */
.header_hor .l-header.pos_fixed:has(.itx-breadcrumbs) ~ .l-main > .l-section:first-of-type > .l-section-h {
	padding-top: calc( var(--header-height) + 0.75rem );
}

/* The panel drops below the strip, so the strip mustn't clip it. */
.l-header .g-breadcrumbs.itx-breadcrumbs.is-enhanced {
	overflow: visible;
}

/*
 * js/breadcrumbs.js runs inline straight after the trail and folds it
 * before it's painted, then adds .is-ready. Hiding the crumbs until then is
 * a safety net, so the full trail can never flash and jump into place.
 * Only with JavaScript on (Impreza's html.js); if the script fails, the
 * delayed animation shows the crumbs anyway after 2s.
 */
.js .l-header .itx-breadcrumbs:not(.is-ready) > * {
	visibility: hidden;
	animation: itx-breadcrumbs-reveal 0s 2s forwards;
}

.js .l-header .itx-breadcrumbs.is-ready > * {
	animation: itx-breadcrumbs-fade-in 0.2s ease-out;
}

@keyframes itx-breadcrumbs-reveal {
	to {
		visibility: visible;
	}
}

@keyframes itx-breadcrumbs-fade-in {
	from {
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.js .l-header .itx-breadcrumbs.is-ready > * {
		animation: none;
	}
}

/*
 * Header cells are flex items that default to min-width:auto, so they grow
 * to the full trail and push it past the page edge.
 */
.l-header .l-subheader-cell:has(> .itx-breadcrumbs) {
	min-width: 0;
	max-width: 100%;
}

.l-header .l-subheader-cell > .g-breadcrumbs.itx-breadcrumbs {
	margin-left: 0;
	margin-right: 0;
}

.l-header .itx-breadcrumbs .g-breadcrumbs-item {
	flex-shrink: 0;
	white-space: nowrap;
}

/* Only the current page gives way, with an ellipsis (full name in its title). */
.l-header .itx-breadcrumbs .g-breadcrumbs-item[aria-current="page"] {
	flex-shrink: 1;
	min-width: 0;
}

.l-header .itx-breadcrumbs .g-breadcrumbs-item[aria-current="page"] > span[itemprop="name"] {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.l-header .itx-breadcrumbs .g-breadcrumbs-item.is-collapsed {
	display: none;
}

@media (max-width: 600px) {
	/* The header's own edge line marks the bottom on phones. */
	.l-header .g-breadcrumbs.itx-breadcrumbs {
		padding-left: 0;
		border-bottom: 0;
	}

	.l-header .itx-breadcrumbs .g-breadcrumbs-separator {
		margin: 0 9px;
	}
}

/* --- "…" toggle and the stacked panel of folded crumbs ---
 * Styled after the header's mega menu (css/megamenu-widgets.css): the same
 * panel shell, the nested-list rule, the hover tint and the active-tab
 * treatment (peach fill and orange bar) for the current page.
 */
.itx-breadcrumbs {
	--itx-crumbs-ink: var(--color-content-heading, #303030);
	--itx-crumbs-accent: var(--color-content-primary, #f27a21);
	--itx-crumbs-accent-soft: rgba(242, 122, 33, 0.1);
	--itx-crumbs-line: var(--color-content-border, rgba(17, 17, 17, 0.1));
	--itx-crumbs-hover: var(--color-content-bg, #f4f4f4);
}

.itx-breadcrumbs .itx-breadcrumbs-more[hidden] {
	display: none;
}

.itx-breadcrumbs-more__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 1.625rem;
	padding: 0 0.6rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--itx-crumbs-ink);
	font: inherit;
	font-size: 0.85rem;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

/* Hover only on devices that really hover: a tap leaves :hover stuck on touchscreens. */
.itx-breadcrumbs-more__toggle[aria-expanded="true"] {
	border-color: transparent;
	background: var(--itx-crumbs-accent-soft);
	color: var(--itx-crumbs-accent);
}

@media (hover: hover) {
	.itx-breadcrumbs-more__toggle:hover {
		border-color: transparent;
		background: var(--itx-crumbs-accent-soft);
		color: var(--itx-crumbs-accent);
	}
}

.itx-breadcrumbs-more__toggle:focus-visible {
	outline: 2px solid var(--itx-crumbs-accent);
	outline-offset: 2px;
}

/* The mega menu's dropdown shell. */
.itx-breadcrumbs-more__panel {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 20;
	width: max-content;
	max-width: min(28rem, 100%);
	padding: 1rem;
	background: #fff;
	border-radius: var(--site-border-radius, 1rem);
	box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.04), 0 24px 48px -20px rgba(17, 17, 17, 0.22);
	white-space: normal;
	animation: itx-breadcrumbs-panel-in 0.15s ease-out;
}

.itx-breadcrumbs-more__panel[hidden] {
	display: none;
}

@keyframes itx-breadcrumbs-panel-in {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.itx-breadcrumbs-more__panel {
		animation: none;
	}
}

/* Phones: a shallower step per level so deep trails keep their width. */
@media (max-width: 600px) {
	.itx-breadcrumbs-more__panel {
		padding: 0.75rem;
	}

	.itx-breadcrumbs .itx-breadcrumbs-more__list ol {
		margin-left: 0.5rem;
		padding-left: 0.25rem;
	}

	.itx-breadcrumbs .itx-breadcrumbs-more__list a,
	.itx-breadcrumbs .itx-breadcrumbs-more__current {
		padding: 0.45rem 0.625rem;
	}
}

/*
 * The trail as a nested list: each crumb sits one level inside the one
 * before, hanging off a hairline rule like the mega menu's sub-lists.
 */
.itx-breadcrumbs-more__list,
.itx-breadcrumbs-more__list ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.itx-breadcrumbs-more__list ol {
	margin: 2px 0 0 0.875rem;
	padding-left: 0.375rem;
	border-left: 1px solid var(--itx-crumbs-line);
}

.itx-breadcrumbs-more__list li {
	margin: 0;
	padding: 0;
}

.itx-breadcrumbs .itx-breadcrumbs-more__list a,
.itx-breadcrumbs .itx-breadcrumbs-more__current {
	position: relative;
	display: block;
	padding: 0.5rem 0.875rem;
	border-radius: 0.625rem;
	color: var(--itx-crumbs-ink);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	transition: color 0.15s ease, background-color 0.15s ease;
}

@media (hover: hover) {
	.l-header .itx-breadcrumbs .g-breadcrumbs-item .itx-breadcrumbs-more__list a:hover,
	.itx-breadcrumbs .itx-breadcrumbs-more__list a:hover {
		background: var(--itx-crumbs-hover);
		color: var(--itx-crumbs-ink);
	}
}

/* Touch: the header's orange link hover would stick after a tap, so keep the ink colour. */
@media (hover: none) {
	.l-header .itx-breadcrumbs .g-breadcrumbs-item .itx-breadcrumbs-more__list a:hover {
		color: var(--itx-crumbs-ink);
	}
}

.l-header .itx-breadcrumbs .g-breadcrumbs-item .itx-breadcrumbs-more__list a:focus-visible {
	outline: 2px solid var(--itx-crumbs-accent);
	outline-offset: -2px;
}

/* The current page, in full: the mega menu's active-tab look. */
.itx-breadcrumbs .itx-breadcrumbs-more__current {
	background: var(--itx-crumbs-accent-soft);
	font-weight: 700;
}

.itx-breadcrumbs-more__current::before {
	content: "";
	position: absolute;
	top: 0.5rem;
	bottom: 0.5rem;
	left: 0;
	width: 3px;
	border-radius: 3px;
	background: var(--itx-crumbs-accent);
}

/* Outranks the header's own link hover colour. */
.l-header .itx-breadcrumbs .g-breadcrumbs-item a:hover,
.l-header .itx-breadcrumbs .g-breadcrumbs-item a:focus-visible {
	color: #f47b20;
}

/* Keyboard focus mustn't be clipped by the scrolling strip. */
.l-header .itx-breadcrumbs .g-breadcrumbs-item a:focus-visible {
	outline-offset: -2px;
}

/*
 * Over a title bar image (white text on a dark gradient) the grey palette
 * would fail contrast, so the strip switches to translucent white.
 */
.title-bar-block--overlay .itx-breadcrumbs {
	border-color: rgba(255, 255, 255, 0.35);
}

.title-bar-block--overlay .itx-breadcrumbs .g-breadcrumbs-item,
.title-bar-block--overlay .itx-breadcrumbs .g-breadcrumbs-item a {
	color: rgba(255, 255, 255, 0.85);
}

.title-bar-block--overlay .itx-breadcrumbs .g-breadcrumbs-item a:hover,
.title-bar-block--overlay .itx-breadcrumbs .g-breadcrumbs-item a:focus-visible,
.title-bar-block--overlay .itx-breadcrumbs .g-breadcrumbs-item[aria-current="page"] {
	color: #fff;
}

.title-bar-block--overlay .itx-breadcrumbs .g-breadcrumbs-item a:focus-visible {
	outline-color: #fff;
}

.title-bar-block--overlay .itx-breadcrumbs .g-breadcrumbs-separator {
	color: rgba(255, 255, 255, 0.6);
}
