/**
 * PWA / mobile app layout — footer flush to content, no gap below copyright bar.
 */

html.onduty-pwa-standalone {
	--od-app-height: 100dvh;
	--od-vh: 1dvh;
}

@supports not (height: 100dvh) {
	html.onduty-pwa-standalone {
		--od-app-height: calc(var(--od-vh, 1vh) * 100);
	}
}

/* All app pages: never stretch #page to viewport height. */
body.onduty-app-page,
body.onduty-app-page #page {
	min-height: 0 !important;
	height: auto !important;
	padding-bottom: 0 !important;
	margin-bottom: 0 !important;
}

body.onduty-app-page #page {
	display: block !important;
}

body.onduty-app-page #content,
body.onduty-app-page main#content,
body.onduty-app-page .site-content,
body.onduty-app-page .site-content .ast-container {
	flex: none !important;
	min-height: 0 !important;
	height: auto !important;
	padding-bottom: 0 !important;
	margin-bottom: 0 !important;
}

body.onduty-app-page .onduty-app-footer {
	margin-top: 0 !important;
	padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}

body.onduty-app-page header#masthead,
body.onduty-app-page .custom-header {
	padding-top: env(safe-area-inset-top, 0px);
}

@media (display-mode: standalone), (display-mode: fullscreen) {
	html.onduty-pwa-standalone,
	html.onduty-pwa-standalone body {
		overflow-x: hidden;
	}

	body.page-id-1060 .onduty-hr-standalone .onduty-fleet-scene--app {
		bottom: var(--od-footer-height, 76px);
	}

	body.onduty-app-page .onduty-fleet-scene {
		bottom: calc(var(--od-footer-height, 76px) + env(safe-area-inset-bottom, 0px));
	}
}

@media (max-width: 768px) {
	body.page-template-on-duty-php .wizard-step.wizard-step-3,
	body.page-template-on-duty-php .wizard-step.wizard-step-4,
	body.page-template-on-duty-php .wizard-step.wizard-step-5,
	body.page-template-on-duty-php .wizard-step.wizard-step-6,
	body.page-template-on-duty-php .wizard-step.wizard-step-7 {
		padding-bottom: 24px !important;
	}

	body.page-template-on-duty-php .vehicle-card-wrapper,
	body.page-template-on-duty-php .age-card-wrapper,
	body.page-template-on-duty-php .download-app-card-wrapper {
		margin-bottom: 32px;
	}

	body.page-template-on-duty-php .onduty-app-footer {
		padding-top: 12px;
		padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
	}
}
