/* Plantlyzer PWA — install banner.
 * One small fixed card at the bottom. Deliberately NO backdrop, NO
 * pointer-event traps, NO body scroll locks — the page behind it scrolls
 * and reacts exactly as the theme renders it. */

.plz-pwa-banner {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: calc(14px + env(safe-area-inset-bottom));
	z-index: 260; /* above content + theme bottom nav (110), below lightbox (9999) */
	width: min(420px, calc(100vw - 24px));
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	background: #fff;
	border: 1px solid #dcedc8;
	border-radius: 16px;
	box-shadow: 0 12px 34px rgba(15, 40, 20, 0.2);
	font-family: var(--font-heading, "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif);
	text-align: left;
}
.plz-pwa-banner[hidden] { display: none; }

.plz-pwa-b__icon {
	width: 46px;
	height: 46px;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(27, 94, 32, 0.22);
	flex: none;
}

.plz-pwa-b__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	flex: 1 1 auto;
}
.plz-pwa-b__title {
	color: #14532d;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.2;
}
.plz-pwa-b__sub {
	color: #4b5563;
	font-size: 0.78rem;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.plz-pwa-b__install {
	flex: none;
	background: #2e7d32;
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 9px 18px;
	font-size: 0.85rem;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
}
.plz-pwa-b__install:hover { background: #1b5e20; }

.plz-pwa-b__close {
	flex: none;
	align-self: flex-start;
	background: none;
	border: 0;
	color: #6b7280;
	font-size: 1.15rem;
	line-height: 1;
	padding: 4px 6px;
	cursor: pointer;
	border-radius: 8px;
}
.plz-pwa-b__close:hover { background: #f3f4f6; color: #111827; }

/* iOS variant: no Install button, slightly taller instruction text. */
.plz-pwa-banner[data-variant="ios"] .plz-pwa-b__sub { font-size: 0.8rem; }

/* Safety nets (defensive only — this banner never coexists with the
 * members-only theme bottom bar, and never blocks the AI button). */
@media (max-width: 520px) {
	.plz-pwa-banner {
		left: 12px;
		right: 12px;
		transform: none;
		width: auto;
		padding: 11px 12px;
	}
}
body.plz-has-bottomnav .plz-pwa-banner {
	bottom: calc(84px + env(safe-area-inset-bottom));
}

@media (prefers-reduced-motion: no-preference) {
	.plz-pwa-banner:not([hidden]) { animation: plzpwa-in 0.35s ease-out; }
	@keyframes plzpwa-in {
		from { opacity: 0; transform: translateX(-50%) translateY(14px); }
		to { opacity: 1; transform: translateX(-50%) translateY(0); }
	}
	@media (max-width: 520px) {
		.plz-pwa-banner:not([hidden]) { animation-name: plzpwa-in-sm; }
		@keyframes plzpwa-in-sm {
			from { opacity: 0; transform: translateY(14px); }
			to { opacity: 1; transform: translateY(0); }
		}
	}
}
