/* The app launch pop-up on public pages: a card in the corner on a computer, a sheet along the
   bottom on a phone. It never covers the page behind it, so the visitor can keep reading. */
.app-popup{
  --app-popup-duration:10000ms;
  position:fixed;right:24px;bottom:24px;z-index:110;
  width:min(380px,calc(100vw - 48px));
  padding:26px 24px 24px;
  background:var(--ink);color:#fff;
  border-radius:var(--r-lg);
  box-shadow:0 24px 60px rgba(43,29,27,.35);
  overflow:hidden;
  opacity:0;transform:translateY(24px) scale(.98);
  transition:opacity .32s ease,transform .32s cubic-bezier(.2,.8,.2,1);
}
.app-popup[hidden]{display:none}
.app-popup.is-open{opacity:1;transform:none}

.app-popup__close{
  position:absolute;top:10px;right:10px;
  width:44px;height:44px;display:grid;place-items:center;
  background:none;border:0;border-radius:999px;color:#fff;opacity:.75;cursor:pointer;
  transition:opacity .15s,background-color .15s;
}
.app-popup__close:hover{opacity:1;background:rgba(255,255,255,.1)}
.app-popup__close:focus-visible{opacity:1;outline:2px solid var(--coral);outline-offset:2px}
.app-popup__close svg{width:20px;height:20px}

.app-popup__icon{display:block;width:52px;height:52px;border-radius:13px;margin-bottom:16px}
.app-popup__title{
  margin:0 40px 10px 0;
  font-family:var(--serif);font-weight:600;font-size:1.5rem;line-height:1.2;color:#fff;
}
.app-popup__text{margin:0 0 20px;font-size:.98rem;line-height:1.5;color:var(--peach-100)}

.app-popup__stores{display:flex;flex-wrap:wrap;gap:10px}
.app-popup__stores .store{background:rgba(255,255,255,.12)}
.app-popup__stores .store:hover{background:rgba(255,255,255,.18)}
.app-popup__stores .store:focus-visible{outline:2px solid var(--coral);outline-offset:2px}

/* Shrinks over the time left on screen and stops while the visitor is reading. */
.app-popup__timer{
  position:absolute;left:0;bottom:0;height:3px;width:100%;
  background:var(--coral);transform-origin:left center;transform:scaleX(1);
}
.app-popup.is-open .app-popup__timer{animation:app-popup-countdown var(--app-popup-duration) linear forwards}
.app-popup.is-paused .app-popup__timer{animation-play-state:paused}
@keyframes app-popup-countdown{to{transform:scaleX(0)}}

@media (max-width:600px){
  .app-popup{
    left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));
    width:auto;padding:22px 20px 20px;
  }
  .app-popup__icon{width:44px;height:44px;border-radius:11px;margin-bottom:12px}
  .app-popup__title{font-size:1.3rem}
  .app-popup__text{margin-bottom:16px;font-size:.94rem}
  .app-popup__stores{flex-direction:column;align-items:stretch}
  .app-popup__stores .store{flex:none;justify-content:center}
}

@media (prefers-reduced-motion:reduce){
  .app-popup{transform:none;transition:opacity .2s linear}
  .app-popup__timer{display:none}
}
