/* ==========================================================================
   FAB «Умный подбор» — изолированный слой (префикс .spf-), паттерн .pv-fab
   («Подвоз»). Цвета — только через существующие CSS-переменные (light/dark
   автоматически). Видимость по табам/фильтрам — здесь, по body-классам.
   Спека: docs/superpowers/specs/2026-07-16-smart-pick-entry-fab-design.md
   ========================================================================== */
.spf-fab {
  position: fixed;
  left: 14px;
  /* Слот прямо НАД FAB «Подвоза» (его bottom +58px, высота 44px, зазор 8px → +110px).
     Формула-конвенция карт-контролов: клирит таб-бар и пик «Ближайших». */
  bottom: var(--spf-fab-bottom, calc(env(safe-area-inset-bottom, 0px) + var(--tabbar-h, 62px) + var(--peek-h, 48px) + 110px));
  z-index: 900;                      /* как прочие карт-FAB: над картой, ниже шторок (.smartpick = 1700) */
  display: none;                     /* включается классом .spf-show из JS */
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 15px 0 13px;
  border-radius: var(--r-pill, 999px);
  border: 1px solid var(--accent-line, rgba(34,197,94,.45));
  background: color-mix(in srgb, var(--accent, #22c55e) 12%, var(--surface, #141a20));
  color: var(--accent, #22c55e);
  font: 700 14px/1 var(--font);
  cursor: pointer;
  box-shadow: 0 10px 26px -10px rgba(0,0,0,.55);
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, box-shadow .15s ease, width .2s ease, padding .2s ease;
}
.spf-fab.spf-show { display: inline-flex; }
.spf-fab:hover { box-shadow: 0 12px 30px -10px rgba(0,0,0,.6); }
.spf-fab:active { transform: scale(.97); }
.spf-ico { display: block; flex: none; width: 18px; height: 18px; }
/* Свёрнутое состояние — круг с иконкой (авто через 3с; тап разворачивает и открывает). */
.spf-fab--mini { width: 44px; padding: 0; gap: 0; justify-content: center; }
.spf-fab--mini .spf-txt { display: none; }
/* Прячем: вне таба карты и при открытой панели фильтров ⚙ (как «Подвоз»). */
body:not(.tab-map) .spf-fab.spf-show { display: none; }
body.gz-filters-open .spf-fab.spf-show { display: none; }
@media (prefers-reduced-motion: reduce) { .spf-fab { transition: none; } }
/* ПК (≥1000px): базовый left/bottom попадает внутрь сайдбара — переносим в тот же
   десктоп-слот, что и «Подвоз» (справа от сайдбара), и ставим НАД ним (+52px = высота 44px + зазор 8px). */
@media (min-width: 1000px) {
  .spf-fab {
    left: calc(var(--side-w, 0px) + 18px);
    bottom: calc(var(--pv-fab-bottom-desktop, 22px) + 52px);
  }
}
