/* PWA Install Banner */
.phyto-pwa-banner {
	position: fixed;
	left: 12px;
	right: 12px;
	bottom: 12px;
	z-index: 9998;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
	transform: translateY(calc(100% + 20px));
	opacity: 0;
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
	max-width: 480px;
	margin: 0 auto;
}

.phyto-pwa-banner.show {
	transform: translateY(0);
	opacity: 1;
}

.phyto-pwa-banner-inner {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
}

.phyto-pwa-icon {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	overflow: hidden;
	background: #f5f5f5;
}

.phyto-pwa-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

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

.phyto-pwa-text strong {
	font-size: 15px;
	font-weight: 600;
	color: #333;
	line-height: 1.2;
}

.phyto-pwa-text span {
	font-size: 12px;
	color: #777;
	line-height: 1.3;
}

.phyto-pwa-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.phyto-pwa-install {
	padding: 9px 18px;
	background: #4c9156;
	color: #fff;
	border: none;
	border-radius: 22px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
	white-space: nowrap;
}

.phyto-pwa-install:hover,
.phyto-pwa-install:active {
	background: #3d7a46;
}

.phyto-pwa-close {
	width: 32px;
	height: 32px;
	background: transparent;
	border: none;
	color: #999;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	border-radius: 50%;
	transition: background 0.2s;
}

.phyto-pwa-close:hover,
.phyto-pwa-close:active {
	background: #f0f0f0;
	color: #333;
}

/* Modal istruzioni iOS */
.phyto-pwa-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.phyto-pwa-modal.show {
	opacity: 1;
	pointer-events: auto;
}

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

.phyto-pwa-modal-content {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	background: #fff;
	border-radius: 16px;
	padding: 32px 28px 24px;
	max-width: 340px;
	width: calc(100% - 32px);
	text-align: center;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.phyto-pwa-modal-close {
	position: absolute;
	top: 8px;
	right: 12px;
	width: 36px;
	height: 36px;
	background: transparent;
	border: none;
	color: #999;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.phyto-pwa-modal-icon {
	width: 64px;
	height: 64px;
	border-radius: 14px;
	margin-bottom: 12px;
}

.phyto-pwa-modal-content h3 {
	font-size: 18px;
	font-weight: 600;
	color: #333;
	margin: 0 0 8px;
}

.phyto-pwa-modal-content p {
	font-size: 14px;
	color: #666;
	margin: 0 0 16px;
}

.phyto-pwa-modal-content ol {
	text-align: left;
	font-size: 14px;
	color: #444;
	line-height: 1.7;
	padding-left: 22px;
	margin: 0;
}

.phyto-pwa-modal-content ol li {
	margin-bottom: 8px;
}

.phyto-pwa-modal-content ol strong {
	color: #4c9156;
}

/* Safe area iOS */
@supports (padding: max(0px)) {
	.phyto-pwa-banner {
		bottom: max(12px, env(safe-area-inset-bottom));
	}
}
