/* ════════════════════════════════════════════════════════════════
   Print Hut — Scroll & paint performance (loads LAST)
   Fixes sticky/laggy scroll from fixed layers + backdrop-filter.
   ════════════════════════════════════════════════════════════════ */

/* Lightweight body — no fixed-attachment repaint on every scroll frame */
body.phpr-themed-page {
	background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 30%, #f8fafc 100%) !important;
	background-attachment: scroll !important;
	scroll-behavior: auto !important;
	-webkit-overflow-scrolling: touch;
}

/* Full-viewport fixed dot grid — major scroll compositor cost */
body.phpr-themed-page::before {
	display: none !important;
}

/* backdrop-filter forces expensive layer compositing while scrolling */
body.phpr-themed-page :is(
	.phpr-back-bar,
	.phpr-tabs,
	.phpr-dr__tabs,
	.phpr-toolbar,
	.phpr-cr-quick,
	.phpr-assign-panel,
	.phpr-prod__pills,
	.phpr-stat,
	.phpr-dr__stat,
	.phpr-action-card,
	.phpr-job-card,
	.phpr-prod__job,
	.phpr-cr-card,
	.phpr-sc-back-link,
	.phpr-sc-field-card,
	.phpr-sc-items-card,
	.phpr-btn--ghost,
	.phpr-btn--secondary,
	.phpr-intake-card,
	.phpr-create-card,
	.phpr-dr__tab,
	.phpr-tab
) {
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
}

/* Solid replacements for former glass surfaces */
body.phpr-themed-page .phpr-back-bar {
	background: #fff !important;
}

body.phpr-themed-page :is(.phpr-tabs, .phpr-dr__tabs) {
	background: #fff !important;
}

body.phpr-themed-page :is(#phpr-staff-app, #mfApp, #fnApp, #adminDash) .phpr-toolbar,
body.phpr-themed-page .phpr-control-room .phpr-cr-quick,
body.phpr-themed-page #adminDash .phpr-assign-panel,
body.phpr-themed-page :is(#mfApp, #fnApp) .phpr-prod__pills {
	background: #fff !important;
}

body.phpr-themed-page :is(.phpr-btn--ghost, .phpr-btn--secondary) {
	background: #fff !important;
}

/* contain: layout caused scroll hitching site-wide — removed intentionally */

/* While scrolling: kill hover lifts / shadows that trigger repaints */
body.phpr-phpr-scrolling :is(
	.phpr-cr-card,
	.phpr-stat,
	.phpr-dr__stat,
	.phpr-job-card,
	.phpr-intake-card,
	.phpr-prod__job,
	.phpr-action-card,
	.phpr-btn,
	.phpr-cr-health-chip
) {
	transition: none !important;
}

body.phpr-phpr-scrolling :is(
	.phpr-cr-card:hover,
	.phpr-stat:hover,
	.phpr-dr__stat:hover,
	.phpr-job-card:hover,
	.phpr-intake-card:hover,
	.phpr-prod__job:hover,
	.phpr-action-card:hover,
	.phpr-btn:hover,
	.phpr-btn:active
) {
	transform: none !important;
	box-shadow: inherit !important;
	filter: none !important;
}

/* Respect reduced-motion globally on themed pages */
@media (prefers-reduced-motion: reduce) {
	body.phpr-themed-page * {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
