/* ЛИС-Мебель — карточка мессенджеров (Telegram + MAX).
   Все размеры заданы явно, чтобы внешние стили не могли их сломать. */

.lis-tgw{
  position:fixed;left:24px;bottom:24px;z-index:9990;
  font-family:'Inter','Segoe UI',system-ui,sans-serif;
}

/* ---------- круглая кнопка ---------- */
.lis-tgw__fab{
  width:56px;height:56px;min-width:56px;min-height:56px;padding:0;
  border-radius:50%;border:0;cursor:pointer;background:#29A9EB;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 20px rgba(41,169,235,.4);
  transition:transform .2s,background .2s;
}
.lis-tgw__fab:hover{transform:scale(1.06);background:#1E96D4}
.lis-tgw__fab svg{width:26px;height:26px;min-width:26px;fill:#fff;display:block}

/* ---------- карточка ---------- */
.lis-tgw__card{
  position:absolute;left:0;bottom:70px;
  width:340px;max-width:calc(100vw - 32px);
  padding:0;margin:0;
  background:#fff;border-radius:16px;
  box-shadow:0 18px 50px rgba(0,0,0,.22);
  overflow:hidden;
  animation:lis-tgw-in .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes lis-tgw-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ---------- шапка ---------- */
.lis-tgw__head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  background:#2A9FE0;padding:14px;margin:0;
}
.lis-tgw__brand{display:flex;align-items:center;gap:10px;min-width:0;overflow:hidden}
.lis-tgw__logo{
  width:46px;height:46px;min-width:46px;min-height:46px;
  border-radius:50%;background:#fff;overflow:hidden;flex:none;
  display:block;padding:0;margin:0;line-height:0;
}
.lis-tgw__logo img{
  width:46px;height:46px;min-width:46px;min-height:46px;
  max-width:46px;max-height:46px;
  object-fit:cover;display:block;border-radius:50%;
}
.lis-tgw__brand > div{min-width:0;overflow:hidden}
.lis-tgw__brand b{
  display:block;color:#fff;font-size:15px;font-weight:700;
  letter-spacing:.02em;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.lis-tgw__brand i{
  display:block;color:rgba(255,255,255,.82);font-size:11px;font-style:normal;
  margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.lis-tgw__x{
  flex:none;width:28px;height:28px;min-width:28px;padding:0;
  background:rgba(255,255,255,.2);border:0;border-radius:50%;
  color:#fff;font-size:18px;line-height:1;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
}
.lis-tgw__x:hover{background:rgba(255,255,255,.32)}

/* ---------- статус ---------- */
.lis-tgw__status{
  display:flex;align-items:center;gap:7px;
  padding:9px 14px;background:#F2F8FD;border-bottom:1px solid #E4EFF8;
  font-size:11px;color:#4A6B85;line-height:1.3;
}
.lis-tgw__status b{color:#2E9E5B;font-weight:600}
.lis-tgw__dot{width:7px;height:7px;min-width:7px;border-radius:50%;background:#2E9E5B;flex:none}
.lis-tgw__sep{color:#C3D6E5}

/* ---------- тело ---------- */
.lis-tgw__body{padding:14px;margin:0}

/* сообщение */
.lis-tgw__msg{display:flex;gap:8px;align-items:flex-end}
.lis-tgw__ava{
  width:32px;height:32px;min-width:32px;min-height:32px;
  border-radius:50%;overflow:hidden;flex:none;display:block;line-height:0;
}
.lis-tgw__ava img{
  width:32px;height:32px;min-width:32px;min-height:32px;
  max-width:32px;max-height:32px;object-fit:cover;display:block;border-radius:50%;
}
.lis-tgw__bubble{
  background:#F4F6F8;border-radius:12px 12px 12px 4px;
  padding:11px 13px;flex:1;min-width:0;
}
.lis-tgw__bubble p{margin:0 0 7px;font-size:13px;line-height:1.5;color:#2B2F33}
.lis-tgw__bubble p:last-of-type{margin-bottom:0}
.lis-tgw__meta{
  display:flex;justify-content:flex-end;align-items:center;gap:4px;
  font-size:10.5px;color:#8A949C;margin-top:6px;
}
.lis-tgw__check{color:#37AEE2;letter-spacing:-2px}

/* преимущества */
.lis-tgw__feats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:14px 0}
.lis-tgw__feat{text-align:center;min-width:0}
.lis-tgw__fi{
  width:44px;height:44px;min-width:44px;border-radius:50%;
  background:var(--c,#F2F4F6);color:var(--t,#555);
  display:flex;align-items:center;justify-content:center;
  font-size:17px;margin:0 auto 6px;
}
.lis-tgw__feat b{
  display:block;font-size:11px;font-weight:500;color:#3A4046;line-height:1.3;
}

/* ---------- кнопки ---------- */
.lis-tgw__btns{display:flex;flex-direction:column;gap:12px;margin:14px 0 0}
.lis-tgw__cta{
  display:flex;align-items:center;gap:9px;
  background:#29A9EB;color:#fff;text-decoration:none;
  border-radius:26px;padding:12px 16px;
  font-size:14px;font-weight:600;line-height:1.2;
  transition:background .2s;
}
.lis-tgw__cta:hover{background:#1E96D4}
.lis-tgw__cta--max{background:#6C4CE0}
.lis-tgw__cta--max:hover{background:#5B3ED0}
.lis-tgw__plane{
  width:30px;height:30px;min-width:30px;border-radius:50%;
  background:rgba(255,255,255,.22);
  display:flex;align-items:center;justify-content:center;flex:none;
}
.lis-tgw__plane svg{width:13px;height:13px;min-width:13px;fill:#fff;display:block}
.lis-tgw__cta-t{flex:1;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lis-tgw__arrow{font-size:18px;opacity:.8;line-height:1;flex:none}

/* ссылка и подпись */
.lis-tgw__link{
  display:block;text-align:center;margin:10px 0 0;
  font-size:12px;color:#2A9FE0;text-decoration:none;font-weight:500;
}
.lis-tgw__link:hover{text-decoration:underline}
.lis-tgw__note{text-align:center;margin:8px 0 2px;font-size:11px;color:#98A2AA}

/* ---------- мобильный ---------- */
@media(max-width:940px){
  .lis-tgw{left:16px;bottom:96px}
  .lis-tgw__card{bottom:66px;width:min(340px, calc(100vw - 32px));
    max-height:calc(100vh - 190px);overflow-y:auto;overflow-x:hidden;
    -webkit-overflow-scrolling:touch}
  .lis-tgw__fab{width:52px;height:52px;min-width:52px;min-height:52px}
  .lis-tgw__fab svg{width:24px;height:24px;min-width:24px}
}



/* ============================================================
   ВЕРСИЯ ДЛЯ ПК: полная карточка, ничего не обрезается
   ============================================================ */
@media(min-width:941px){
  .lis-tgw__card{width:372px}
  .lis-tgw__body{padding:16px}
  .lis-tgw__bubble p{font-size:13.5px}
  .lis-tgw__feats{margin:16px 0}
  .lis-tgw__btns{gap:12px;margin-top:16px}
  .lis-tgw__cta{padding:13px 16px;font-size:14px}
  /* пока висит cookie — поднимаем, но высоту НЕ режем */
  body.lis-cookie-open .lis-tgw{bottom:96px}
}

/* ============================================================
   ВЕРСИЯ ДЛЯ ТЕЛЕФОНА: компактная, влезает в экран
   ============================================================ */
@media(max-width:940px){
  .lis-tgw{left:16px;bottom:96px}
  .lis-tgw__card{bottom:66px;width:min(340px, calc(100vw - 32px))}
  .lis-tgw__fab{width:52px;height:52px;min-width:52px;min-height:52px}
  .lis-tgw__fab svg{width:24px;height:24px;min-width:24px}
  /* компактнее содержимое */
  .lis-tgw__body{padding:12px}
  .lis-tgw__bubble p{font-size:12.5px;line-height:1.45;margin-bottom:6px}
  .lis-tgw__feats{margin:10px 0;gap:4px}
  .lis-tgw__fi{width:38px;height:38px;min-width:38px;font-size:15px;margin-bottom:4px}
  .lis-tgw__feat b{font-size:10px}
  .lis-tgw__btns{gap:9px;margin-top:10px}
  .lis-tgw__cta{padding:11px 14px;font-size:13px}
  .lis-tgw__link{margin-top:8px;font-size:11px}
  .lis-tgw__note{margin-top:6px;font-size:10px}
  /* пока висит cookie — поднимаем и подрезаем высоту */
  body.lis-cookie-open .lis-tgw{bottom:270px}
  body.lis-cookie-open .lis-tgw__card{max-height:calc(100vh - 400px);overflow-y:auto}
  body.lis-cookie-open .lis-tgw__feats,
  body.lis-cookie-open .lis-tgw__note{display:none}
}
