/**
 * VeloRun — header logado (home, atletas, organizadores).
 * Escopo: body.velorun-stage-cloud-active (exceto páginas legais).
 * Hambúrguer: breakpoint base do velorun.css em 1024px.
 */

body.velorun-stage-cloud-active:not(.velorun-legal-page-active) {
	scroll-padding-top: 80px;
}

body.admin-bar.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-stage-page .velorun-header,
body.admin-bar.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-eduardo-header-chrome .velorun-header {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-stage-page .velorun-header,
	body.admin-bar.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-eduardo-header-chrome .velorun-header {
		top: 46px;
	}
}

/* Fallback compacto logado apenas em larguras intermediárias apertadas (Sair no dropdown libera espaço) */
@media (min-width: 1025px) and (max-width: 1100px) {
	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-stage-page .velorun-menu,
	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-eduardo-header-chrome .velorun-menu,
	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-stage-page .velorun-nav__actions .velorun-nav__cta-primary,
	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-eduardo-header-chrome .velorun-nav__actions .velorun-nav__cta-primary,
	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-stage-page .velorun-nav__actions .velorun-btn--ghost,
	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-eduardo-header-chrome .velorun-nav__actions .velorun-btn--ghost,
	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-stage-page .velorun-nav__actions .velorun-nav__cta-secondary,
	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-eduardo-header-chrome .velorun-nav__actions .velorun-nav__cta-secondary,
	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-stage-page .velorun-nav__actions .velorun-link-login,
	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-eduardo-header-chrome .velorun-nav__actions .velorun-link-login,
	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-stage-page .velorun-nav__actions .velorun-nav-user-menu,
	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-eduardo-header-chrome .velorun-nav__actions .velorun-nav-user-menu {
		display: none !important;
	}

	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-stage-page .velorun-burger,
	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-eduardo-header-chrome .velorun-burger {
		display: grid !important;
	}

	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) {
		--vr-event-mobile-header-h: 64px;
	}

	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-header.is-open {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		height: 100dvh;
		max-height: 100dvh;
		z-index: 100060;
		overflow: hidden;
	}

	body.admin-bar.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-header.is-open {
		top: 32px;
		height: calc(100dvh - 32px);
		max-height: calc(100dvh - 32px);
	}

	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-header.is-open .velorun-mobile-menu {
		display: flex !important;
		position: absolute;
		top: var(--vr-event-mobile-header-h);
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1;
		margin: 0;
		padding: 12px 14px calc(16px + env(safe-area-inset-bottom, 0px));
		background: #080b0a;
		border-top: 1px solid rgba(255, 255, 255, 0.08);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		max-height: none;
	}
}

@media (max-width: 782px) {
	body.admin-bar.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-header.is-open {
		top: 46px;
		height: calc(100dvh - 46px);
		max-height: calc(100dvh - 46px);
	}
}

@media (min-width: 1101px) {
	body.logged-in.velorun-stage-cloud-active:not(.velorun-legal-page-active) .velorun-stage-page .velorun-nav__actions {
		gap: 8px;
	}
}
