/**
 * SPS Theme: SaaS app-bar header (logo left, nav + account right).
 */

/* Sticky app bar */
body.sps-saas-header #masthead.site-header {
	position: sticky;
	top: 0;
	z-index: 10050;
}

body.sps-saas-header #masthead .site-main-header-wrap .site-header-row-container-inner {
	background-color: var(--sps-header-bg);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow:
		0 1px 0 var(--sps-header-border),
		0 4px 20px rgba(26, 26, 58, 0.08);
}

/* Sticky / scrolled: Kadence paints header_sticky_background (often light); keep theme bar */
body.sps-saas-header #masthead,
body.sps-saas-header #masthead .site-main-header-wrap,
body.sps-saas-header #masthead .site-main-header-wrap.site-header-row-container,
body.sps-saas-header #masthead .site-main-header-wrap .site-header-row-container-inner,
body.sps-saas-header #mobile-header .site-main-header-wrap,
body.sps-saas-header #mobile-header .site-main-header-wrap .site-header-row-container-inner,
#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start):not(.site-header-row-container):not(.item-hidden-above):not(.site-main-header-wrap),
#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start):not(.item-hidden-above) > .site-header-row-container-inner,
.site-main-header-wrap.site-header-row-container.kadence-sticky-header.item-is-fixed.item-is-stuck,
.site-main-header-wrap.site-header-row-container.kadence-sticky-header.item-is-fixed:not(.item-at-start),
#masthead .site-main-header-wrap.kadence-sticky-header.item-is-fixed:not(.item-at-start) .site-header-row-container-inner {
	background-color: var(--sps-header-bg) !important;
	background-image: none !important;
	border-bottom-color: var(--sps-header-border) !important;
}

[data-sps-theme="dark"] body.sps-saas-header #masthead .site-main-header-wrap .site-header-row-container-inner {
	box-shadow:
		0 1px 0 var(--sps-header-border),
		0 4px 24px rgba(0, 0, 0, 0.28);
}

body.sps-saas-header #masthead .site-main-header-wrap .site-header-row-container-inner > .site-container {
	max-width: 1180px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}

body.sps-saas-header #masthead .site-main-header-inner-wrap.site-header-row {
	align-items: center;
	min-height: 140px;
	gap: 1rem;
}

body.sps-saas-header #masthead .site-header-main-section-left,
body.sps-saas-header #masthead .site-header-main-section-right {
	flex: 1 1 auto;
}

body.sps-saas-header #masthead .site-header-main-section-left {
	justify-content: flex-start;
}

body.sps-saas-header #masthead .site-header-main-section-right {
	justify-content: flex-end;
}

/* Brand: bordered banner lockup (logo + name + tagline in one image) */
body.sps-saas-header #masthead .site-branding.branding-layout-standard a.brand,
body.sps-saas-header #mobile-header .site-branding.branding-layout-standard a.brand {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	min-width: 0;
	line-height: 0;
}

body.sps-saas-header #masthead .site-branding .site-title-wrap,
body.sps-saas-header #masthead .site-branding .site-title,
body.sps-saas-header #masthead .site-branding .site-description,
body.sps-saas-header #mobile-header .site-branding .site-title-wrap,
body.sps-saas-header #mobile-header .site-branding .site-title,
body.sps-saas-header #mobile-header .site-branding .site-description {
	display: none !important;
}

body.sps-saas-header #masthead .sps-header-logo,
body.sps-saas-header #mobile-header .sps-header-logo {
	display: block;
	width: auto;
	flex-shrink: 0;
}

body.sps-saas-header #masthead .site-branding a.brand img.sps-header-logo--banner,
body.sps-saas-header #mobile-header .site-branding a.brand img.sps-header-logo--banner {
	height: 125px;
	width: auto;
	max-width: min(720px, 62vw);
}

/* Primary nav */
body.sps-saas-header #masthead .header-navigation .header-menu-container > ul {
	gap: 0.15rem 0.35rem;
}

body.sps-saas-header #masthead .header-navigation .header-menu-container > ul > li.menu-item > a {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 0.9rem;
	font-weight: 600;
	padding: 0.45rem 0.7rem;
	border-radius: 999px;
}

body.sps-saas-header #masthead .site-header-main-section-right {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
	flex-wrap: nowrap;
}

body.sps-saas-header #masthead .site-header-main-section-right .site-header-section-right {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
	flex-wrap: nowrap;
}

/* Account / log-in actions */
body.sps-saas-header #masthead .sps-header-actions {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
}

body.sps-saas-header #masthead .sps-header-account {
	display: none;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.65rem;
	border-radius: 999px;
	text-decoration: none;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 0.82rem;
	line-height: 1.2;
	border: 1px solid var(--sps-header-border);
	background: rgba(255, 255, 255, 0.04);
	color: var(--sps-header-text) !important;
	max-width: 200px;
}

[data-sps-theme="light"] body.sps-saas-header #masthead .sps-header-account {
	background: rgba(255, 255, 255, 0.72);
}

body.sps-saas-header #masthead .sps-header-account__label {
	opacity: 0.72;
	font-weight: 500;
}

body.sps-saas-header #masthead .sps-header-account__name {
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.sps-saas-header #masthead .sps-header-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 0.4rem 1rem;
	border-radius: 999px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 0.88rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

body.sps-saas-header #masthead .sps-header-cta--gold {
	background: linear-gradient(180deg, #f2b34c 0%, #e38b2c 100%);
	color: #1a1a3a !important;
	box-shadow: 0 1px 4px rgba(26, 26, 58, 0.18);
}

body.sps-saas-header #masthead .sps-header-cta--gold:hover {
	filter: brightness(1.04);
	box-shadow: 0 2px 8px rgba(26, 26, 58, 0.22);
	color: #1a1a3a !important;
}

/* Mobile header */
body.sps-saas-header #mobile-header .site-header-row-container-inner > .site-container {
	max-width: 1180px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

body.sps-saas-header #mobile-header .site-main-header-inner-wrap.site-header-row {
	align-items: center;
	min-height: 56px;
	gap: 0.5rem;
}

body.sps-saas-header #mobile-header .site-header-main-section-right,
body.sps-saas-header #mobile-header .site-header-main-section-right .site-header-section-right {
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

body.sps-saas-header #mobile-header .sps-header-account {
	display: none;
}

body.sps-saas-header #mobile-header .sps-header-cta {
	min-height: 34px;
	padding: 0.35rem 0.85rem;
	font-size: 0.82rem;
}

body.sps-saas-header #mobile-header .site-branding .site-title {
	font-size: 0.88rem;
	max-width: 38vw;
}

@media (min-width: 900px) {
	body.sps-saas-header #masthead .sps-header-account {
		display: inline-flex;
	}
}

@media (max-width: 760px) {
	body.sps-saas-header #masthead .site-main-header-inner-wrap.site-header-row {
		min-height: 96px;
	}

	body.sps-saas-header #masthead .site-branding a.brand img.sps-header-logo--banner,
	body.sps-saas-header #mobile-header .site-branding a.brand img.sps-header-logo--banner {
		height: 84px;
		max-width: min(520px, 92vw);
	}
}

/* Account Center: centered brand only — tab bar is primary navigation (feature-flag gated). */
body.sps-saas-header.sps-account-center-view #masthead .header-navigation,
body.sps-saas-header.sps-account-center-view #masthead .site-header-item-main-navigation,
body.sps-saas-header.sps-account-center-view #masthead .sps-header-actions,
body.sps-saas-header.sps-account-center-view #masthead .mobile-toggle-open-container,
body.sps-saas-header.sps-account-center-view #mobile-header .header-navigation,
body.sps-saas-header.sps-account-center-view #mobile-header .site-header-item-main-navigation,
body.sps-saas-header.sps-account-center-view #mobile-header .sps-header-actions,
body.sps-saas-header.sps-account-center-view #mobile-header .mobile-toggle-open-container {
	display: none !important;
}

body.sps-saas-header.sps-account-center-view #masthead .site-main-header-inner-wrap.site-header-row,
body.sps-saas-header.sps-account-center-view #mobile-header .site-main-header-inner-wrap.site-header-row {
	justify-content: center;
}

body.sps-saas-header.sps-account-center-view #masthead .site-header-main-section-left,
body.sps-saas-header.sps-account-center-view #mobile-header .site-header-main-section-left {
	flex: 1 1 auto;
	justify-content: center;
	width: 100%;
}

body.sps-saas-header.sps-account-center-view #masthead .site-header-main-section-center,
body.sps-saas-header.sps-account-center-view #masthead .site-header-main-section-right,
body.sps-saas-header.sps-account-center-view #mobile-header .site-header-main-section-center,
body.sps-saas-header.sps-account-center-view #mobile-header .site-header-main-section-right {
	display: none !important;
}
