/* Floating "Install app" button + its instruction sheet (site-wide widget). */
.pwa-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: #0f1a30;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  display: block;
  animation: pwaFabIn 0.3s ease;
}
@keyframes pwaFabIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
.pwa-fab:active { transform: scale(0.95); }
.pwa-fab.is-pending { visibility: hidden; }
/* Docked inside the fixed bottom nav: moves with it (iOS overscroll, sticky cart). */
/* One gap everywhere: 10px between the menu, the «Бонусный час» strip, the chat button and this one (= the nav's top padding). */
.pwa-fab.pwa-fab--docked { position: absolute; right: 16px; bottom: 100%; pointer-events: auto; transition: bottom 0.2s ease; }
.bottom-nav > .support-fab ~ .pwa-fab--docked { bottom: calc(100% + 58px); } /* 48px chat button + 10px */
body:has(.sticky-buy.is-visible) .bottom-nav > .support-fab ~ .pwa-fab--docked { bottom: calc(100% + 140px); } /* 82 + 48 + 10 */
.db-bottom-nav > .pwa-fab--docked { right: 14px; bottom: 100%; } /* items start 10px below the nav's top: same 10px gap */
@media (max-width: 360px) { .db-bottom-nav > .pwa-fab--docked { right: 8px; } }
/* Database «Утилиты»/«Материалы» sheet covers it (the menu is lifted above the sheet). */
.db-bottom-nav > .pwa-fab--docked { transition: bottom 0.2s ease, opacity 0.2s ease, visibility 0.2s ease; }
body.db-tools-open .db-bottom-nav > .pwa-fab--docked { opacity: 0; visibility: hidden; pointer-events: none; }
.pwa-fab .pwa-fab-icon { width: 100%; height: 100%; display: block; border-radius: 15px; object-fit: cover; }
.pwa-fab .pwa-fab-plus {
  position: absolute;
  /* top-left corner: circle centre sits on the rounded edge (radius 16, 1px border) */
  left: -3px;
  top: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #46a6ff, #6f7cff);
  box-shadow: 0 0 0 1.5px #0f1a30;
}
.pwa-fab .pwa-fab-plus svg { width: 8px; height: 8px; display: block; }

body.pwa-fab-open { overflow: hidden; }
.pwa-fab-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: rgba(4, 8, 18, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: pwaFabFade 0.18s ease;
}
.pwa-fab-overlay[hidden] { display: none; }
@keyframes pwaFabFade { from { opacity: 0; } to { opacity: 1; } }
.pwa-fab-sheet {
  width: 100%;
  max-width: 440px;
  background: #0f1a30;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  color: #c6d2e6;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  animation: pwaFabUp 0.22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes pwaFabUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 560px) { .pwa-fab-overlay { align-items: center; } }
.pwa-fab-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.pwa-fab-head-t { flex: 1 1 auto; min-width: 0; }
.pwa-fab-head h3 { margin: 0; min-height: 42px; display: flex; align-items: center; font-size: 17px; font-weight: 800; line-height: 1.25; color: #fff; }
.pwa-fab-head p { margin: 2px 0 0; font-size: 13px; line-height: 1.45; color: #8fa3c7; }
.pwa-fab-logo { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; display: block; object-fit: cover; }
.pwa-fab-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  color: #8fa3c7;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.pwa-fab-close:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.pwa-fab-tabs { display: flex; gap: 6px; padding: 4px; background: rgba(0, 0, 0, 0.25); border-radius: 14px; margin-bottom: 18px; }
.pwa-fab-tabs.is-single { display: none; }
.pwa-fab-tab { flex: 1 1 0; height: 40px; border: 0; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 800; color: #8fa3c7; background: transparent; }
.pwa-fab-tab.is-active { color: #fff; background: rgba(0, 136, 204, 0.28); box-shadow: inset 0 0 0 1px rgba(0, 136, 204, 0.4); }
.pwa-fab-steps { list-style: none; margin: 0; padding: 0; }
.pwa-fab-steps li { position: relative; display: flex; align-items: center; gap: 14px; padding-bottom: 14px; font-size: 14px; line-height: 1.5; color: #c6d2e6; }
.pwa-fab-steps li:last-child { padding-bottom: 0; }
/* vertical connector from one icon tile to the next */
.pwa-fab-steps li::before { content: ""; position: absolute; left: 20.5px; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, 0.12); }
.pwa-fab-steps li:first-child::before { top: calc(50% - 7px); }
.pwa-fab-steps li:last-child::before { bottom: 50%; }
.pwa-fab-steps li:only-child::before { display: none; }
.pwa-fab-step-ic { flex: 0 0 auto; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; border-radius: 13px; color: #46a6ff; background: #172238; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.pwa-fab-step-ic svg { display: block; }
.pwa-fab-step-logo { width: 26px; height: 26px; border-radius: 7px; display: block; object-fit: cover; }
.pwa-fab-step-t { min-width: 0; }
.pwa-fab-steps b { color: #fff; font-weight: 800; }
.pwa-fab-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 12px; line-height: 1.5; color: #8fa3c7; }
