/* PWA — barra de instalación (landing + feed) */
:root {
	--accent-violet: #da3b85;
}

.pwa-install-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2001;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
	background: rgba(26, 26, 26, 0.96);
	border-top: 1px solid rgba(218, 59, 133, 0.45);
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}

.pwa-install-bar--feed {
	bottom: calc(var(--feed-bottom-offset, 5rem) - 1px);
	padding-bottom: 0.5rem;
}

.pwa-install-bar[hidden] {
	display: none !important;
}

.pwa-install-bar-text {
	flex: 1;
	min-width: 0;
	font-size: 0.85rem;
	color: #f8f6f4;
	margin: 0;
	font-family: 'Catamaran', system-ui, sans-serif;
	line-height: 1.35;
}

.pwa-install-bar-actions {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 0.35rem;
}

.pwa-install-bar .btn-install {
	background: var(--accent-violet);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 0.45rem 1rem;
	font-size: 0.85rem;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
}

.pwa-install-bar .btn-install:active {
	filter: brightness(0.92);
}

.pwa-install-bar .btn-dismiss-pwa {
	background: transparent;
	color: rgba(255, 255, 255, 0.65);
	border: none;
	font-size: 1.35rem;
	line-height: 1;
	padding: 0.25rem 0.4rem;
	border-radius: 0.25rem;
	cursor: pointer;
	flex-shrink: 0;
}

.pwa-ios-backdrop {
	position: fixed;
	inset: 0;
	z-index: 2100;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(4px);
}

.pwa-ios-backdrop[hidden] {
	display: none !important;
}

.pwa-ios-sheet {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2101;
	max-height: 85vh;
	overflow: auto;
	padding: 1.25rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
	background: linear-gradient(180deg, #2a2a32 0%, #1a1a1e 100%);
	border-radius: 1rem 1rem 0 0;
	border-top: 2px solid var(--accent-violet);
	color: #f8f6f4;
	font-family: 'Catamaran', system-ui, sans-serif;
	box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
}

.pwa-ios-sheet[hidden] {
	display: none !important;
}

.pwa-ios-sheet h2 {
	font-size: 1.15rem;
	color: #fff;
	margin: 0 0 0.75rem;
	font-weight: 700;
}

.pwa-ios-sheet ol {
	margin: 0 0 1rem;
	padding-left: 1.25rem;
	font-size: 0.95rem;
	line-height: 1.55;
	color: rgba(248, 246, 244, 0.92);
}

.pwa-ios-sheet .pwa-ios-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.pwa-ios-sheet .btn-pwa-primary {
	flex: 1;
	min-width: 8rem;
	background: var(--accent-violet);
	color: #fff;
	border: none;
	border-radius: 0.5rem;
	padding: 0.6rem 1rem;
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
}

.pwa-ios-sheet .btn-pwa-secondary {
	flex: 1;
	min-width: 8rem;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 0.5rem;
	padding: 0.6rem 1rem;
	font-size: 0.9rem;
	cursor: pointer;
}

/* Barra PWA visible: subir el botón «volver arriba» del tema Lanotte */
body.has-pwa-install-bar--landing #scrollUp {
	bottom: calc(var(--pwa-install-bar-height, 3.5rem) + 0.85rem + env(safe-area-inset-bottom, 0px));
	transition: bottom 0.3s ease, background-color 0.4s ease-in-out;
}

body.has-pwa-install-bar--feed #scrollUp {
	bottom: calc(var(--feed-bottom-offset, 5rem) + var(--pwa-install-bar-height, 3.5rem) + 0.85rem + env(safe-area-inset-bottom, 0px));
	transition: bottom 0.3s ease, background-color 0.4s ease-in-out;
}
