/* Sits in normal flow above header.header (which isn't fixed in this theme).
   Width and side padding come from the header's own .content-wrapper and .header-inner-container. */
#top-bar {
	background: #537488; /* same as header.html */
	color: #fff;
	font-weight: 300;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}

#top-bar .header-inner-container {
	min-height: 48px;
}

#top-bar ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

#top-bar svg {
	fill: currentColor;
}

/* Back link and language button */
#top-bar .header-inner-container > a,
#top-bar .header-inner-container > ul > li > button {
	display: flex;
	align-items: center;
	gap: 1em;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	line-height: 24px;
	text-decoration: none;
	cursor: pointer;
}

/* Font size on the contents, not on #top-bar: .content-wrapper's max-width is in em.
   After the rule above so its font: inherit doesn't reset it. */
#top-bar .header-inner-container > a,
#top-bar .header-inner-container > ul {
	font-size: 15px; /* same as the header menu */
}

#top-bar .header-inner-container > a:hover,
#top-bar .header-inner-container > ul > li > button:hover {
	text-decoration: underline;
}

/* Dropdown */
#top-bar [popover] {
	inset: 52px 4vw auto auto; /* fallback without anchor positioning */
	margin: 0;
	min-width: 192px;
	padding: 15px 0;
	border: 0;
	border-radius: 5px;
	box-shadow: 0 0 10px 10px #00000026;
	background: #fff;
	color: #333;
}

@supports (position-area: bottom) {
	#top-bar .header-inner-container > ul > li > button {
		anchor-name: --top-bar-lang;
	}

	#top-bar [popover] {
		position-anchor: --top-bar-lang;
		position-area: bottom span-left;
		inset: auto;
		margin-top: 4px;
	}
}

/* Close */
#top-bar [popover] button {
	position: absolute;
	top: 22px;
	right: 33px; /* bjurfors.se: 18px icon in a 32px box, 19px from the edge */
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

#top-bar [popover] a {
	display: block;
	padding: 7px 47px 7px 19px;
	color: inherit;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	line-height: 1.5;
}

#top-bar [popover] a:hover {
	background: #efedea;
}
