/* PWA install prompt and mobile sticky navigation. */
.mobile-sticky-nav,.pwa-install-sheet,.pwa-toast{display:none}

@media (max-width:860px){
  body{padding-bottom:calc(82px + env(safe-area-inset-bottom))!important}
  .site-footer{margin-bottom:0!important}

  .mobile-sticky-nav{
    position:fixed;right:9px;bottom:calc(7px + env(safe-area-inset-bottom));left:9px;z-index:1200;
    display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch;
    min-height:68px;padding:6px;border:1px solid rgba(219,223,237,.96);border-radius:22px;
    background:rgba(255,255,255,.96);box-shadow:0 18px 48px rgba(23,32,51,.22);
    -webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)
  }
  .mobile-sticky-nav a,.mobile-sticky-nav button{
    position:relative;appearance:none;-webkit-appearance:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
    min-width:0;min-height:56px;margin:0;padding:4px 2px;border:0!important;border-radius:16px!important;
    background:transparent!important;box-shadow:none!important;color:#697286!important;font:700 10px/1.3 "VazirFD",Tahoma,Arial,sans-serif!important;
    text-decoration:none;transform:none!important;filter:none!important
  }
  .mobile-sticky-nav svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  .mobile-sticky-nav a.is-active{background:#eeecff!important;color:#5b4bdb!important}
  .mobile-sticky-nav button.pwa-install-trigger{
    overflow:visible;background:linear-gradient(135deg,#6d5df0,#5141ce)!important;color:#fff!important;
    box-shadow:0 9px 20px rgba(91,75,219,.32)!important
  }
  .mobile-sticky-nav button.pwa-install-trigger svg{width:23px;height:23px;animation:pwa-install-arrow 1.8s ease-in-out infinite}
  .mobile-sticky-nav button.pwa-install-trigger .install-dot{
    position:absolute;top:-5px;right:-3px;display:grid;place-items:center;min-width:30px;height:17px;padding:0 5px;
    border:2px solid #fff;border-radius:999px;background:#13a777;color:#fff;font-size:8px;font-weight:900;line-height:1
  }

  .pwa-install-sheet{
    position:fixed;inset:0;z-index:1600;display:flex;align-items:flex-end;justify-content:center;padding:14px;
    background:rgba(9,14,28,.68);opacity:0;visibility:hidden;transition:opacity .24s ease,visibility .24s ease;
    -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)
  }
  .pwa-install-sheet.is-open{opacity:1;visibility:visible}
  .pwa-install-card{
    position:relative;overflow:hidden;width:min(540px,100%);padding:22px 18px calc(18px + env(safe-area-inset-bottom));
    border:1px solid rgba(255,255,255,.9);border-radius:28px 28px 24px 24px;background:#fff;
    box-shadow:0 30px 90px rgba(4,9,22,.5);transform:translateY(30px) scale(.98);
    transition:transform .28s cubic-bezier(.2,.8,.2,1)
  }
  .pwa-install-card::before{
    content:"";position:absolute;top:0;right:0;left:0;height:7px;
    background:linear-gradient(90deg,#8a7cff,#5b4bdb,#13a777)
  }
  .pwa-install-sheet.is-open .pwa-install-card{transform:none}
  .pwa-install-kicker{
    display:inline-flex;align-items:center;gap:6px;margin:0 0 13px;padding:5px 10px;border-radius:999px;
    background:#eeecff;color:#5141ce;font-size:10px;font-weight:900
  }
  .pwa-install-kicker::before{content:"";width:7px;height:7px;border-radius:50%;background:#13a777;box-shadow:0 0 0 4px rgba(19,167,119,.13)}
  .pwa-install-head{display:flex;align-items:center;gap:13px}
  .pwa-install-head img{width:64px;height:64px;border:1px solid #e6e8f2;border-radius:19px;box-shadow:0 10px 25px rgba(31,39,66,.13)}
  .pwa-install-copy{min-width:0;flex:1}
  .pwa-install-head strong{display:block;color:#11182a;font-size:18px;line-height:1.55}
  .pwa-install-head span{display:block;margin-top:3px;color:#667085;font-size:12px;line-height:1.75}
  .pwa-sheet-close{
    flex:0 0 auto;width:39px!important;height:39px!important;min-height:39px!important;padding:0!important;
    border:1px solid #e4e7f0!important;border-radius:13px!important;background:#f7f8fc!important;color:#172033!important;
    box-shadow:none!important;font-size:25px!important;line-height:1!important
  }
  .pwa-install-benefits{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:18px 0 0;padding:0;list-style:none
  }
  .pwa-install-benefits li{
    display:flex;align-items:center;justify-content:center;gap:5px;min-height:42px;padding:7px 5px;border:1px solid #ebeef5;
    border-radius:13px;background:#fbfcff;color:#465066;font-size:10px;font-weight:800;text-align:center
  }
  .pwa-install-benefits svg{width:16px;height:16px;fill:none;stroke:#5b4bdb;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  .pwa-install-instructions{
    display:flex;flex-direction:column;gap:7px;margin:14px 0 0;padding:14px 15px;border:1px solid #e8e9f8;border-radius:17px;
    background:linear-gradient(135deg,#f8f7ff,#f5fbff);color:#4c566c;font-size:12px;line-height:1.85
  }
  .pwa-install-instructions strong{color:#202842;font-size:13px}
  .pwa-install-instructions span{display:block}
  .pwa-install-instructions b{display:inline-grid;place-items:center;width:20px;height:20px;margin-left:4px;border-radius:7px;background:#5b4bdb;color:#fff;font-size:10px}
  .pwa-install-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;margin-top:14px}
  .pwa-native-install{
    width:100%;min-height:50px!important;margin:0!important;border:0!important;border-radius:15px!important;
    background:linear-gradient(135deg,#6d5df0,#5141ce)!important;color:#fff!important;font-weight:900!important;
    box-shadow:0 12px 27px rgba(91,75,219,.3)!important
  }
  .pwa-install-sheet.has-native-prompt .pwa-native-install{animation:pwa-primary-pulse 2s ease-in-out infinite}
  .pwa-install-later{
    min-width:78px;min-height:50px;padding:0 13px;border:1px solid #e2e5ed;border-radius:15px;background:#f8f9fc;
    color:#667085;font-family:inherit;font-size:12px;font-weight:800
  }

  .pwa-toast{
    position:fixed;right:18px;bottom:calc(94px + env(safe-area-inset-bottom));left:18px;z-index:1700;display:block;
    padding:12px 15px;border-radius:14px;background:#172033;color:#fff;font-size:13px;text-align:center;
    opacity:0;visibility:hidden;transform:translateY(10px);transition:.2s ease;box-shadow:0 12px 34px rgba(8,13,26,.28)
  }
  .pwa-toast.is-visible{opacity:1;visibility:visible;transform:none}
}

@keyframes pwa-install-arrow{0%,100%{transform:translateY(0)}50%{transform:translateY(3px)}}
@keyframes pwa-primary-pulse{0%,100%{box-shadow:0 12px 27px rgba(91,75,219,.3)}50%{box-shadow:0 14px 34px rgba(91,75,219,.48)}}

@media (display-mode:standalone){
  .pwa-install-trigger{display:none!important}
  .mobile-sticky-nav{grid-template-columns:repeat(4,minmax(0,1fr))}
}

@media (max-width:390px){
  .mobile-sticky-nav{right:5px;left:5px;bottom:calc(5px + env(safe-area-inset-bottom));padding:5px;border-radius:19px}
  .mobile-sticky-nav a,.mobile-sticky-nav button{font-size:9px!important}
  .pwa-install-card{padding-right:14px;padding-left:14px}
  .pwa-install-head img{width:57px;height:57px}
  .pwa-install-head strong{font-size:16px}
  .pwa-install-benefits li{font-size:9px}
}

@media (min-width:861px){
  .pwa-install-sheet,.pwa-toast{display:none!important}
}

@media (prefers-reduced-motion:reduce){
  .pwa-install-card,.pwa-install-sheet,.pwa-toast,.pwa-install-trigger svg,.pwa-native-install{animation:none!important;transition:none!important}
}
