/* Плашка «Додати WizFinder на екран» (assets/js/pwa.js). Только телефоны:
   на десктопе JS её не создаёт. z-index ниже панели сравнения (99999) и её
   модалки — плашка уступает им, а не перекрывает.

   Раскладка — сетка в две строки: иконка + текст сверху, кнопка «Встановити»
   на всю ширину снизу. В один ряд на экране 360px тексту оставалось ~100px,
   и заголовок с описанием ломались на 6–7 строк. */
.wf-pwa {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 99990;
  box-sizing: border-box;
  max-width: 440px;
  /* margin-bottom — отступ от «домашней» полоски iPhone; bottom ставит JS. */
  margin: 0 auto env(safe-area-inset-bottom, 0px);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e2e9e4;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(11, 93, 70, .18);
  color: #16261f;
  font-size: 14px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .25s ease, transform .25s ease, bottom .2s ease;
}

.wf-pwa.is-open {
  opacity: 1;
  transform: none;
}

.wf-pwa__icon {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #e2e9e4;
  box-sizing: border-box;
}

.wf-pwa__body {
  min-width: 0;
  /* место под крестик в правом верхнем углу */
  padding-right: 26px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wf-pwa__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.wf-pwa__text {
  color: #4b5a53;
}

/* Селекторы с .wf-pwa — чтобы глобальные стили кнопок темы (паддинги,
   скругление «таблеткой», регистр) не перебивали плашку. */
.wf-pwa .wf-pwa__install {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: #00c777;
  box-shadow: none;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}

.wf-pwa .wf-pwa__install:active {
  background: #00b36b;
}

.wf-pwa .wf-pwa__close {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  box-shadow: none;
  color: #8a9a93;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .wf-pwa {
    transition: none;
  }
}
