/*
 * GD Breadcrumb Row widget
 */

.gd-breadcrumb-row {
	/* Fill colour shared by the side bars and the curve shapes (set per colour modifier below) */
	--gd-breadcrumb-row-fill: var(--gd-white);
	display: flex;
	align-items: stretch;
	width: 100%;
	min-height: 48px;
	overflow: hidden;
}

/* Segment base styles */
.gd-breadcrumb-row__segment {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* White background segments (first and last) */
.gd-breadcrumb-row__segment--white {
	flex: 1 1 0;
	min-width: 16px;
}

/* Shape segments (transparent background) */
.gd-breadcrumb-row__segment--shape {
	flex: 0 0 auto;
	background: transparent;
	padding: 0;
	align-self: end;
	height: 40px;
	display: flex;
	align-items: end;
	position: relative;
	left: -1px; /* hide 1px gap between shape and pattern */
}

/* Curve shape: inline <svg> (30x20 viewBox) so it paints together with the rest of the row */
.gd-breadcrumb-row__shape-img {
	display: block;
	width: 60px;
	height: 40px;
	fill: var(--gd-breadcrumb-row-fill);
}

/* Side bars: a solid strip, 40px tall at the bottom of the segment. A gradient
 * is used instead of an external svg tile so it is available at first paint. */
.gd-breadcrumb-row__segment--pattern {
	position: relative;
	display: flex;
	align-items: flex-end;
	padding: 0;
	background-image: linear-gradient(var(--gd-breadcrumb-row-fill), var(--gd-breadcrumb-row-fill));
	background-repeat: no-repeat;
	background-position: bottom center;
	background-size: 100% 40px;
}

/* Flipped right shape */
.gd-breadcrumb-row__segment--shape-flipped .gd-breadcrumb-row__shape-img {
	position: relative;
	right: -2px; /* hide 1px gap between shape and pattern */
}

/* Text segment */
.gd-breadcrumb-row__segment--text {
	flex: 0 1 auto;
	padding: 10px 18px;
	font-weight: 700;
	line-height: 1.25;
	font-size: 0.875rem;
	color: var(--gd-dark-blueish-grey);
	text-align: center;
	white-space: normal;
	word-break: break-word;
	overflow-wrap: break-word;
	hyphens: auto;
	width: 44rem;
}

/* ── Color modifiers ─────────────────────────────────────────────────────── */

/* White (default): text sits on the image behind the notch, so it is white unless the widget sets a text color */
.gd-breadcrumb-row--color-white .gd-breadcrumb-row__segment--text {
	color: var(--gd-white);
}

/* Blue */
.gd-breadcrumb-row--color-blue {
	--gd-breadcrumb-row-fill: var(--gd-blue);
}
.gd-breadcrumb-row--color-blue .gd-breadcrumb-row__segment--text {
	color: var(--gd-dark-blueish-grey);
}

/* Grey */
.gd-breadcrumb-row--color-grey {
	--gd-breadcrumb-row-fill: var(--gd-light-grey);
}
.gd-breadcrumb-row--color-grey .gd-breadcrumb-row__segment--text {
	color: var(--gd-dark-blueish-grey);
}

/* Dark blueish grey */
.gd-breadcrumb-row--color-dark-blueish-grey {
	--gd-breadcrumb-row-fill: var(--gd-dark-blueish-grey);
}
.gd-breadcrumb-row--color-dark-blueish-grey .gd-breadcrumb-row__segment--text {
	color: var(--gd-white);
}
