/* Spoti PWA - banner instalacji (premium app feel: transform/opacity, tokeny,
 * touch targety >= 44px, safe-area, prefers-reduced-motion honorowane). */

:root {
	--spoti-pwa-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--spoti-pwa-dur: 340ms;
}

/* Podwojona klasa (0,2,0) - ekran logowania auth 2.0 ma inline
   `body.auth-body > * { position: relative; z-index: 1 }` (0,1,1, dla nakladki tla),
   ktore bije nasze `.spoti-pwa-banner` (0,1,0) i czynilo banner `relative` w
   przeplywie (scrollowal sie i nachodzil na stopke). (0,2,0) wygrywa bez !important
   i niezaleznie od kolejnosci arkuszy. */
.spoti-pwa-banner.spoti-pwa-banner {
	position: fixed;
	z-index: 99999;
}

.spoti-pwa-banner {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	z-index: 99999;
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: 560px;
	margin: 0 auto;
	padding: 14px 16px;
	background: #ffffff;
	color: #1f2937;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(2, 8, 20, 0.16);
	opacity: 0;
	transform: translateY(16px);
	transition: opacity var(--spoti-pwa-dur) var(--spoti-pwa-ease), transform var(--spoti-pwa-dur) var(--spoti-pwa-ease);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.45;
}

.spoti-pwa-banner.is-open {
	opacity: 1;
	transform: translateY(0);
}

.spoti-pwa-banner__txt {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.spoti-pwa-banner__txt strong {
	font-size: 15px;
}

.spoti-pwa-banner__txt span {
	color: #6b7280;
}

.spoti-pwa-banner__actions {
	flex: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.spoti-pwa-banner__btn {
	min-height: 44px;
	min-width: 96px;
	padding: 10px 16px;
	font: inherit;
	font-weight: 700;
	color: #374151;
	background: #f3f4f6;
	border: 0;
	border-radius: 12px;
	cursor: pointer;
	transition: background-color 150ms ease, transform 80ms ease;
	-webkit-tap-highlight-color: transparent;
}

.spoti-pwa-banner__btn:active {
	transform: scale(0.97);
}

.spoti-pwa-banner__btn--primary {
	color: #ffffff;
	background: var(--spoti-pwa-accent, #068fe3);
}

@media (max-width: 480px) {
	.spoti-pwa-banner {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	.spoti-pwa-banner__actions {
		flex-direction: row;
	}

	.spoti-pwa-banner__btn {
		flex: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.spoti-pwa-banner,
	.spoti-pwa-banner__btn {
		transition: none !important; /* !important: reduced-motion override (dozwolony wyjatek) */
		transform: none !important;
	}
}
