/* RSD PWA — rama aplikacji na zwykłych stronach (aktywna tylko w trybie standalone). */

/* Domyślnie (zwykła przeglądarka): rama ukryta, strona bez zmian. */
.rsd-pwa-chrome-top,
.rsd-pwa-chrome-bar { display: none; }

/* ── Tryb aplikacji (zainstalowana PWA) ──────────────────────────────────── */

/* Ukryj nagłówek, stopkę i pasek admina motywu. */
html.rsd-pwa-standalone #wpadminbar,
html.rsd-pwa-standalone header[role="banner"],
html.rsd-pwa-standalone #masthead,
html.rsd-pwa-standalone .site-header,
html.rsd-pwa-standalone header.header,
html.rsd-pwa-standalone .nv-header,
html.rsd-pwa-standalone footer[role="contentinfo"],
html.rsd-pwa-standalone #site-footer,
html.rsd-pwa-standalone .site-footer,
html.rsd-pwa-standalone footer.nv-footer,
html.rsd-pwa-standalone .nv-footer,
html.rsd-pwa-standalone .nv-footer-wrap {
	display: none !important;
}

html.rsd-pwa-standalone { margin-top: 0 !important; }

/* Miejsce na górny/dolny pasek aplikacji. */
html.rsd-pwa-standalone body {
	padding-top: calc(52px + env(safe-area-inset-top)) !important;
	padding-bottom: calc(64px + env(safe-area-inset-bottom)) !important;
}

/* Górny pasek aplikacji (pierwsza linia: logo + nazwa). */
html.rsd-pwa-standalone .rsd-pwa-chrome-top {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	gap: 10px;
	height: calc(52px + env(safe-area-inset-top));
	padding: env(safe-area-inset-top) 14px 0;
	background: var(--rsd-pwa-primary, #2E4738);
	color: #fff;
	box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.rsd-pwa-chrome-logo { width: 30px; height: 30px; object-fit: contain; border-radius: 6px; display: block; }
.rsd-pwa-chrome-title { font-size: 16px; font-weight: 600; line-height: 1.2; }

/* Dolny pasek aplikacji. */
html.rsd-pwa-standalone .rsd-pwa-chrome-bar {
	position: fixed;
	bottom: 0; left: 0; right: 0;
	z-index: 99999;
	display: flex;
	justify-content: space-around;
	align-items: stretch;
	gap: 2px;
	background: var(--rsd-pwa-primary, #2E4738);
	border-top: 1px solid rgba(255,255,255,.12);
	padding-bottom: env(safe-area-inset-bottom);
	box-shadow: 0 -2px 12px rgba(0,0,0,.25);
}
.rsd-pwa-chrome-bar .rsd-pwa-bar-item {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	padding: 9px 4px 8px;
	min-width: 0;
	text-decoration: none;
	color: rgba(255,255,255,.82);
	font-size: 11px;
	line-height: 1.1;
	-webkit-tap-highlight-color: transparent;
}
.rsd-pwa-chrome-bar .rsd-pwa-bar-item:active { color: #fff; background: rgba(255,255,255,.08); }
.rsd-pwa-chrome-bar .rsd-pwa-bar-ico { display: flex; align-items: center; justify-content: center; height: 24px; }
.rsd-pwa-chrome-bar .rsd-pwa-bar-icon { font-size: 20px; line-height: 1; }
.rsd-pwa-chrome-bar .rsd-pwa-bar-icon-img { width: 22px; height: 22px; object-fit: contain; display: block; }
.rsd-pwa-chrome-bar .rsd-pwa-bar-label {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
