/**
 * Loaded only on the designated PWA app page.
 * All header-hiding rules are gated on .is-pwa-standalone so they
 * have ZERO effect on normal browser visits — the page looks and
 * works identically for desktop and non-installed mobile users.
 *
 * Adjust the selectors under "HEADER / NAV HIDING" to match the
 * active theme's actual markup.
 */

/* =========================================================================
   HEADER / NAV HIDING
   Only fires when the page is running as an installed standalone PWA.
   ========================================================================= */

.is-pwa-standalone header,
.is-pwa-standalone .site-header,
.is-pwa-standalone #masthead,
.is-pwa-standalone #site-header,
.is-pwa-standalone .header-area,
.is-pwa-standalone .main-navigation,
.is-pwa-standalone #main-navigation,
.is-pwa-standalone .primary-navigation,
.is-pwa-standalone .nav-primary {
	display: none !important;
}

/*
 * Elementor-specific: hides the header section when built with Elementor's
 * Header Builder / theme builder location.
 */
.is-pwa-standalone .elementor-location-header {
	display: none !important;
}

/*
 * Remove any top-padding/margin the theme adds to compensate for a
 * fixed/sticky header — avoids a blank gap at the top of the app page.
 */
.is-pwa-standalone .site-content,
.is-pwa-standalone #content,
.is-pwa-standalone .content-area,
.is-pwa-standalone main {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

/* =========================================================================
   ADD TO HOME SCREEN (A2HS) INSTALL BUTTON
   ========================================================================= */

#af-pwa-a2hs-banner {
	display: none;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 99999;
	padding: 16px 20px;
	background: #ffffff;
	box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.12);
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	align-items: center;
	gap: 16px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

#af-pwa-a2hs-banner.is-visible {
	display: flex;
}

#af-pwa-a2hs-icon {
	width: 48px;
	height: 48px;
	border-radius: 10px;
	flex-shrink: 0;
	object-fit: cover;
}

#af-pwa-a2hs-text {
	flex: 1;
	min-width: 0;
}

#af-pwa-a2hs-text strong {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: #1a1a1a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#af-pwa-a2hs-text span {
	display: block;
	font-size: 13px;
	color: #666;
	margin-top: 2px;
}

#af-pwa-a2hs-btn {
	flex-shrink: 0;
	padding: 10px 20px;
	border: none;
	border-radius: 8px;
	background: #0073aa;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.1s ease;
	-webkit-tap-highlight-color: transparent;
}

#af-pwa-a2hs-btn:hover {
	background: #005a87;
}

#af-pwa-a2hs-btn:active {
	transform: scale(0.97);
}

#af-pwa-a2hs-dismiss {
	flex-shrink: 0;
	background: none;
	border: none;
	padding: 8px;
	cursor: pointer;
	color: #999;
	font-size: 20px;
	line-height: 1;
	-webkit-tap-highlight-color: transparent;
}

#af-pwa-a2hs-dismiss:hover {
	color: #333;
}

/* iOS hint variant: no install button, just a text hint */
#af-pwa-a2hs-banner.is-ios #af-pwa-a2hs-btn {
	display: none;
}

#af-pwa-a2hs-banner.is-ios #af-pwa-a2hs-text span::after {
	content: ' ↑';
}
