/* === POPUP.CSS ===
   assets/css/popup.css
   НАЗНАЧЕНИЕ: поп-ап с оффером. На телефоне - лист снизу, на десктопе - карточка в
   правом нижнем углу. Без затемнения страницы: человек продолжает читать, окно не
   мешает. Палитра и шрифт из landing.css
   СВЯЗИ: index.php (#offer), popup.js
   РАЗМЕР: ~130 строк */

.offer {
  position: fixed;
  inset: auto 0 0 0;
  width: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -14px 44px rgba(0, 0, 0, .45);
  /* выше прилипшей кнопки (70): у листа своя кнопка, дублировать нечего */
  z-index: 75;
}

.offer:not([open]) { display: none; }

.offer[open] { animation: offer-up .34s var(--ease); }

@keyframes offer-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ручка листа: подсказка, что это выезжающая панель */
.offer__grip {
  display: block;
  width: 38px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 2px;
  background: var(--line);
}

.offer__x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.offer__x:hover { color: var(--text); background: var(--bg-2); }

.offer h3 {
  padding-right: 28px;
  font-size: 18.5px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 8px;
}

.offer p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
  margin-bottom: 14px;
}

/* главная кнопка - WhatsApp: туда же, куда потом идет бриф */
.offer__wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: #25d366;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  transition: transform .12s var(--ease), background .18s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.offer__wa:active { transform: scale(.985); }
.offer__wa:hover { background: #1fbf5b; }

.offer__row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.offer__alt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 10px 8px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .16s var(--ease), background .16s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.offer__alt:hover { border-color: var(--accent); background: var(--bg-2); }
.offer__alt svg { color: #229ed9; flex: none; }

@media (min-width: 720px) {
  .offer {
    inset: auto 24px 24px auto;
    width: 380px;
    padding: 22px 22px 20px;
    border-bottom: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  }
  .offer__grip { display: none; }
  @keyframes offer-up {
    from { transform: translateY(18px); opacity: 0; }
    to   { transform: none; opacity: 1; }
  }
}
