/* Environment bar for local and staging sites (task 015). Inert unless the bar is on the page. */
.socha-env-bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 24px;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	pointer-events: none;
}
.socha-env-local {
	background: #facc15;
	color: #1f2937;
}
.socha-env-staging {
	background: #1d4ed8;
	color: #fff;
}

/* !important: Frappe's Desk CSS sets body { padding-top: 0 !important } */
body:has(> .socha-env-bar) {
	padding-top: 24px !important;
}

/* Desk: every sticky offset is based on --navbar-height (48px in Frappe v15), so
   counting the bar into it moves the page head, form tabs and scroll margins down. */
body.socha-env {
	--navbar-height: calc(48px + 24px);
}
body.socha-env .sticky-top,
body.socha-env .overlay-sidebar {
	/* the mobile sidebar is position: fixed; top: 0 below 992px, top is inert otherwise */
	top: 24px;
}

@media print {
	.socha-env-bar {
		display: none;
	}
	body:has(> .socha-env-bar) {
		padding-top: 0 !important;
	}
}
