body.pwa-install-open { overflow: hidden; }

.footer-install-link {
  width: max-content;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: right;
}
.footer-install-link:hover { color: #efc65f; }

.pwa-install-layer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 18px;
  opacity: 0;
  transition: opacity .22s ease;
}
.pwa-install-layer.is-visible { opacity: 1; }
.pwa-install-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(3, 18, 40, .58);
  backdrop-filter: blur(5px);
}
.pwa-install-card {
  position: relative;
  width: min(100%, 480px);
  overflow: hidden;
  padding: 25px 22px 18px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 27px;
  color: #12233f;
  background:
    radial-gradient(circle at 0 0, rgba(239, 198, 95, .22), transparent 34%),
    #fff;
  box-shadow: 0 28px 80px rgba(3, 18, 40, .28);
  transform: translateY(34px) scale(.98);
  transition: transform .24s cubic-bezier(.22, .8, .3, 1);
}
.pwa-install-layer.is-visible .pwa-install-card { transform: translateY(0) scale(1); }
.pwa-install-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #dce4ee;
  border-radius: 50%;
  color: #52637c;
  background: rgba(255, 255, 255, .86);
  font-size: 24px;
  line-height: 1;
}
.pwa-install-heading { display: flex; align-items: center; gap: 15px; padding-left: 34px; }
.pwa-install-heading img {
  width: 70px;
  height: 70px;
  flex: 0 0 70px;
  border-radius: 19px;
  box-shadow: 0 10px 25px rgba(6, 40, 90, .2);
}
.pwa-install-kicker { color: #9a701d; font-size: 12px; font-weight: 800; }
.pwa-install-heading h2 { margin: 4px 0 0; color: #06285a; font-size: 21px; line-height: 1.5; }
.pwa-install-description { margin: 18px 0 12px; color: #52637c; font-size: 14px; line-height: 1.9; }
.pwa-install-benefits { display: grid; gap: 7px; margin: 0 0 17px; padding: 0; list-style: none; color: #233957; font-size: 12px; font-weight: 700; }
.pwa-install-benefits li { display: flex; align-items: center; gap: 8px; }
.pwa-install-benefits span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #74510b;
  background: #fff4d5;
  font-size: 11px;
}
.pwa-android-guide,
.pwa-ios-guide { margin: 4px 0 18px; border: 1px solid #dce4ee; border-radius: 17px; background: #f6f8fc; }
.pwa-android-guide { display: flex; align-items: center; gap: 12px; padding: 13px; }
.pwa-guide-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  border-radius: 12px;
  color: #fff;
  background: #06285a;
  font-size: 24px;
  line-height: 1;
}
.pwa-android-guide p { margin: 0; color: #465a75; font-size: 12px; line-height: 1.8; }
.pwa-browser-note { margin: 0; padding: 11px 13px; border-bottom: 1px solid #ead9a9; color: #6f5418; background: #fff8e5; font-size: 12px; font-weight: 700; }
.pwa-ios-guide ol { display: grid; gap: 0; margin: 0; padding: 5px 13px; list-style: none; }
.pwa-ios-guide li { min-height: 48px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid #e4e9f0; }
.pwa-ios-guide li:last-child { border-bottom: 0; }
.pwa-ios-guide li > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  border-radius: 8px;
  color: #fff;
  background: #06285a;
  font-size: 11px;
  font-weight: 800;
}
.pwa-ios-guide p { margin: 0; color: #465a75; font-size: 12px; line-height: 1.7; }
.pwa-share-symbol { display: inline-block; color: #0876df; font-size: 21px; line-height: 1; transform: translateY(2px); }
.pwa-install-actions { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.pwa-install-primary,
.pwa-install-later { min-height: 49px; padding: 0 18px; border-radius: 14px; font: inherit; font-size: 13px; font-weight: 800; }
.pwa-install-primary { border: 1px solid #06285a; color: #fff; background: #06285a; box-shadow: 0 10px 25px rgba(6, 40, 90, .2); }
.pwa-install-primary:disabled { opacity: .7; cursor: wait; }
.pwa-install-later { border: 1px solid #dce4ee; color: #52637c; background: #fff; }
.pwa-install-primary:focus-visible,
.pwa-install-later:focus-visible,
.pwa-install-close:focus-visible,
.footer-install-link:focus-visible { outline: 3px solid rgba(221, 166, 47, .55); outline-offset: 3px; }
.pwa-install-footnote { margin: 11px 0 0; color: #78889c; font-size: 10px; text-align: center; }

body.chat-theme-dark .pwa-install-card {
  border-color: rgba(148, 163, 184, .22);
  color: #f8fafc;
  background: radial-gradient(circle at 0 0, rgba(239, 198, 95, .12), transparent 35%), #151b22;
}
body.chat-theme-dark .pwa-install-heading h2 { color: #f8fafc; }
body.chat-theme-dark .pwa-install-description,
body.chat-theme-dark .pwa-android-guide p,
body.chat-theme-dark .pwa-ios-guide p { color: #cbd5e1; }
body.chat-theme-dark .pwa-install-benefits { color: #e2e8f0; }
body.chat-theme-dark .pwa-android-guide,
body.chat-theme-dark .pwa-ios-guide { border-color: rgba(148, 163, 184, .2); background: #111820; }
body.chat-theme-dark .pwa-ios-guide li { border-color: rgba(148, 163, 184, .16); }
body.chat-theme-dark .pwa-install-close,
body.chat-theme-dark .pwa-install-later { border-color: rgba(148, 163, 184, .25); color: #cbd5e1; background: #1b232e; }

@media (min-width: 681px) {
  .pwa-install-layer { align-items: center; }
}

@media (max-width: 390px) {
  .pwa-install-layer { padding: 9px; }
  .pwa-install-card { padding: 21px 16px 14px; border-radius: 23px; }
  .pwa-install-heading { gap: 12px; }
  .pwa-install-heading img { width: 60px; height: 60px; flex-basis: 60px; border-radius: 17px; }
  .pwa-install-heading h2 { font-size: 18px; }
  .pwa-install-description { margin-top: 14px; font-size: 13px; }
  .pwa-install-benefits { margin-bottom: 13px; font-size: 11px; }
  .pwa-android-guide, .pwa-ios-guide { margin-bottom: 13px; }
  .pwa-install-primary, .pwa-install-later { min-height: 45px; padding-inline: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-install-layer,
  .pwa-install-card { transition: none; }
}
