/* Top bar: language, shopping region and cart. */
.top-navigation .user-navigation {
	align-items: center;
	gap: 1.6rem;
}

.top-navigation .user-navigation > li {
	display: flex !important;
	align-items: center;
	margin: 0 !important;
}

.top-navigation .user-navigation > li:first-child {
	margin-left: auto !important;
}

.top-navigation a {
	opacity: .85;
}

/* Language and region: small plain text so the cart stands out. */
.top-navigation .wr-region-banner-inline a,
.top-navigation .wr-region-banner-inline span {
	color: #fff;
	font-weight: normal;
	opacity: .75;
	text-decoration: none;
}

.top-navigation .wr-region-banner-inline a:hover {
	opacity: 1;
	text-decoration: underline;
}

/* Both languages; the one you're reading is bold, the other is a link. */
.wr-lang-switch {
	gap: .8rem;
}

.top-navigation .wr-lang-switch a {
	color: #fff;
	font-weight: normal;
	opacity: .75;
	text-decoration: none;
}

.top-navigation .wr-lang-switch a:hover {
	opacity: 1;
	text-decoration: underline;
}

.top-navigation .wr-lang-switch a.gt-current-lang {
	cursor: default;
	font-weight: bold;
	opacity: 1;
	text-decoration: none;
}

/* Thin line between language and region. */
.top-navigation .wr-region-banner-inline {
	border-left: 1px solid rgba(255, 255, 255, .3);
	margin-left: 0 !important;
	padding-left: 1.6rem;
}

/* Desktop: Fund our work and Cart sit on the menu row; the top strip is just language and region.
   Phones: Cart stays in the top strip and Fund our work is in the slide-out menu. */
.parent-navigation .wr-cart-main {
	display: none !important;
}

@media screen and (min-width: 47.5em) {
	.top-navigation .user-navigation > li.wr-cart-link {
		display: none !important;
	}

	.parent-navigation .wr-cart-main {
		display: block !important;
	}

	.menu.user-links-navigation {
		align-items: center;
		display: flex;
		gap: 1rem;
		margin-left: auto;
	}

	.menu.user-links-navigation li {
		display: block !important;
		margin: 0 !important;
	}

	.menu.user-links-navigation li .button {
		display: inline-flex;
		font-size: 2rem;
		margin: 0;
		mask-image: url("../images/button-background.svg");
		-webkit-mask-image: url("../images/button-background.svg");
		padding: .7rem 1.4rem;
		white-space: nowrap;
	}
}

/* Cart: our blue brush button with a count badge. */
.cart-contents.button {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	color: #fff;
	font-size: 1.8rem;
	margin: 0;
	opacity: 1;
	overflow: visible;
	padding: .5rem 1.4rem;
}

.cart-contents.button:hover,
.cart-contents.button:focus {
	color: #fff;
}

.cart-contents.button svg {
	height: 1.8rem;
	margin: 0;
	width: 1.8rem;
}

.cart-contents .cart-contents-count {
	background: #fff;
	border-radius: 1rem;
	color: #246ec0;
	font-family: sans-serif;
	font-size: 1.1rem;
	font-weight: bold;
	line-height: 1.8rem;
	min-width: 1.8rem;
	padding: 0 .5rem;
	text-align: center;
}

.cart-contents.is-empty .cart-contents-count {
	display: none;
}

.in-cart {
	display: none;
}

@media screen and (min-width: 47.5em) {
	.top-navigation {
		padding-top: .8rem;
	}

	/* Span the full width so the bar follows the same centred column as the logo and menu. */
	.top-navigation {
		left: 0;
		right: 0;
		pointer-events: none;
	}

	.top-navigation .user-navigation {
		pointer-events: auto;
	}

	.top-navigation .grid-container--flush-right {
		margin-left: auto;
		margin-right: auto;
		padding-right: 3.2rem;
	}
}

@media screen and (max-width: 599px) {
	.top-navigation .user-navigation {
		gap: 1.2rem;
		padding-right: .8rem;
	}

	.top-navigation {
		max-width: 100vw;
	}
}

/* Mid-size windows: keep the menu on one line next to the buttons. */
@media screen and (min-width: 47.5em) and (max-width: 74.99em) {
	.site-navigation .parent-menu > li {
		flex: none;
		margin-right: 2.8rem;
	}

	.site-navigation .parent-menu > .menu-parent-item > a:not(.button) {
		font-size: 2.1rem;
		padding: .8rem .4rem;
		white-space: nowrap;
	}

	.menu.user-links-navigation li .button {
		font-size: 1.7rem;
		padding: .6rem 1.1rem;
	}
}
