/*
 * BHN identity/action bar and Fundraiser Nonprofit Pro header compatibility.
 * Loaded after the purchased theme styles by the companion MU plugin.
 */

body.bhn-adaptive-header {
	overflow-x: clip;
}

body.bhn-adaptive-header .bhn-identity-bar {
	background: var(--bhn-identity-bar-background);
	border-bottom: 1px solid rgba(36, 34, 40, 0.12);
	box-shadow: 0 2px 10px rgba(25, 29, 38, 0.06);
	box-sizing: border-box;
	height: var(--bhn-identity-bar-height);
	position: sticky;
	top: 0;
	z-index: 10000000000000;
}

body.bhn-adaptive-header .bhn-identity-bar > .container,
body.bhn-adaptive-header .bhn-identity-bar__inner {
	height: 100%;
}

body.bhn-adaptive-header .bhn-identity-bar__inner {
	align-items: center;
	display: flex;
	gap: 28px;
	justify-content: space-between;
	min-width: 0;
}

body.bhn-adaptive-header .bhn-identity-bar__brand {
	align-items: center;
	display: flex;
	flex: 1 1 auto;
	gap: 18px;
	min-width: 0;
	padding-left: 50px;
}

body.bhn-adaptive-header .bhn-identity-bar__logo {
	align-items: center;
	display: flex;
	flex: 0 0 auto;
	justify-content: center;
}

body.bhn-adaptive-header .bhn-identity-bar__logo .custom-logo-link,
body.bhn-adaptive-header .bhn-identity-bar__logo-fallback {
	align-items: center;
	background: var(--bhn-brand-frame);
	border: 1px solid var(--bhn-brand-frame-border);
	box-sizing: border-box;
	display: flex;
	height: var(--bhn-brand-logo-height);
	justify-content: center;
	max-width: var(--bhn-brand-logo-width);
	overflow: hidden;
	padding: 4px;
	width: var(--bhn-brand-logo-width);
}

body.bhn-adaptive-header .bhn-identity-bar__logo img.custom-logo {
	display: block;
	height: auto !important;
	margin: auto !important;
	max-height: 100% !important;
	max-width: 100% !important;
	object-fit: contain;
	object-position: center;
	width: auto !important;
}

body.bhn-adaptive-header.bhn-logo-layout-flat .bhn-identity-bar__logo .custom-logo-link,
body.bhn-adaptive-header.bhn-logo-layout-flat .bhn-identity-bar__logo-fallback {
	border-radius: 10px;
}

body.bhn-adaptive-header.bhn-logo-layout-circular .bhn-identity-bar__logo .custom-logo-link,
body.bhn-adaptive-header.bhn-logo-layout-circular .bhn-identity-bar__logo-fallback {
	border-radius: 50%;
	height: min(var(--bhn-brand-logo-height), var(--bhn-brand-logo-width));
	padding: 8px;
	width: min(var(--bhn-brand-logo-height), var(--bhn-brand-logo-width));
}

body.bhn-adaptive-header .bhn-identity-bar__logo-fallback {
	color: var(--bhn-brand-title);
	font-size: 20px;
	font-weight: 800;
	text-decoration: none;
}

body.bhn-adaptive-header .bhn-identity-bar__text {
	line-height: 1.2;
	min-width: 0;
}

body.bhn-adaptive-header .bhn-identity-bar__title {
	color: var(--bhn-brand-title) !important;
	display: block;
	font-size: var(--bhn-brand-title-size) !important;
	font-weight: 750;
	letter-spacing: -0.015em;
	line-height: 1.16 !important;
	max-width: 520px;
	overflow-wrap: normal;
	text-decoration: none !important;
	text-wrap: balance;
}

body.bhn-adaptive-header .bhn-identity-bar__tagline {
	color: var(--bhn-brand-tagline) !important;
	font-size: var(--bhn-brand-tagline-size) !important;
	line-height: 1.3 !important;
	margin: 4px 0 0 !important;
}

body.bhn-adaptive-header .bhn-identity-bar__actions {
	align-items: center;
	display: flex;
	flex: 0 0 auto;
	gap: 10px;
	justify-content: flex-end;
}

body.bhn-adaptive-header .bhn-identity-action {
	align-items: center;
	border: 1px solid transparent;
	border-radius: 6px;
	box-sizing: border-box;
	display: inline-flex;
	font-size: 14px;
	font-weight: 700;
	justify-content: center;
	line-height: 1.15;
	min-height: 39px;
	padding: 9px 14px;
	text-align: center;
	text-decoration: none !important;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

body.bhn-adaptive-header .bhn-identity-action:focus-visible {
	outline: 3px solid rgba(92, 43, 168, 0.35);
	outline-offset: 2px;
}

body.bhn-adaptive-header .bhn-identity-action:hover {
	transform: translateY(-1px);
}

body.bhn-adaptive-header .bhn-identity-action--careers {
	color: var(--bhn-brand-title) !important;
}

body.bhn-adaptive-header .bhn-identity-action--involved {
	border-color: #5c2ba8;
	color: #5c2ba8 !important;
}

body.bhn-adaptive-header .bhn-identity-action--involved:hover {
	background: rgba(92, 43, 168, 0.08);
}

body.bhn-adaptive-header .bhn-identity-action--sponsor {
	background: var(--bhn-identity-button);
	border-color: var(--bhn-identity-button);
	color: var(--bhn-identity-button-text) !important;
}

body.bhn-adaptive-header .bhn-identity-action--sponsor:hover {
	filter: brightness(0.96);
}

/* Dynamic contact and latest-news row. */
body.bhn-adaptive-header .bhn-news-bar {
	background: var(--bhn-news-bar-background);
	box-sizing: border-box;
	color: var(--bhn-news-bar-text);
	height: var(--bhn-news-bar-height);
	position: sticky;
	top: var(--bhn-identity-bar-height);
	z-index: 10000000000001;
}

body.bhn-adaptive-header .bhn-news-bar > .container,
body.bhn-adaptive-header .bhn-news-bar__inner {
	height: 100%;
}

body.bhn-adaptive-header .bhn-news-bar__inner {
	align-items: center;
	display: flex;
	gap: 18px;
	min-width: 0;
	padding-left: 50px;
}

body.bhn-adaptive-header .bhn-news-bar__contacts {
	align-items: center;
	display: flex;
	flex: 0 0 auto;
	gap: 22px;
}

body.bhn-adaptive-header .bhn-news-bar__contact {
	align-items: center;
	color: var(--bhn-news-bar-text) !important;
	display: inline-flex;
	font-size: 13px;
	font-weight: 650;
	gap: 8px;
	line-height: 1;
	text-decoration: none !important;
	white-space: nowrap;
}

body.bhn-adaptive-header .bhn-news-bar__contact:hover,
body.bhn-adaptive-header .bhn-news-bar__contact:focus-visible {
	color: var(--bhn-news-accent) !important;
}

body.bhn-adaptive-header .bhn-news-bar__contact i {
	color: currentColor;
	font-size: 14px;
}

body.bhn-adaptive-header .bhn-news-bar__contact:first-child i {
	transform: rotate(90deg);
}

body.bhn-adaptive-header .bhn-news-ticker {
	align-items: center;
	display: flex;
	flex: 1 1 auto;
	gap: 10px;
	height: 100%;
	min-width: 0;
}

body.bhn-adaptive-header .bhn-news-ticker__label {
	color: var(--bhn-news-bar-text);
	flex: 0 0 auto;
	font-size: 13px;
	font-style: italic;
	font-weight: 800;
	letter-spacing: 0.015em;
	text-transform: uppercase;
	white-space: nowrap;
}

body.bhn-adaptive-header .bhn-news-ticker__viewport {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 18px), transparent);
	mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 18px), transparent);
}

body.bhn-adaptive-header .bhn-news-ticker__track {
	animation: bhn-news-scroll var(--bhn-news-duration) linear infinite;
	display: flex;
	width: max-content;
	will-change: transform;
}

body.bhn-adaptive-header .bhn-news-ticker__group {
	display: flex;
	flex: 0 0 auto;
	gap: 10px;
	padding-right: 10px;
}

body.bhn-adaptive-header .bhn-news-ticker__item {
	align-items: center;
	background: var(--bhn-news-card-background);
	border-radius: 6px;
	box-shadow: 0 1px 5px rgba(20, 24, 32, 0.16);
	color: var(--bhn-news-card-text) !important;
	display: inline-flex;
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 650;
	gap: 8px;
	line-height: 1.2;
	min-height: 36px;
	padding: 7px 12px;
	text-decoration: none !important;
	white-space: nowrap;
}

body.bhn-adaptive-header .bhn-news-ticker__item:hover,
body.bhn-adaptive-header .bhn-news-ticker__item:focus-visible {
	box-shadow: inset 0 0 0 2px var(--bhn-news-accent), 0 1px 5px rgba(20, 24, 32, 0.16);
}

body.bhn-adaptive-header .bhn-news-ticker__marker {
	color: var(--bhn-news-accent);
	font-size: 12px;
}

body.bhn-adaptive-header .bhn-news-ticker__item time {
	color: #657080;
	font-size: 12px;
	font-weight: 500;
}

body.bhn-adaptive-header .bhn-news-ticker__toggle {
	align-items: center;
	appearance: none;
	background: #ffffff;
	border: 0;
	border-radius: 50%;
	color: #5c2ba8;
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 38px;
	font-size: 14px;
	font-weight: 900;
	height: 38px;
	justify-content: center;
	line-height: 1;
	margin: 0;
	padding: 0;
}

body.bhn-adaptive-header .bhn-news-ticker__toggle:hover,
body.bhn-adaptive-header .bhn-news-ticker__toggle:focus-visible {
	background: var(--bhn-news-accent);
	color: #242228;
}

body.bhn-adaptive-header .bhn-news-ticker.is-paused .bhn-news-ticker__track,
body.bhn-adaptive-header .bhn-news-ticker__viewport:focus-within .bhn-news-ticker__track {
	animation-play-state: paused;
}

@keyframes bhn-news-scroll {
	from {
		transform: translateX(0);
	}

	to {
		transform: translateX(-50%);
	}
}

/* The logo and website name now live in the dedicated row above. */
body.bhn-adaptive-header .header-nav-box .logo-box {
	display: none !important;
}

body.bhn-adaptive-header .header-nav-box > .container > .row {
	display: block;
}

body.bhn-adaptive-header .header-nav-box .logo-box + .col-lg-10 {
	flex: 0 0 100%;
	max-width: 100%;
	width: 100%;
}

body.bhn-adaptive-header .header-nav-box .header-nav {
	min-width: 0;
}

body.bhn-adaptive-header .header-nav-box #topbar {
	display: none !important;
}

body.bhn-adaptive-header .header-nav-box::after {
	display: none !important;
}

/* The Pro homepage header is absolutely positioned over the hero. */
body.bhn-adaptive-header.page-template-home-page .header-nav-box:not(.sticky) {
	top: calc(var(--bhn-identity-bar-height) + var(--bhn-news-bar-height));
}

body.bhn-adaptive-header .header-nav-box.sticky {
	margin-top: 0 !important;
	top: calc(var(--bhn-identity-bar-height) + var(--bhn-news-bar-height)) !important;
}

body.admin-bar.bhn-adaptive-header .bhn-identity-bar {
	top: 32px;
}

body.admin-bar.bhn-adaptive-header .bhn-news-bar {
	top: calc(var(--bhn-identity-bar-height) + 32px);
}

body.admin-bar.bhn-adaptive-header .header-nav-box.sticky {
	top: calc(var(--bhn-identity-bar-height) + var(--bhn-news-bar-height) + 32px) !important;
}

@media screen and (max-width: 1199px) {
	body.bhn-adaptive-header .bhn-identity-bar__inner {
		gap: 18px;
	}

	body.bhn-adaptive-header .bhn-identity-bar__brand {
		gap: 12px;
	}

	body.bhn-adaptive-header .bhn-identity-bar__title {
		font-size: min(var(--bhn-brand-title-size), 18px) !important;
		max-width: 360px;
	}

	body.bhn-adaptive-header .bhn-identity-action {
		font-size: 13px;
		padding-left: 11px;
		padding-right: 11px;
	}
}

@media screen and (max-width: 1000px) {
	body.bhn-adaptive-header .bhn-identity-bar {
		height: auto;
		min-height: 82px;
		padding: 9px 0;
	}

	body.bhn-adaptive-header .bhn-identity-bar__inner {
		align-items: stretch;
		flex-direction: column;
		gap: 8px;
		height: auto;
	}

	body.bhn-adaptive-header .bhn-identity-bar__brand {
		justify-content: center;
		padding-left: 0;
	}

	body.bhn-adaptive-header .bhn-news-bar {
		height: auto;
		min-height: 76px;
		padding: 6px 0;
	}

	body.bhn-adaptive-header .bhn-news-bar__inner {
		align-items: stretch;
		flex-direction: column;
		gap: 5px;
		padding-left: 0;
	}

	body.bhn-adaptive-header .bhn-news-bar__contacts {
		justify-content: center;
		min-height: 24px;
	}

	body.bhn-adaptive-header .bhn-news-ticker {
		min-height: 38px;
	}

	body.bhn-adaptive-header .bhn-identity-bar__logo .custom-logo-link,
	body.bhn-adaptive-header .bhn-identity-bar__logo-fallback {
		height: min(var(--bhn-brand-logo-height), 56px);
		width: min(var(--bhn-brand-logo-width), 150px);
	}

	body.bhn-adaptive-header.bhn-logo-layout-circular .bhn-identity-bar__logo .custom-logo-link,
	body.bhn-adaptive-header.bhn-logo-layout-circular .bhn-identity-bar__logo-fallback {
		height: 56px;
		width: 56px;
	}

	body.bhn-adaptive-header .bhn-identity-bar__title {
		font-size: min(var(--bhn-brand-title-size), 17px) !important;
		max-width: 440px;
	}

	body.bhn-adaptive-header .bhn-identity-bar__actions {
		flex-wrap: wrap;
		justify-content: center;
	}

	body.bhn-adaptive-header .bhn-identity-action {
		min-height: 35px;
		padding-bottom: 7px;
		padding-top: 7px;
	}

	body.bhn-adaptive-header.page-template-home-page .header-nav-box:not(.sticky) {
		top: auto;
	}
}

@media screen and (max-width: 782px) {
	body.admin-bar.bhn-adaptive-header .bhn-identity-bar {
		top: 46px;
	}

	body.admin-bar.bhn-adaptive-header .bhn-news-bar {
		top: calc(var(--bhn-identity-bar-height) + 46px);
	}

	body.admin-bar.bhn-adaptive-header .header-nav-box.sticky {
		top: calc(var(--bhn-identity-bar-height) + var(--bhn-news-bar-height) + 46px) !important;
	}
}

@media screen and (max-width: 560px) {
	body.bhn-adaptive-header .bhn-identity-bar {
		padding: 8px 0 9px;
	}

	body.bhn-adaptive-header .bhn-identity-bar__brand {
		gap: 9px;
		justify-content: flex-start;
	}

	body.bhn-adaptive-header .bhn-identity-bar__logo .custom-logo-link,
	body.bhn-adaptive-header .bhn-identity-bar__logo-fallback {
		height: 46px;
		width: 108px;
	}

	body.bhn-adaptive-header.bhn-logo-layout-circular .bhn-identity-bar__logo .custom-logo-link,
	body.bhn-adaptive-header.bhn-logo-layout-circular .bhn-identity-bar__logo-fallback {
		height: 46px;
		width: 46px;
	}

	body.bhn-adaptive-header .bhn-identity-bar__text {
		flex: 1 1 auto;
	}

	body.bhn-adaptive-header .bhn-identity-bar__title {
		font-size: min(var(--bhn-brand-title-size), 15px) !important;
		line-height: 1.15 !important;
	}

	body.bhn-adaptive-header .bhn-identity-bar__tagline {
		font-size: min(var(--bhn-brand-tagline-size), 10px) !important;
	}

	body.bhn-adaptive-header .bhn-identity-bar__actions {
		display: grid;
		gap: 6px;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		width: 100%;
	}

	body.bhn-adaptive-header .bhn-identity-action {
		font-size: 11px;
		min-height: 34px;
		padding: 6px 5px;
	}

	body.bhn-adaptive-header .bhn-news-bar__contacts {
		display: grid;
		gap: 8px;
		grid-template-columns: max-content minmax(0, 1fr);
		justify-content: stretch;
	}

	body.bhn-adaptive-header .bhn-news-bar__contact {
		font-size: 11px;
		min-width: 0;
	}

	body.bhn-adaptive-header .bhn-news-bar__contact span {
		overflow: hidden;
		text-overflow: ellipsis;
	}

	body.bhn-adaptive-header .bhn-news-ticker {
		gap: 6px;
	}

	body.bhn-adaptive-header .bhn-news-ticker__label {
		font-size: 10px;
	}

	body.bhn-adaptive-header .bhn-news-ticker__item {
		font-size: 11px;
		min-height: 33px;
		padding: 6px 9px;
	}

	body.bhn-adaptive-header .bhn-news-ticker__item time {
		display: none;
	}

	body.bhn-adaptive-header .bhn-news-ticker__toggle {
		flex-basis: 34px;
		height: 34px;
	}
}

/*
 * Keep the complete mobile navigation above every sticky header row. The Pro
 * theme gives the drawer a lower stacking level than the adaptive identity and
 * news bars, which otherwise cover its first links. The drawer owns its own
 * vertical scroll so long menus remain reachable on short phone screens.
 */
@media screen and (max-width: 1000px) {
	body.bhn-adaptive-header.bhn-mobile-menu-open {
		overflow: hidden !important;
	}

	body.bhn-adaptive-header.bhn-mobile-menu-open .header-nav-box {
		z-index: 10000000000010 !important;
	}

	body.bhn-adaptive-header #mySidenav.sidenav {
		bottom: 0 !important;
		box-sizing: border-box;
		height: 100vh !important;
		height: 100dvh !important;
		max-height: 100dvh;
		max-width: min(88vw, 360px);
		overflow-x: hidden !important;
		overflow-y: auto !important;
		overscroll-behavior: contain;
		padding-bottom: calc(24px + env(safe-area-inset-bottom));
		padding-top: calc(64px + env(safe-area-inset-top)) !important;
		right: 0 !important;
		scrollbar-gutter: stable;
		top: 0 !important;
		-webkit-overflow-scrolling: touch;
		z-index: 10000000000020 !important;
	}

	body.bhn-adaptive-header #mySidenav .closebtn {
		align-items: center;
		display: flex !important;
		height: 48px;
		justify-content: center;
		margin-left: 0 !important;
		right: 10px !important;
		top: max(8px, env(safe-area-inset-top)) !important;
		width: 48px;
		z-index: 2;
	}

	body.bhn-adaptive-header.bhn-mobile-menu-open #mySidenav .closebtn {
		position: fixed !important;
	}

	body.bhn-adaptive-header #mySidenav .main-navigation,
	body.bhn-adaptive-header #mySidenav .menu,
	body.bhn-adaptive-header #mySidenav .mobile_nav,
	body.bhn-adaptive-header #mySidenav .mobile_nav li {
		box-sizing: border-box;
		max-width: 100%;
		width: 100% !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.bhn-adaptive-header .bhn-news-ticker__track {
		animation-play-state: paused;
	}
}
