
/* PWA UI */
#pwa-install-fab{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:9999;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:999px;
  background:#111;
  color:#fff;
  border:0;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(0,0,0,.22);
  font:600 14px/1.1 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
#pwa-install-fab img{
  width:22px;
  height:22px;
  border-radius:6px;
}
#pwa-install-fab[data-hidden="true"]{ display:none; }

#pwa-toast{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:86px;
  background:#111;
  color:#fff;
  padding:10px 12px;
  border-radius:12px;
  z-index:10001;
  box-shadow:0 6px 18px rgba(0,0,0,.22);
  font:600 13px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  display:none;
}

#pwa-sheet{
  position:fixed;
  inset:0;
  z-index:10000;
  display:none;
  background:rgba(0,0,0,.55);
}
#pwa-sheet .card{
  position:absolute;
  left:50%;
  bottom:0;
  transform:translateX(-50%);
  width:min(680px, 100%);
  background:#fff;
  color:#111;
  border-radius:16px 16px 0 0;
  padding:16px;
  box-shadow:0 -12px 32px rgba(0,0,0,.25);
  font:500 14px/1.35 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
#pwa-sheet .row{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin:10px 0;
}
#pwa-sheet .title{
  font:700 16px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  margin:0 0 8px 0;
}
#pwa-sheet .btns{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}
#pwa-sheet button{
  appearance:none;
  border:0;
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
  font:700 14px/1 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
#pwa-sheet .primary{ background:#111; color:#fff; }
#pwa-sheet .secondary{ background:#f2f2f2; color:#111; }


/* Improved Install App FAB */
#pwa-install-fab {
  padding: 12px 16px;
  gap: 8px;
  font-weight: 700;
  letter-spacing: .2px;
}
#pwa-install-fab svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}


/* =======================================================
   Install FAB enhancements (brand CTA, pulse, smart mode)
   ======================================================= */
#pwa-install-fab{
  background:#111;
  color:#fff;
  border:1px solid rgba(255,255,255,.10);
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease, width .18s ease, padding .18s ease;
  user-select:none;
}
#pwa-install-fab:hover{ transform: translateY(-1px); box-shadow:0 10px 24px rgba(0,0,0,.28); }
#pwa-install-fab:active{ transform: translateY(0px) scale(.98); }

#pwa-install-fab[data-hidden="true"]{ display:none; }
#pwa-install-fab[data-show="false"]{ opacity:0; pointer-events:none; transform: translateY(6px); }
#pwa-install-fab[data-show="true"]{ opacity:1; pointer-events:auto; }

#pwa-install-fab[data-compact="true"]{
  padding:12px;
  width:48px;
  height:48px;
  justify-content:center;
}
#pwa-install-fab[data-compact="true"] span{ display:none; }
#pwa-install-fab[data-compact="true"] img{ display:none; } /* legacy safety */

/* pulse on first impression */
@keyframes pwaPulse {
  0% { transform: translateY(0) scale(1); box-shadow:0 6px 18px rgba(0,0,0,.22); }
  40% { transform: translateY(-2px) scale(1.03); box-shadow:0 14px 30px rgba(0,0,0,.30); }
  100% { transform: translateY(0) scale(1); box-shadow:0 6px 18px rgba(0,0,0,.22); }
}
#pwa-install-fab.pwa-pulse{
  animation: pwaPulse 1.1s ease-in-out 0s 3;
}

#pwa-sheet button:disabled{
  opacity:.55;
  cursor:not-allowed;
}
