/* /css/pwa.css - Estilos mínimos para PWA MeuOFF */

/* 1. Safe Areas - CRÍTICO para iPhone */
.pwa-installed {
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

.pwa-installed body {
  padding-top: var(--safe-area-top);
  padding-bottom: var(--safe-area-bottom);
}

.pwa-installed .navbar-fixed-top {
  height: calc(60px + var(--safe-area-top));
  padding-top: var(--safe-area-top);
}

/* 2. Botão de instalação */
#pwa-install-btn {
  display: none !important;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #0A2463;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(10, 36, 99, 0.3);
  cursor: pointer;
  z-index: 10000;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

#pwa-install-btn.show {
  display: flex !important;
}

/* 3. Fix para inputs no iOS (evita zoom) */
@media (display-mode: standalone) {
  input, textarea, select {
    font-size: 16px !important;
  }
}

/* 4. Indicador offline */
.pwa-offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #FF9800;
  color: white;
  padding: 10px;
  text-align: center;
  z-index: 9999;
  display: none;
}

.pwa-offline-banner.show {
  display: block;
}

/* 5. Splash screen (opcional) */
#pwa-splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0A2463;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

#pwa-splash.hide {
  display: none;
}