/**
 * PWA / Schnellzugriff-Panel — Lesbarkeit auf dunklem Hintergrund (Browser & Standalone).
 */

/* Dunkles Panel: helle Schrift erzwingen (schlägt Kontrast-System & Seiten-CSS) */
body.solumondo-app .solumondo-pwa-panel-host.is-active .solumondo-app-install,
body.solumondo-app .solumondo-app-install:not(.is-collapsed) {
	background:
		radial-gradient(120% 90% at 50% -10%, color-mix(in srgb, var(--solumondo-orange) 22%, transparent), transparent 58%),
		linear-gradient(165deg, #0b1830 0%, var(--solumondo-navy, #050b14) 42%, #03070f 100%) !important;
	color: #f5f8ff !important;
}

body.solumondo-app .solumondo-pwa-panel-host.is-active .solumondo-app-install__inner,
body.solumondo-app .solumondo-app-install:not(.is-collapsed) .solumondo-app-install__inner {
	color: #f5f8ff !important;
}

body.solumondo-app .solumondo-pwa-panel-host.is-active .solumondo-app-install :where(
	h2,
	h3,
	p,
	li,
	ol,
	span,
	strong,
	em,
	.solumondo-app-install__badge,
	.solumondo-app-install__title,
	.solumondo-app-install__lead
),
body.solumondo-app .solumondo-app-install:not(.is-collapsed) :where(
	h2,
	h3,
	p,
	li,
	ol,
	span,
	strong,
	em,
	.solumondo-app-install__badge,
	.solumondo-app-install__title,
	.solumondo-app-install__lead
) {
	color: #f5f8ff !important;
	-webkit-text-fill-color: #f5f8ff !important;
	background: none !important;
	background-image: none !important;
}

body.solumondo-app .solumondo-pwa-panel-host.is-active .solumondo-app-install__steps,
body.solumondo-app .solumondo-app-install:not(.is-collapsed) .solumondo-app-install__steps,
body.solumondo-app .solumondo-pwa-panel-host.is-active .solumondo-app-install__steps li,
body.solumondo-app .solumondo-app-install:not(.is-collapsed) .solumondo-app-install__steps li {
	color: #eef2f8 !important;
	-webkit-text-fill-color: #eef2f8 !important;
}

body.solumondo-app .solumondo-pwa-panel-host.is-active .solumondo-app-install .solumondo-power-btn,
body.solumondo-app .solumondo-app-install:not(.is-collapsed) .solumondo-app-install .solumondo-power-btn,
body.solumondo-app .solumondo-pwa-panel-host.is-active #solumondo-app-install-btn,
body.solumondo-app .solumondo-app-install:not(.is-collapsed) #solumondo-app-install-btn {
	color: #101820 !important;
	-webkit-text-fill-color: #101820 !important;
	background: linear-gradient(
		165deg,
		color-mix(in srgb, var(--solumondo-orange) 92%, #ffffff),
		var(--solumondo-orange)
	) !important;
	border: 1px solid color-mix(in srgb, #101820 14%, var(--solumondo-orange)) !important;
}

body.solumondo-app .solumondo-pwa-panel-host.is-active .solumondo-app-install__dismiss,
body.solumondo-app .solumondo-app-install:not(.is-collapsed) .solumondo-app-install__dismiss,
body.solumondo-app .solumondo-pwa-panel-host.is-active #solumondo-app-install-dismiss,
body.solumondo-app .solumondo-app-install:not(.is-collapsed) #solumondo-app-install-dismiss {
	color: #ffd6a6 !important;
	-webkit-text-fill-color: #ffd6a6 !important;
	background: color-mix(in srgb, #ffffff 10%, transparent) !important;
	border: 1px solid color-mix(in srgb, var(--solumondo-orange) 42%, transparent) !important;
}

body.solumondo-app .solumondo-pwa-panel-host.is-active .solumondo-app-install__dismiss:hover,
body.solumondo-app .solumondo-pwa-panel-host.is-active .solumondo-app-install__dismiss:focus-visible,
body.solumondo-app .solumondo-app-install:not(.is-collapsed) .solumondo-app-install__dismiss:hover,
body.solumondo-app .solumondo-app-install:not(.is-collapsed) .solumondo-app-install__dismiss:focus-visible {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
}

/* Online/Offline — Theme-Snackbar (PWA) */
.solumondo-network-snackbar {
	box-sizing: border-box;
	position: fixed;
	z-index: 10000050;
	left: max(0.75rem, env(safe-area-inset-left, 0px));
	right: max(0.75rem, env(safe-area-inset-right, 0px));
	bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	max-width: min(36rem, calc(100% - 1.5rem));
	margin-inline: auto;
	padding: 0.75rem 2.75rem 0.75rem 0.95rem;
	color: #f5f8ff !important;
	background: linear-gradient(165deg, #0b1830 0%, #050b14 55%, #03070f 100%) !important;
	border: 2px solid color-mix(in srgb, var(--solumondo-orange, #ff6a00) 55%, #ffffff) !important;
	border-radius: 0.75rem;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
	transform: translateY(120%);
	opacity: 0;
	pointer-events: none;
	transition: transform 200ms ease, opacity 200ms ease;
}

html.solumondo-network-snackbar--show .solumondo-network-snackbar,
body.solumondo-app.solumondo-network-snackbar--show .solumondo-network-snackbar {
	transform: translateY(0);
	opacity: 1;
	pointer-events: auto;
}

.solumondo-network-snackbar__msg {
	flex: 1 1 12rem;
	margin: 0;
	color: #f5f8ff !important;
	-webkit-text-fill-color: #f5f8ff !important;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.4;
}

.solumondo-network-snackbar__refresh {
	color: #ffd6a6 !important;
	-webkit-text-fill-color: #ffd6a6 !important;
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 0.12em;
}

.solumondo-network-snackbar__refresh:hover,
.solumondo-network-snackbar__refresh:focus-visible {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
}

.solumondo-network-snackbar__close {
	position: absolute;
	top: 0.35rem;
	right: 0.35rem;
	width: 2.25rem;
	height: 2.25rem;
	margin: 0;
	padding: 0;
	color: #ffd6a6 !important;
	-webkit-text-fill-color: #ffd6a6 !important;
	font-size: 1.35rem;
	line-height: 1;
	background: transparent !important;
	border: 0;
	border-radius: 0.35rem;
	cursor: pointer;
}

.solumondo-network-snackbar__close:hover,
.solumondo-network-snackbar__close:focus-visible {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
}

/* Hochkontrast: Snackbar bleibt dunkel mit heller Schrift */
html[data-solumondo-contrast="high"] .solumondo-network-snackbar,
html[data-solumondo-contrast="high"] .solumondo-network-snackbar :where(p, a, button, span) {
	color: #f5f8ff !important;
	-webkit-text-fill-color: #f5f8ff !important;
	background-image: none;
}

html[data-solumondo-contrast="high"] .solumondo-network-snackbar__refresh {
	color: #ffff00 !important;
	-webkit-text-fill-color: #ffff00 !important;
}

/* SuperPWA-Legacy-Snackbar (alter Service Worker) */
html[data-solumondo-contrast="high"] body.solumondo-app.snackbar--show .snackbar,
html[data-solumondo-contrast="high"] body.solumondo-app.snackbar--show .snackbar :where(p, a, button, span, .snackbar-close),
body.solumondo-app.snackbar--show .snackbar,
body.solumondo-app.snackbar--show .snackbar :where(p, a, button, span, .snackbar-close) {
	color: #f5f8ff !important;
	-webkit-text-fill-color: #f5f8ff !important;
}

body.solumondo-app.snackbar--show .snackbar,
html[data-solumondo-contrast="high"] body.solumondo-app.snackbar--show .snackbar {
	background-color: #0b1830 !important;
	border: 2px solid #ff8c33 !important;
}

@media (display-mode: standalone) {
	body.solumondo-app .solumondo-pwa-panel-host.is-active .solumondo-app-install :where(h2, p, li, ol, span),
	body.solumondo-app .solumondo-app-install:not(.is-collapsed) :where(h2, p, li, ol, span) {
		color: #f5f8ff !important;
		-webkit-text-fill-color: #f5f8ff !important;
	}
}
