/**
 * Header brand row: logo, Instagram CTA, theme toggle, auth buttons.
 */

.site-header,
.site-header .header.header-au-brand {
	overflow: visible;
}

.header.header-au-brand {
	position: relative;
	z-index: 1000;
}

.header.header-au-brand .cs-container,
.header.header-au-brand .cs-container-fluid {
	display: block;
}

.au-header-brand-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 1.5rem;
	width: 100%;
	min-height: 92px;
	padding: 0.85rem 0;
}

.au-header-brand-row__start,
.au-header-brand-row__end {
	display: flex;
	align-items: center;
	min-width: 0;
}

.au-header-brand-row__start {
	gap: 1.35rem;
}

.au-header-brand-row__end {
	justify-content: flex-end;
	flex-shrink: 0;
}

.au-header-brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 0.35rem;
	flex: 0 0 auto;
	line-height: 1;
}

.au-header-brand__logo-link.site-logo,
.au-header-brand__logo-link.site-title {
	display: inline-flex;
}

.au-header-brand .logo-image {
	max-height: 54px;
	width: auto;
}

.au-header-brand__description {
	margin: 0;
	font-size: 0.875rem;
	color: #666;
}

.au-header-instagram {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.55rem 0.95rem;
	border: 1px solid #e3e3e3;
	border-radius: 999px;
	color: #111;
	background: #fff;
	font-family: Inter, sans-serif;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.au-header-instagram__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	color: #111;
}

.au-header-instagram__text {
	display: inline-flex;
	align-items: baseline;
	gap: 0.3rem;
	font-size: 0.78rem;
	line-height: 1.2;
}

.au-header-instagram__lead {
	color: #666;
	font-weight: 400;
}

.au-header-instagram__brand {
	color: #111;
	font-weight: 600;
}

.au-header-instagram:hover,
.au-header-instagram:focus {
	border-color: #cfcfcf;
	color: #000;
	background: #fafafa;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	text-decoration: none;
}

.au-header-actions {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: nowrap;
	gap: 0.75rem;
}

.au-header-auth-guest {
	display: inline-flex;
	align-items: center;
}

.au-header-auth-guest__buttons {
	display: inline-flex;
	align-items: center;
	flex-wrap: nowrap;
	justify-content: flex-end;
	gap: 0.75rem;
}

.au-header-actions--mobile .au-header-auth-guest {
	align-items: stretch;
	width: 100%;
}

.au-header-actions--mobile .au-header-auth-guest__buttons {
	flex-direction: column;
	width: 100%;
}

/* Skip link */
.au-skip-link.screen-reader-text:focus {
	position: fixed;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 100000;
	display: inline-block;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.75rem 1rem;
	clip: auto;
	clip-path: none;
	overflow: visible;
	border-radius: 8px;
	background: #111;
	color: #fff;
	font-family: Inter, sans-serif;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Compact account chip in primary navbar (mobile / tablet) */
.au-header-account-chip {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-left: 0.5rem;
	border: 1px solid #e3e3e3;
	border-radius: 999px;
	background: #fff;
	color: #111;
	text-decoration: none;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.au-header-account-chip:hover,
.au-header-account-chip:focus {
	border-color: #cfcfcf;
	background: #fafafa;
	text-decoration: none;
}

.au-header-account-chip__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	background: #111;
	color: #fff;
	font-family: Inter, sans-serif;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.04em;
}

.au-header-account-chip__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Sticky navbar polish */
.navbar-primary.sticky-nav {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

[data-scheme="dark"] .navbar-primary.sticky-nav {
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

/* Phase E: desktop logo dedup + scroll collapse */
@media (min-width: 1120px) {
	.header-enabled .header-au-brand + .navbar-primary .navbar-brand {
		display: none;
	}

	.header.header-au-brand {
		max-height: 160px;
		overflow: hidden;
		transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
	}

	.site-header.is-scrolled .header.header-au-brand {
		max-height: 0;
		opacity: 0;
		padding-top: 0;
		padding-bottom: 0;
		pointer-events: none;
	}

	.site-header.is-scrolled .header-au-brand + .navbar-primary .navbar-brand {
		display: inline-flex;
	}
}

@media (max-width: 1119px) {
	.au-header-account-chip {
		display: inline-flex;
	}
}

/* Primary nav links should not show persistent underlines */
.navbar-primary .navbar-nav > li > a,
.navbar-primary .navbar-brand,
.navbar-primary .navbar-search {
	text-decoration: none;
}

.navbar-primary .navbar-nav > li > a:hover,
.navbar-primary .navbar-nav > li > a:focus,
.navbar-primary .navbar-nav > li.current-menu-item > a,
.navbar-primary .navbar-nav > li.current_page_item > a,
.navbar-primary .navbar-nav > li.current-menu-parent > a,
.navbar-primary .navbar-nav > li.current-menu-ancestor > a {
	text-decoration: none;
}

/* Dropdown sub-menu links should not show persistent underlines */
.navbar-primary .navbar-nav .sub-menu a,
.navbar-primary .navbar-nav .sub-menu > li > a,
.navbar-primary .nav .sub-menu > li > a {
	text-decoration: none;
}

.navbar-primary .navbar-nav .sub-menu a:hover,
.navbar-primary .navbar-nav .sub-menu a:focus,
.navbar-primary .navbar-nav .sub-menu > li > a:hover,
.navbar-primary .navbar-nav .sub-menu > li > a:focus {
	text-decoration: none;
}

.au-header-theme-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	min-height: 2.5rem;
	padding: 0.45rem 0.95rem;
	border: 1px solid #e3e3e3;
	border-radius: 999px;
	background: #fff;
	color: #111;
	font-family: Inter, sans-serif;
	font-size: 0.78rem;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.au-header-theme-toggle__icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1rem;
	height: 1rem;
}

.au-header-theme-toggle__sun,
.au-header-theme-toggle__moon {
	position: absolute;
	top: 0;
	left: 0;
}

.au-header-theme-toggle__sun {
	opacity: 1;
}

.au-header-theme-toggle__moon {
	opacity: 0;
}

[data-scheme="dark"] .au-header-theme-toggle__sun {
	opacity: 0;
}

[data-scheme="dark"] .au-header-theme-toggle__moon {
	opacity: 1;
}

.au-header-theme-toggle:hover,
.au-header-theme-toggle:focus {
	border-color: #cfcfcf;
	background: #fafafa;
}

.au-header-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.5rem;
	padding: 0.45rem 1rem;
	border: 1px solid transparent;
	border-radius: 999px;
	font-family: Inter, sans-serif;
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.au-header-btn--ghost {
	color: #111;
	background: transparent;
}

.au-header-btn--ghost:hover,
.au-header-btn--ghost:focus {
	color: #000;
	text-decoration: none;
}

.au-header-btn--primary {
	border-color: #111;
	color: #fff;
	background: #111;
}

.au-header-btn--primary:hover,
.au-header-btn--primary:focus {
	border-color: #000;
	color: #fff;
	background: #000;
	text-decoration: none;
}

/* Logged-in user menu */
.au-header-user-menu {
	position: relative;
}

.au-header-user-menu__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	min-height: 2.5rem;
	padding: 0.35rem 0.85rem 0.35rem 0.4rem;
	border: 1px solid #e3e3e3;
	border-radius: 999px;
	background: #fff;
	color: #111;
	font-family: Inter, sans-serif;
	font-size: 0.78rem;
	font-weight: 500;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.au-header-user-menu__toggle:hover,
.au-header-user-menu__toggle:focus,
.au-header-user-menu.is-open .au-header-user-menu__toggle {
	border-color: #cfcfcf;
	background: #fafafa;
}

.au-header-user-menu__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	background: #111;
	color: #fff;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.04em;
}

.au-header-user-menu__name {
	max-width: 9rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.au-header-user-menu__chevron {
	width: 0.45rem;
	height: 0.45rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-1px);
	transition: transform 0.2s ease;
}

.au-header-user-menu.is-open .au-header-user-menu__chevron {
	transform: rotate(225deg) translateY(1px);
}

.au-header-user-menu__dropdown {
	position: absolute;
	top: calc(100% + 0.45rem);
	right: 0;
	z-index: 1001;
	min-width: 13.5rem;
	padding: 0.4rem;
	border: 1px solid #ececec;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.au-header-user-menu__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.au-header-user-menu__link {
	display: block;
	padding: 0.65rem 0.8rem;
	border-radius: 8px;
	color: #111;
	font-family: Inter, sans-serif;
	font-size: 0.82rem;
	font-weight: 500;
	text-decoration: none !important;
}

.au-header-user-menu__link:hover,
.au-header-user-menu__link:focus {
	background: #f5f5f5;
	color: #000;
	text-decoration: none;
}

.au-header-user-menu__link.is-logout {
	color: #b42318;
}

.au-header-user-menu__link.is-logout:hover,
.au-header-user-menu__link.is-logout:focus {
	background: #fff1f0;
	color: #912018;
}

.au-header-user-menu--mobile {
	width: 100%;
}

.au-header-user-menu--mobile .au-header-user-menu__toggle {
	width: 100%;
	justify-content: flex-start;
}

.au-header-user-menu--mobile .au-header-user-menu__dropdown {
	position: static;
	width: 100%;
	margin-top: 0.45rem;
	box-shadow: none;
}

/* Auth utilities — above nav on mobile */
.au-mobile-menu__utilities {
	display: grid;
	gap: 0.5rem;
	margin-bottom: 0;
	padding-bottom: 0.65rem;
	border-bottom: 1px solid var(--au-menu-border, #eeeeee);
}

.au-mobile-menu__footer .au-header-actions--mobile {
	flex-direction: column;
	align-items: stretch;
	width: 100%;
}

.au-mobile-menu__footer .au-header-instagram,
.au-mobile-menu__footer .au-header-theme-toggle {
	width: 100%;
	justify-content: center;
}

.au-header-actions--mobile {
	flex-direction: column;
	align-items: stretch;
	width: 100%;
}

.au-header-actions--mobile .au-header-btn,
.au-header-actions--mobile .au-header-instagram,
.au-header-actions--mobile .au-header-theme-toggle {
	width: 100%;
	justify-content: center;
}

[data-scheme="dark"] .au-header-instagram,
[data-scheme="dark"] .au-header-theme-toggle,
[data-scheme="dark"] .au-header-user-menu__toggle {
	border-color: #3a3a3a;
	color: #f2f2f2;
	background: #161616;
}

[data-scheme="dark"] .au-header-instagram__lead {
	color: #b0b0b0;
}

[data-scheme="dark"] .au-header-instagram__brand,
[data-scheme="dark"] .au-header-instagram__icon {
	color: #f2f2f2;
}

[data-scheme="dark"] .au-header-btn--ghost {
	color: #f2f2f2;
}

[data-scheme="dark"] .au-header-btn--primary {
	border-color: #f2f2f2;
	color: #111;
	background: #f2f2f2;
}

[data-scheme="dark"] .au-header-account-chip {
	border-color: #3a3a3a;
	background: #161616;
	color: #f2f2f2;
}

[data-scheme="dark"] .au-header-account-chip:hover,
[data-scheme="dark"] .au-header-account-chip:focus {
	border-color: #555;
	background: #1f1f1f;
}

[data-scheme="dark"] .au-header-user-menu__dropdown {
	border-color: #333;
	background: #1a1a1a;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

[data-scheme="dark"] .au-header-user-menu__link {
	color: #f2f2f2;
}

[data-scheme="dark"] .au-header-user-menu__link:hover,
[data-scheme="dark"] .au-header-user-menu__link:focus {
	background: #242424;
}

@media (max-width: 1100px) {
	.au-header-instagram__text {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
	}

	.au-header-user-menu__name {
		max-width: 6.5rem;
	}
}

@media (max-width: 900px) {
	.au-header-brand-row {
		grid-template-columns: 1fr;
		gap: 0.85rem;
	}

	.au-header-brand-row__end {
		justify-content: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.header.header-au-brand {
		transition: none;
	}
}
