/* Approved WordPress header, adapted to the current theme's shared tokens. */
:root {
	--rentclub-header-height: 92px;
	--rentclub-admin-offset: 0px;
}

html:has(body.admin-bar) {
	--rentclub-admin-offset: 32px;
}

/* The template-part wrapper must stick, not its height-limited child. */
.wp-site-blocks > header:has([data-rentclub-header]) {
	position: sticky;
	top: var(--rentclub-admin-offset);
	z-index: 1000;
}

/* On the homepage the documentary hero starts at the top of the viewport.
 * Keep the navigation above the image without reserving a separate dark row. */
body.home .wp-site-blocks > header:has([data-rentclub-header]) {
	position: fixed;
	right: 0;
	left: 0;
	width: 100%;
}

body.home .rent-club-hero {
	min-height: 100svh;
}

:where(main [id]) {
	scroll-margin-top: calc(var(--rentclub-header-height) + var(--rentclub-admin-offset) + 24px);
}

.rentclub-header-shell {
	position: relative;
	z-index: 100;
	padding: var(--wp--preset--spacing--20) clamp(12px, 4vw, 64px) 0;
}

.rentclub-header-panel {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: var(--wp--preset--spacing--card-gap);
	max-width: 1360px;
	min-height: 72px;
	margin: 0 auto;
	padding: var(--wp--preset--spacing--media-inset) var(--wp--preset--spacing--card-inset-compact);
	border-radius: 34px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--foreground);
	transition: min-height 220ms ease;
}

.rentclub-header-shell.is-scrolled .rentclub-header-panel {
	min-height: 64px;
}

.rentclub-wordmark {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-family: var(--wp--preset--font-family--onest);
	font-size: var(--wp--preset--font-size--heading-md);
	font-weight: 700;
	letter-spacing: -0.045em;
	line-height: 1;
	white-space: nowrap;
}

.rentclub-desktop-nav,
.rentclub-header-actions {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--media-inset);
}

.rentclub-desktop-nav {
	justify-content: center;
	min-width: 0;
}

.rentclub-desktop-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 var(--wp--preset--spacing--20);
	border-radius: 999px;
	font-size: var(--wp--preset--font-size--label);
	white-space: nowrap;
}

.rentclub-desktop-nav a:hover,
.rentclub-desktop-nav a.is-current {
	background: var(--wp--preset--color--purple-100);
	color: var(--wp--preset--color--secondary-0);
	opacity: 1;
}

.rentclub-header-shell .rent-club-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--text-md);
	white-space: nowrap;
}

.rentclub-header-shell .rent-club-button--primary {
	--rent-club-button-flair-color: var(--wp--preset--color--purple-100);

	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--secondary-100);
}

.rentclub-header-shell .rent-club-button--primary:hover,
.rentclub-header-shell .rent-club-button--primary:focus-visible {
	background: var(--wp--preset--color--purple-100);
	color: var(--wp--preset--color--secondary-0);
}

.rentclub-header-shell .rent-club-button--secondary {
	--rent-club-button-flair-color: var(--wp--preset--color--purple-100);
	gap: var(--wp--preset--spacing--media-inset);
}

.rentclub-header-shell .rent-club-button--secondary:hover,
.rentclub-header-shell .rent-club-button--secondary:focus-visible {
	background: var(--wp--preset--color--purple-100);
	color: var(--wp--preset--color--secondary-0);
}

.rentclub-header-shell .rentclub-telegram-link,
.rentclub-menu-button,
.rentclub-close-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	min-height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--foreground);
	font-size: var(--wp--preset--font-size--text-lg);
	cursor: pointer;
}

.rentclub-telegram-link svg {
	position: relative;
	z-index: 1;
	fill: currentcolor;
}

.rentclub-header-shell .rentclub-header-cta--compact,
.rentclub-menu-button {
	display: none;
}

body.rentclub-menu-open {
	overflow: hidden;
}

.rentclub-mobile-layer {
	position: fixed;
	z-index: 120;
	inset: 0;
	background: color-mix(in srgb, var(--wp--preset--color--secondary-100) 65%, transparent);
}

.rentclub-mobile-layer[hidden] {
	display: none;
}

.rentclub-mobile-sheet {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	max-width: var(--wp--custom--editorial--reading);
	max-height: calc(100dvh - var(--rentclub-admin-offset) - var(--wp--preset--spacing--card-gap));
	margin-inline: auto;
	overflow: auto;
	overscroll-behavior: contain;
	padding: var(--wp--preset--spacing--card-inset);
	padding-bottom: calc(var(--wp--preset--spacing--card-inset) + env(safe-area-inset-bottom));
	border-radius: 28px 28px 0 0;
	background: var(--wp--preset--color--paper-white);
	color: var(--wp--preset--color--paper-ink);
}

.rentclub-mobile-sheet__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--card-gap);
}

.rentclub-mobile-sheet__title {
	font-size: var(--wp--preset--font-size--label);
	color: var(--wp--preset--color--paper-graphite);
}

.rentclub-close-button {
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--paper-ink);
	font-size: var(--wp--preset--font-size--heading-md);
}

.rentclub-mobile-nav {
	display: grid;
	margin: var(--wp--preset--spacing--card-gap) 0 var(--wp--preset--spacing--card-gap-large);
}

/* Desktop links and mobile links belong to separate navigation trees. */
/* stylelint-disable-next-line no-descending-specificity */
.rentclub-mobile-nav a {
	display: flex;
	align-items: center;
	min-height: 58px;
	color: inherit;
	font-family: var(--wp--preset--font-family--onest);
	font-size: var(--wp--preset--font-size--heading-md);
	font-weight: 600;
	line-height: 1.3;
}

.rentclub-mobile-nav a:hover,
.rentclub-mobile-nav a.is-current {
	color: var(--wp--preset--color--heading-highlight);
}

.rentclub-mobile-sheet :is(a, button):focus-visible {
	outline: 2px solid var(--wp--preset--color--heading-highlight);
	outline-offset: 4px;
}

.rentclub-header-shell .rentclub-mobile-cta {
	width: 100%;
	margin: 0;
	background: var(--wp--preset--color--paper-ink);
	color: var(--wp--preset--color--paper-white);
	--rent-club-button-flair-color: var(--wp--preset--color--heading-highlight);
}

.rentclub-header-shell .rentclub-mobile-cta:hover,
.rentclub-header-shell .rentclub-mobile-cta:focus-visible {
	background: var(--wp--preset--color--heading-highlight);
	color: var(--wp--preset--color--paper-white);
}

.rentclub-mobile-social {
	display: flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	margin-top: var(--wp--preset--spacing--card-gap);
	color: var(--wp--preset--color--paper-graphite);
	font-size: var(--wp--preset--font-size--label);
}

.rentclub-mobile-social:hover {
	color: var(--wp--preset--color--paper-ink);
	text-decoration: underline;
}

.rentclub-nojs-nav {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--30);
}

@media (max-width: 1100px) {

	.rentclub-header-panel {
		grid-template-columns: auto 1fr;
		min-height: 64px;
		border-radius: 28px;
	}

	.rentclub-desktop-nav,
	.rentclub-header-shell .rentclub-telegram-link,
	.rentclub-header-shell .rentclub-header-cta--desktop {
		display: none;
	}

	.rentclub-header-actions {
		justify-self: end;
	}

	.rentclub-header-shell .rentclub-header-cta--compact,
	.rentclub-menu-button {
		display: inline-flex;
	}

	.rentclub-menu-button {
		flex-direction: column;
		gap: 4px;
	}

	.rentclub-menu-button span {
		display: block;
		width: 17px;
		height: 2px;
		border-radius: 2px;
		background: currentcolor;
	}
}

@media (max-width: 374px) {

	.rentclub-header-shell .rentclub-header-cta--compact {
		display: none;
	}
}

@media (max-width: 782px) {

	html:has(body.admin-bar) {
		--rentclub-admin-offset: 46px;
	}

	body.admin-bar #wpadminbar {
		position: fixed;
	}
}

@media (prefers-reduced-motion: reduce) {

	.rentclub-header-panel {
		transition: none;
	}
}
