/* PWA install banner + installed-app (standalone) adjustments. See inc/pwa.php. */

.rw-pwa-banner {
	--rw-pwa-offset: 0px;
	position: fixed;
	left: calc(12px + env(safe-area-inset-left, 0px));
	right: calc(12px + env(safe-area-inset-right, 0px));
	bottom: calc(12px + var(--rw-pwa-offset) + env(safe-area-inset-bottom, 0px));
	z-index: 99990;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 520px;
	margin: 0 auto;
	padding: 12px 12px 12px 14px;
	background: #ffffff;
	color: #1d2733;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(0, 30, 60, 0.22), 0 1px 3px rgba(0, 30, 60, 0.12);
	font-size: 14px;
	line-height: 1.35;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.25s ease, transform 0.25s ease;
	pointer-events: none;
}
.rw-pwa-banner.is-visible {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}
.rw-pwa-banner__icon {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 10px;
	box-shadow: 0 0 0 1px rgba(0, 55, 102, 0.1);
}
.rw-pwa-banner__text {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.rw-pwa-banner__title {
	font-size: 15px;
	color: #003766;
}
.rw-pwa-banner__share {
	display: inline-block;
	vertical-align: -3px;
	color: #007aff;
}
.rw-pwa-banner button.rw-pwa-banner__install {
	flex: 0 0 auto;
	margin: 0;
	padding: 9px 18px;
	border: 0;
	border-radius: 999px;
	background: #003766;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
}
.rw-pwa-banner button.rw-pwa-banner__close {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #6b7684;
	font-size: 24px;
	line-height: 32px;
	text-align: center;
	cursor: pointer;
}
.rw-pwa-banner button:focus-visible {
	outline: 2px solid #4077b8;
	outline-offset: 2px;
}

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

/* ---- Footer bar "Get App" item ---- */
.freshio-handheld-footer-bar ul li.rw-pwa-install > a::before {
	content: none;
}
.freshio-handheld-footer-bar ul li.rw-pwa-install > a .rw-pwa-ico {
	position: absolute;
	top: 0.55em;
	left: 50%;
	width: 1.6em;
	height: 1.6em;
	margin-left: -0.8em;
	color: #0a472e;
}
/* 5/6-column widths for the footer bar live in style.css (also needed in
   the Capacitor app, which doesn't load this file). */

/* ---- Inline icons ---- */
.rw-pwa-ico {
	display: inline-block;
	flex: 0 0 auto;
	vertical-align: -4px;
}
.rw-pwa-ico--share {
	color: #007aff;
}

/* ---- How-to-install bottom sheet ---- */
.rw-pwa-sheet {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}
.rw-pwa-sheet__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 25, 45, 0.5);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.rw-pwa-sheet__panel {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px));
	background: #ffffff;
	color: #1d2733;
	border-radius: 20px 20px 0 0;
	box-shadow: 0 -8px 30px rgba(0, 30, 60, 0.2);
	font-size: 15px;
	line-height: 1.45;
	transform: translateY(100%);
	transition: transform 0.25s ease;
}
.rw-pwa-sheet.is-open .rw-pwa-sheet__backdrop {
	opacity: 1;
}
.rw-pwa-sheet.is-open .rw-pwa-sheet__panel {
	transform: none;
}
.rw-pwa-sheet__head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 36px 16px 0;
}
.rw-pwa-sheet__head img {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 13px;
	box-shadow: 0 0 0 1px rgba(0, 55, 102, 0.1);
}
.rw-pwa-sheet__head h2 {
	margin: 0 0 2px;
	font-size: 18px;
	line-height: 1.25;
	color: #003766;
}
.rw-pwa-sheet__head p,
.rw-pwa-sheet__intro {
	margin: 0;
	color: #4a5563;
	font-size: 14px;
}
.rw-pwa-sheet__intro {
	margin-bottom: 10px;
	color: #1d2733;
	font-weight: 600;
}
.rw-pwa-sheet__steps {
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
	counter-reset: rw-pwa-step;
}
.rw-pwa-sheet__steps li {
	position: relative;
	margin: 0;
	padding: 10px 0 10px 40px;
	border-top: 1px solid #edf0f4;
	counter-increment: rw-pwa-step;
}
.rw-pwa-sheet__steps li:first-child {
	border-top: 0;
}
.rw-pwa-sheet__steps li::before {
	content: counter(rw-pwa-step);
	position: absolute;
	left: 0;
	top: 9px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #eaf1f9;
	color: #003766;
	font-size: 13px;
	font-weight: 700;
	line-height: 26px;
	text-align: center;
}
.rw-pwa-sheet button.rw-pwa-sheet__done {
	display: block;
	width: 100%;
	margin: 0;
	padding: 14px;
	border: 0;
	border-radius: 12px;
	background: #003766;
	color: #ffffff;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
}
.rw-pwa-sheet button.rw-pwa-sheet__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f4f8;
	color: #4a5563;
	font-size: 24px;
	line-height: 34px;
	text-align: center;
	cursor: pointer;
}
.rw-pwa-sheet button:focus-visible {
	outline: 2px solid #4077b8;
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	.rw-pwa-sheet__backdrop,
	.rw-pwa-sheet__panel {
		transition: none;
	}
}

/* Installed app: keep the fixed mobile footer bar clear of the iPhone home
   indicator (the browser chrome normally covers that area). */
@media (display-mode: standalone) {
	.freshio-handheld-footer-bar {
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
}
