.hpop-bar[hidden] { display: none !important; }

.hpop-bar {
	position: relative;
	z-index: 99998;
	width: 100%;
	box-sizing: border-box;
	background: var(--hpop-bar-bg, #1e3a8a);
	color: var(--hpop-bar-color, #fff);
	font-size: var(--hpop-bar-fs, 15px);
	line-height: 1.4;
	padding: 8px 16px;
}
.hpop-bar *, .hpop-bar *::before, .hpop-bar *::after { box-sizing: border-box; }
.hpop-bar.hpop-bar-closable { padding-right: 44px; padding-left: 44px; }
.hpop-bar-align-left.hpop-bar-closable { padding-left: 16px; }

.hpop-bar-sticky { position: fixed; left: 0; right: 0; }
.hpop-bar-sticky.hpop-bar-top { top: 0; }
.hpop-bar-sticky.hpop-bar-bottom { bottom: 0; }
body.admin-bar .hpop-bar-sticky.hpop-bar-top { top: 32px; }
@media screen and (max-width: 782px) {
	body.admin-bar .hpop-bar-sticky.hpop-bar-top { top: 46px; }
}

.hpop-bar-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	max-width: 1200px;
	margin: 0 auto;
}
.hpop-bar-align-left .hpop-bar-inner { justify-content: flex-start; margin-left: 0; }

/* All messages share one grid cell so rotating never changes the bar height. */
.hpop-bar-msgs { display: grid; flex: 1 1 auto; min-width: 0; }
.hpop-bar-msg {
	grid-area: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px 14px;
	text-align: center;
	color: inherit;
	text-decoration: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s ease, visibility .35s;
}
.hpop-bar-align-left .hpop-bar-msg { justify-content: flex-start; text-align: left; }
.hpop-bar-msg.is-active { opacity: 1; visibility: visible; }
a.hpop-bar-msg:hover .hpop-bar-text { text-decoration: underline; }

.hpop-bar-text a { color: inherit; text-decoration: underline; }
.hpop-bar-cd {
	display: inline-block;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	background: rgba(255, 255, 255, .16);
	padding: 1px 8px;
	border-radius: 4px;
	white-space: nowrap;
}
.hpop-bar-cd:empty { display: none; }

.hpop-bar-btn {
	display: inline-block;
	background: var(--hpop-bar-btn-bg, #f59e0b);
	color: var(--hpop-bar-btn-color, #111);
	padding: 5px 14px;
	border-radius: 999px;
	font-weight: 700;
	font-size: .92em;
	text-decoration: none;
	white-space: nowrap;
	transition: filter .15s ease;
}
a.hpop-bar-btn:hover, a.hpop-bar-msg:hover .hpop-bar-btn { color: var(--hpop-bar-btn-color, #111); filter: brightness(1.08); }

.hpop-bar-nav, .hpop-bar-close {
	flex: 0 0 auto;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	padding: 0 6px;
	font: 400 22px/1 Arial, sans-serif;
	opacity: .8;
}
.hpop-bar-nav:hover, .hpop-bar-close:hover { opacity: 1; }
.hpop-bar-close {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	padding: 0;
	font-size: 24px;
}
.hpop-bar button:focus-visible, .hpop-bar a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

@media (max-width: 600px) {
	.hpop-bar { font-size: calc(var(--hpop-bar-fs, 15px) - 1px); padding-top: 6px; padding-bottom: 6px; }
	.hpop-bar-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.hpop-bar-msg { transition: none; }
}
