/*! PWA Install Prompt v1.1.0 — recolour by overriding these variables (e.g. in Customizer > Additional CSS) */
:root {
	--pwaip-accent: #ddaa28;       /* Install button background */
	--pwaip-accent-text: #1f1f1f;  /* Install button text */
	--pwaip-bg: #ffffff;
	--pwaip-text: #1f1f1f;
	--pwaip-muted: #5c5c5c;
	--pwaip-radius: 14px;
	--pwaip-offset: 24px;          /* gap from the screen edge on desktop */
	--pwaip-offset-bottom: 96px;   /* desktop: sits above the chat button in the corner */
	--pwaip-z: 2147483000;
}

.pwaip {
	position: fixed;
	right: var(--pwaip-offset);
	bottom: var(--pwaip-offset-bottom);
	z-index: var(--pwaip-z);
	width: 360px;
	max-width: calc(100vw - 2 * var(--pwaip-offset));
	box-sizing: border-box;
	padding: 18px 18px 12px;
	background: var(--pwaip-bg);
	color: var(--pwaip-text);
	border-radius: var(--pwaip-radius);
	box-shadow: 0 10px 40px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .08);
	font: inherit;
	font-size: 15px;
	line-height: 1.45;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .25s ease, transform .25s ease;
}
.pwaip[hidden] { display: none; }
.pwaip--open { opacity: 1; transform: none; }
.pwaip *, .pwaip *::before, .pwaip *::after { box-sizing: border-box; }

.pwaip__row { display: flex; gap: 14px; align-items: flex-start; padding-right: 24px; }
.pwaip__icon { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 12px; object-fit: cover; }
.pwaip__text { min-width: 0; }
.pwaip__title { margin: 0 0 4px; font-weight: 700; font-size: 1.05em; line-height: 1.3; color: var(--pwaip-text); }
.pwaip__body { margin: 0; color: var(--pwaip-muted); }
.pwaip__glyph { display: inline-flex; vertical-align: -3px; color: #007aff; }

.pwaip__actions { display: flex; gap: 8px; margin-top: 14px; }
.pwaip__btn {
	flex: 1 1 0;
	margin: 0;
	padding: 10px 14px;
	border: 0;
	border-radius: 10px;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
	min-height: 44px;
}
.pwaip__btn[hidden] { display: none; }
.pwaip__btn--primary { background: var(--pwaip-accent); color: var(--pwaip-accent-text); }
.pwaip__btn--primary:hover { filter: brightness(.95); }
.pwaip__btn--primary:disabled { opacity: .6; cursor: default; }
.pwaip__btn--secondary { background: rgba(0, 0, 0, .06); color: var(--pwaip-text); }
.pwaip__btn--secondary:hover { background: rgba(0, 0, 0, .1); }

.pwaip__never {
	display: block;
	margin: 10px auto 0;
	padding: 4px 6px;
	background: none;
	border: 0;
	color: var(--pwaip-muted);
	font: inherit;
	font-size: 12.5px;
	text-decoration: underline;
	cursor: pointer;
	min-height: 0;
}
.pwaip__never:hover { color: var(--pwaip-text); background: none; }

.pwaip__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--pwaip-muted);
	font-size: 22px;
	line-height: 32px;
	text-align: center;
	cursor: pointer;
	min-height: 0;
}
.pwaip__close:hover { background: rgba(0, 0, 0, .06); color: var(--pwaip-text); }

.pwaip button:focus-visible { outline: 2px solid var(--pwaip-text); outline-offset: 2px; }

/* Mobile: full-width bottom sheet */
@media (max-width: 600px) {
	.pwaip {
		left: 0;
		right: 0;
		bottom: 0;
		width: auto;
		max-width: none;
		border-radius: var(--pwaip-radius) var(--pwaip-radius) 0 0;
		padding: 18px 16px calc(10px + env(safe-area-inset-bottom, 0px));
		transform: translateY(100%);
	}
	.pwaip--open { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.pwaip { transition: none; }
}

/* "Install App" menu link: give the menu item the CSS class "pwaip-menu-install".
   It is hidden once the app is installed (or when the site is opened as the app). */
.pwaip-installed .pwaip-menu-install { display: none !important; }
