/* PWA Transpay — bandeaux installation et push (isolé, voir CHANGELOG_PWA.md) */

.gs-pwa-install-banner {
	position: fixed;
	left: 12px;
	right: 12px;
	bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	/* Au-dessus de #loading_panel (99999) — ne pas attendre la fin des requêtes load2() */
	z-index: 1000001;
	animation: gs-pwa-slide-up 0.35s ease-out;
}

.gs-pwa-install-inner {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	border-radius: 14px;
	background: linear-gradient(180deg, #132238 0%, #0a1628 100%);
	border: 1px solid rgba(100, 181, 246, 0.35);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.gs-pwa-install-icon {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	object-fit: contain;
	flex-shrink: 0;
	background: #fff;
	padding: 4px;
}

.gs-pwa-install-text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	color: #e3f2fd;
	font-size: 12px;
	line-height: 1.3;
}

.gs-pwa-install-text strong {
	font-size: 14px;
	color: #fff;
}

.gs-pwa-install-btn {
	flex-shrink: 0;
	border: none;
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(180deg, #1976d2 0%, #1565c0 100%);
	cursor: pointer;
}

.gs-pwa-install-close {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: #90caf9;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.gs-pwa-push-banner {
	position: fixed;
	left: 12px;
	right: 12px;
	top: calc(12px + env(safe-area-inset-top, 0px));
	z-index: 13900;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 12px;
	background: rgba(21, 101, 192, 0.95);
	border: 1px solid rgba(144, 202, 249, 0.4);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
	color: #fff;
	font-size: 13px;
}

.gs-pwa-push-text {
	flex: 1;
	line-height: 1.35;
}

.gs-pwa-push-btn {
	flex-shrink: 0;
	border: none;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 12px;
	font-weight: 700;
	background: #fff;
	color: #1565c0;
	cursor: pointer;
}

.gs-pwa-push-dismiss {
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	border: none;
	background: transparent;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
}

@keyframes gs-pwa-slide-up {
	from { transform: translateY(100%); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

@media (display-mode: standalone) {
	.gs-pwa-install-banner {
		display: none !important;
	}
	#gs_menu_install_pwa {
		display: none !important;
	}
}

/* Au-dessus du panneau bas glissant (accueil carte / liste) */
body.gs-split-mode .gs-pwa-install-banner {
	bottom: calc(var(--gs-sheet-peek, 72px) + 12px + env(safe-area-inset-bottom, 0px));
}

/* Modal instructions installation iOS / Android */
.gs-pwa-hint-modal {
	position: fixed;
	inset: 0;
	z-index: 1000002;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.gs-pwa-hint-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.gs-pwa-hint-sheet {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: 85vh;
	overflow-y: auto;
	margin: 12px;
	padding: 20px 18px calc(18px + env(safe-area-inset-bottom, 0px));
	border-radius: 16px 16px 0 0;
	background: #0f1c2e;
	border: 1px solid rgba(100, 181, 246, 0.35);
	color: #e3f2fd;
	animation: gs-pwa-slide-up 0.3s ease-out;
}

.gs-pwa-hint-sheet h3 {
	margin: 0 0 12px;
	font-size: 17px;
	color: #fff;
}

.gs-pwa-hint-steps {
	margin: 0 0 14px;
	padding-left: 20px;
	font-size: 14px;
	line-height: 1.5;
}

.gs-pwa-hint-steps li {
	margin-bottom: 8px;
}

.gs-pwa-hint-note {
	margin: 0 0 14px;
	font-size: 12px;
	color: #90caf9;
	line-height: 1.4;
}

.gs-pwa-hint-close {
	width: 100%;
	border: none;
	border-radius: 10px;
	padding: 12px;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(180deg, #1976d2 0%, #1565c0 100%);
	cursor: pointer;
}

/* Paramètres PWA (standalone uniquement) */
.gs-pwa-settings-section {
	margin-bottom: 18px;
	padding: 14px;
	border-radius: 12px;
	background: rgba(21, 101, 192, 0.08);
	border: 1px solid rgba(21, 101, 192, 0.25);
}

.gs-pwa-settings-platform {
	margin: 0 0 10px;
	font-size: 12px;
	color: #64b5f6;
}

.gs-pwa-settings-status {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 10px;
	font-size: 13px;
}

.gs-pwa-settings-server {
	margin: 0 0 12px;
	font-size: 12px;
	color: #90caf9;
}

.gs-pwa-settings-enable-btn {
	width: 100%;
	margin-top: 4px;
}

.gs-pwa-settings-help {
	margin: 10px 0 0;
	font-size: 12px;
	line-height: 1.45;
	color: #ffb74d;
}

#gs_pwa_settings_test_result {
	white-space: pre-line;
}

.gs-pwa-settings-diag {
	margin: 0 0 10px;
	padding: 8px 10px;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.2);
	font-size: 11px;
	line-height: 1.5;
	color: #b0bec5;
}

.gs-pwa-settings-diag code {
	font-size: 11px;
	color: #90caf9;
}
