/* PWA Vila Ema — barra offline e convite de instalação */
.pwa-offline-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10050;
  background: #1f2937;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem 0.75rem;
  letter-spacing: 0.01em;
}
.pwa-offline-bar.is-on {
  display: block;
}
body:has(.pwa-offline-bar.is-on) {
  padding-top: 2rem;
}

.pwa-install {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10040;
  padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom));
  pointer-events: none;
}
@media (max-width: 640px) {
  .pwa-install {
    bottom: 64px;
  }
}
.pwa-install-card {
  pointer-events: auto;
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #dbe7de;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(13, 99, 40, 0.18);
  padding: 0.85rem 0.95rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.pwa-install-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}
.pwa-install-copy strong {
  color: #0d6328;
  font-size: 0.95rem;
}
.pwa-install-copy span {
  color: #4b5563;
  font-size: 0.8rem;
  line-height: 1.35;
}
.pwa-install-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.pwa-btn-primary,
.pwa-btn-ghost {
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  border: 1px solid transparent;
}
.pwa-btn-primary {
  background: #0d6328;
  color: #fff;
}
.pwa-btn-primary:hover {
  background: #0a4f20;
}
.pwa-btn-ghost {
  background: #fff;
  color: #374151;
  border-color: #e5e7eb;
}
.pwa-btn-ghost:hover {
  background: #f8fafc;
}

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