/* ============================================================
   Custom "install this app" prompt.

   Replaces the browser's default install chip with a branded
   card. Two flavours, both styled here:
     - Android / desktop Chrome: an action card with an Install
       button wired to the captured beforeinstallprompt event.
     - iOS Safari: an instruction card (iOS has no install API),
       pointing at the Share -> Add to Home Screen flow.

   Injected + controlled by pwa-install.js.
   ============================================================ */

.pwa-install {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(140%);
  width: calc(100% - 28px);
  max-width: 440px;
  z-index: 9000;
  box-sizing: border-box;
  background: linear-gradient(135deg, #1b2c78 0%, #17256c 55%, #101746 100%);
  color: #fff;
  border-radius: 16px;
  padding: 16px 16px 16px 18px;
  box-shadow: 0 14px 38px rgba(8, 13, 45, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: transform 0.42s cubic-bezier(0.2, 0.9, 0.3, 1),
              opacity 0.42s ease;
}
.pwa-install.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.pwa-install.is-leaving {
  transform: translateX(-50%) translateY(140%);
  opacity: 0;
}

/* layout: icon | text | (close) */
.pwa-install-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pwa-install-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.pwa-install-text { flex: 1; min-width: 0; }
.pwa-install-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.pwa-install-desc {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.74);
}
.pwa-install-close {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.07);
  transition: background 0.15s, color 0.15s;
}
.pwa-install-close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* primary action button (Android / Chrome) */
.pwa-install-actions {
  display: flex;
  gap: 10px;
  margin-top: 13px;
}
.pwa-install-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 11px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.pwa-install-btn-primary {
  background: linear-gradient(135deg, #ffce4a, #ffb400);
  color: #17256c;
  box-shadow: 0 6px 16px rgba(255, 180, 0, 0.34);
}
.pwa-install-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(255, 180, 0, 0.44);
}
.pwa-install-btn-ghost {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.85);
  padding: 11px 18px;
}
.pwa-install-btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }

/* iOS instruction strip */
.pwa-install-ios {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
}
.pwa-install-ios b { color: #fff; font-weight: 800; }
/* small inline glyph standing in for the iOS Share icon */
.pwa-install-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  vertical-align: -4px;
  margin: 0 1px;
  color: #4ea1ff;
}
.pwa-install-share svg { width: 14px; height: 14px; display: block; }

@media (prefers-reduced-motion: reduce) {
  .pwa-install { transition: opacity 0.3s ease; }
  .pwa-install,
  .pwa-install.is-visible,
  .pwa-install.is-leaving { transform: translateX(-50%); }
}
