/* Web-App (PWA) – Installationsbanner */

.wapwa-install-button[hidden],
.wapwa-standalone .wapwa-install-button {
	display: none !important;
}

.wapwa-banner {
	--wapwa-accent: #1d2327;
	--wapwa-accent-text: #fff;
	--wapwa-bg: #fff;
	--wapwa-fg: #1d2327;
	--wapwa-muted: rgba(29, 35, 39, .72);
	--wapwa-hover: rgba(0, 0, 0, .06);
	position: fixed;
	z-index: 2147483000;
	left: 50%;
	bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	box-sizing: border-box;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto auto;
	grid-template-areas: "icon body btn close";
	align-items: center;
	column-gap: 12px;
	width: calc(100% - 24px);
	max-width: 520px;
	margin: 0;
	padding: 12px 10px 12px 14px;
	background: var(--wapwa-bg);
	color: var(--wapwa-fg);
	border-radius: 16px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .08);
	font: 400 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	text-align: left;
	opacity: 0;
	transform: translate(-50%, calc(100% + 24px));
	transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .35s ease;
}

.wapwa-banner.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

.wapwa-banner *,
.wapwa-banner *::before,
.wapwa-banner *::after {
	box-sizing: border-box;
}

.wapwa-banner__icon {
	grid-area: icon;
	display: block;
	width: 44px;
	height: 44px;
	margin: 0;
	border-radius: 10px;
	object-fit: cover;
}

.wapwa-banner__body {
	grid-area: body;
	min-width: 0;
}

.wapwa-banner__title {
	display: block;
	margin: 0 0 2px;
	overflow: hidden;
	font-size: 15px;
	font-weight: 600;
	color: inherit;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wapwa-banner__text {
	display: block;
	font-size: 13px;
	color: var(--wapwa-muted);
}

.wapwa-share {
	display: inline-block;
	width: 1.25em;
	height: 1.25em;
	margin: 0 .1em;
	vertical-align: -.25em;
	color: #0a84ff;
}

.wapwa-share svg {
	display: block;
	width: 100%;
	height: 100%;
}

.wapwa-banner button {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	font-family: inherit;
	-webkit-tap-highlight-color: transparent;
}

.wapwa-banner button:focus-visible {
	outline: 2px solid var(--wapwa-accent);
	outline-offset: 2px;
}

.wapwa-banner .wapwa-banner__install {
	grid-area: btn;
	padding: 9px 16px;
	border-radius: 999px;
	background: var(--wapwa-accent);
	color: var(--wapwa-accent-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.wapwa-banner .wapwa-banner__close {
	grid-area: close;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	color: var(--wapwa-fg);
	opacity: .55;
	font-size: 22px;
	line-height: 1;
}

.wapwa-banner .wapwa-banner__close:hover {
	opacity: 1;
	background: var(--wapwa-hover);
}

/* Schmale Handys: Button unter den Text, damit der Text nicht gequetscht wird. */
@media (max-width: 560px) {
	.wapwa-banner {
		grid-template-columns: auto minmax(0, 1fr) auto;
		grid-template-areas:
			"icon body close"
			".    btn  btn";
		align-items: start;
	}

	.wapwa-banner .wapwa-banner__install {
		justify-self: start;
		margin-top: 10px;
	}

	.wapwa-banner .wapwa-banner__close {
		margin: -4px -2px 0 0;
	}
}

@media (prefers-color-scheme: dark) {
	.wapwa-banner {
		--wapwa-bg: #232427;
		--wapwa-fg: #f0f0f1;
		--wapwa-muted: rgba(240, 240, 241, .7);
		--wapwa-hover: rgba(255, 255, 255, .1);
		box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
	}
}

@media (prefers-reduced-motion: reduce) {
	.wapwa-banner {
		transform: translate(-50%, 0);
		transition: opacity .2s ease;
	}
}
