/* pwa-install.css — "Install app" floating button and modal.
   Moved out of index.html. Linked in <body> at the exact spot the
   inline \3c style> used to be, so the cascade order is unchanged. */

/* ── PWA Install FAB ── */
#pwaInstallFab {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px) + 12px);
  right: 18px;
  z-index: 900;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #19378C;
  color: #fff;
  border: none;
  cursor: pointer;
  display: none; /* shown by JS only when needed */
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(25,55,140,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
#pwaInstallFab .material-symbols-rounded { font-size: 22px !important; }
#pwaInstallFab:active { transform: scale(0.92); box-shadow: 0 2px 8px rgba(25,55,140,0.25); }
#pwaInstallFab.fab-visible { display: flex; }
/* Pulse ring to draw attention on first show */
#pwaInstallFab.fab-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(25,55,140,0.4);
  animation: fabPulse 1.8s ease-out 3;
}
@keyframes fabPulse {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ── PWA Install Modal ── */
#pwaInstallModal {
  position: fixed;
  inset: 0;
  z-index: 99000;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
#pwaInstallModal.pwa-modal-open {
  display: flex;
}
.pwa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.48);
  animation: pwaFadeIn 0.22s ease;
}
@keyframes pwaFadeIn { from { opacity: 0; } to { opacity: 1; } }

.pwa-modal-sheet {
  position: relative;
  background: #fff;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 0 1.4rem calc(1.6rem + env(safe-area-inset-bottom, 0px));
  animation: pwaSlideUp 0.32s cubic-bezier(0.34, 1.2, 0.64, 1);
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@keyframes pwaSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.pwa-modal-handle {
  width: 38px; height: 4px;
  background: #e0e0e0;
  border-radius: 4px;
  margin: 14px auto 0;
}

.pwa-modal-icon {
  width: 60px; height: 60px;
  border-radius: 18px;
  background: #eef1f9;
  display: flex; align-items: center; justify-content: center;
  margin: 20px auto 14px;
}
.pwa-modal-icon .material-symbols-rounded { font-size: 30px !important; color: #19378C; }
.pwa-modal-icon-android { background: #e8f5e9; }
.pwa-modal-icon-android .material-symbols-rounded { color: #2e7d32; }

.pwa-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #1a1a2e;
  text-align: center;
  margin-bottom: 6px;
}
.pwa-modal-sub {
  font-size: 13.5px;
  color: #666;
  text-align: center;
  line-height: 1.5;
  margin-bottom: 22px;
  padding: 0 0.5rem;
}

.pwa-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pwa-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.pwa-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #19378C;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.pwa-step-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13.5px;
  line-height: 1.45;
}
.pwa-step-body strong { color: #1a1a2e; font-weight: 700; }
.pwa-step-body span   { color: #555; }
.pwa-step-icon { font-size: 20px; margin-top: 2px; }

.pwa-note {
  font-size: 12px;
  color: #888;
  text-align: center;
  background: #fffbe6;
  border: 1px solid #ffe082;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 4px;
  line-height: 1.5;
}

.pwa-install-btn {
  width: 100%;
  padding: 14px;
  background: #19378C;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.pwa-install-btn:active { background: #0f2460; }
.pwa-install-btn .material-symbols-rounded { font-size: 20px !important; }

.pwa-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #555;
  -webkit-tap-highlight-color: transparent;
}
.pwa-modal-close .material-symbols-rounded { font-size: 18px !important; }
.pwa-modal-close:active { background: #e0e0e0; }
