/* ===============================
   ROOT / PANEL
================================ */
.lc.lc--embed{
  position: relative;
  width: 100%;
  height: 100%;
  color: #111;
  -webkit-text-size-adjust: 100%;
}

#lcBody{
  overflow-y: auto;
  overflow-x: hidden;
  touch-action: pan-y;
}
#lcBody button,
#lcBody a,
#lcBody .lc__card,
#lcBody .lc__choiceBtn{
  touch-action: pan-y;
}


.lc *{ box-sizing: border-box; }

.lc__panel{
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
}

/* ===============================
   SCROLL AREA + HEADER SPACE
================================ */
.lc__body{
  position: relative;
    padding: 72px 16px 50px 16px;
    background: #e9e9e9;
}

/* ===============================
   HEADER
================================ */
.lc__header{
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 72px;
  z-index: 200;
  background: #2b2a28;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  
}

.lc__headLeft{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.lc__avatar{
  width: 44px;
  height: 44px;
  overflow: hidden;
  position: relative;
  flex: 0 0 auto;
}

.lc__avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

.lc__online{
  position:absolute;
  right: 2px;
  bottom: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,.06);
}

.lc__title{ min-width: 0; }

.lc__name{
  font-family: 'Medium';
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    color: #fafafa;
    text-overflow: ellipsis;
}

.lc__role{
  margin-top: 3px;
    font-size: 13px;
    color: #fafafa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc__headBtn{
display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    background: #41a0da;
    color: #fff;
    text-decoration: none;
    border: 0;
    white-space: nowrap;
    flex: 0 0 auto;
}
.lc__headBtn:hover{ filter: brightness(0.98); }

/* ===============================
   MESSAGES WRAP
================================ */
.lc__messages{
  padding: 18px 16px 20px;
  max-width: 980px;      /* чтобы красиво смотрелось на широких */
  margin: 0 auto;
}

/* ===============================
   MESSAGE
================================ */
.lc__msg{
  display:flex;
  margin: 14px 0;
  max-width: 100%;
}

.lc__msg--me{ justify-content:flex-end; }

.lc__bubble{
  max-width: 92%;
    background: #fff;
    border-radius: 0px 18px 18px 18px;
    padding: 16px 16px;
    box-shadow: 0px 3px 10px rgba(38, 36, 60, 0.07);
    font-size: 16px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.lc__msg--me .lc__bubble{
  background: #111827;
  color: #fff;
  border-radius: 16px 0px 16px 16px;
  padding: 12px 16px;
  box-shadow: 0px 3px 10px rgba(38, 36, 60, 0.07);
  max-width: min(78%, 360px); /* на мобилке не распирает */
}

.lc__meta{
  margin-top: 10px;
  font-size: 12px;
  opacity: .55;
}

/* typing */
.lc__typing{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-size: 13px;
  color: rgba(17,17,17,.6);
}
.lc__dots{ display:inline-flex; gap: 4px; }
.lc__dot{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(17,17,17,.55);
  animation: lc-bounce 1s infinite ease-in-out;
}
.lc__dot:nth-child(2){ animation-delay: .12s; }
.lc__dot:nth-child(3){ animation-delay: .24s; }
@keyframes lc-bounce{
  0%,80%,100%{ transform: translateY(0); opacity:.35; }
  40%{ transform: translateY(-4px); opacity:.9; }
}

/* ===============================
   CARDS GRID (AUTO MODELS)
   ✅ ПРАВКА: 3 / 2 / 1
================================ */
.lc__cards{
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* ✅ на больших 3 */
  gap: 14px;
}

/* чтобы карточки точно не вылазили */
.lc__card, .lc__card *{ max-width: 100%; }

.lc__card{
  position: relative;
  border: 2px solid transparent;
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  cursor: pointer;
  text-align: left;
  border: 1px solid #e9e9e9;
  transition: transform .08s ease, box-shadow .08s ease, border-color .08s ease;
  min-width: 0;
}

/* ✅ ПРАВКА: убираем любые “левые” отступы внутри карточки */
.lc__card img{ display:block; margin:0; padding:0; }

.lc__card:hover{
  transform: translateY(-1px);
  box-shadow: 0px 3px 10px rgba(38, 36, 60, 0.07);
}

/* ✅ ПРАВКА: квадратная область изображения + без лишних отступов */
.lc__cardImgWrap{
  width: 100%;
  aspect-ratio: 1 / 1;          /* ✅ квадрат */
  overflow: hidden;
  background: #f1f5f9;
  display:flex;
  align-items:center;
  justify-content:center;
  margin: 0;                    /* ✅ убрали внешние отступы */
  padding: 0;                   /* ✅ убрали внутренние отступы */
}

.lc__cardImgWrap img,
.lc__cardImg{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  margin: 0;                    /* ✅ на всякий случай */
  padding: 0;                   /* ✅ на всякий случай */
}

/* ✅ ПРАВКА: убираем "непонятные" отступы текста */
.lc__cardText{
  margin-top: 0;                /* ✅ было 12px */
  padding-top: 10px;            /* ✅ управляемый отступ вместо “магии” */
  min-width: 0;
}

.lc__cardTitle{
  font-weight: 900;
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  margin: 0;                    /* ✅ убрали margin */
  padding: 0;
}

.lc__cardSub{
  margin-top: 6px;              /* ✅ вместо 8px (контролируемо) */
  font-size: 15px;
  color: rgba(17,17,17,.65);
  font-weight: 700;
  overflow-wrap: anywhere;
  margin-bottom: 0;             /* ✅ */
  padding: 0;
}

.lc__card.is-selected{
  border-color: #ef4444;
  box-shadow: 0px 3px 10px rgba(239,68,68,.12);
}

.lc__card.is-selected::after{
  content: "✓";
  position: absolute;
  top: -12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(239,68,68,.25);
}

/* ===============================
   CHOICES (purchase / bonus)
================================ */
.lc__choices{
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.lc__choiceBtn{
  width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 14px 14px 14px 46px;
  text-align: left;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: #111;
  border: 1px solid #e9e9e9;
  position: relative;
  overflow-wrap: anywhere;
}

.lc__choiceBtn::before{
  content:"";
  position:absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(17,17,17,.25);
  background: #fff;
}

.lc__choiceBtn.is-selected::before{
  border-color: #ef4444;
  box-shadow: inset 0 0 0 5px #ef4444;
}

/* ===============================
   FINAL FORM
================================ */
.lc__final{
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.lc__label{
  font-size: 14px;
  font-weight: 800;
  color: rgba(17,17,17,.75);
  display: grid;
  gap: 8px;
}

.lc__field{
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 16px 18px;
  font-size: 16px;
  outline: none;
  background: #fff;
  border: 1px solid #e9e9e9;
}

.lc__field:focus{
  box-shadow: 0px 3px 10px rgba(38, 36, 60, 0.07);
}

.lc__consent{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  font-size: 14px;
  color: rgba(17,17,17,.70);
  line-height: 1.35;
}

.lc__consent input{
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: #ef4444;
  flex: 0 0 auto;
}

.lc__cta{
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 16px 18px;
  background: #ef4444;
  color: #fff;
  font-weight: 900;
  font-size: 16px;
}
.lc__cta:hover{ filter: brightness(0.98); }

.lc__inlineRow{
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.lc__miniBtn{
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 14px 16px;
  background: #111827;
  color:#fff;
  font-weight: 900;
  font-size: 15px;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
}

/* composer hidden */
.lc__composer{ display:none; }

/* fineprint */
.lc__fineprint{
    padding: 20px 16px;
    background: #2b2a28;
}

/* ===============================
   MOBILE ADAPTIVE
================================ */

/* ✅ ПРАВКА: при сужении — 2 колонки */
@media (max-width: 860px){
  .lc__cards{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* <= 480px: компактнее шапка, меньше паддинги, карточки не распирают */
@media (max-width: 480px){
  .lc__body{ padding-top: 64px; }

  .lc__header{
    height: 64px;
    padding: 10px 12px;
    gap: 10px;
  }

  .lc__avatar{ width: 40px; height: 40px; }
  .lc__name{ font-size: 15px; }
  .lc__role{ font-size: 12px; }

  .lc__headBtn{
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: 10px;
  }

  .lc__messages{ padding: 14px 12px 18px; }

  .lc__bubble{
    font-size: 15px;
    padding: 14px 14px;
    border-radius: 16px;
  }

  .lc__msg--me .lc__bubble{
    max-width: 86%;
    padding: 11px 14px;
    border-radius: 14px;
  }

  .lc__cards{
    gap: 10px;
  }

  .lc__card{
    padding: 12px;
    border-radius: 16px;
  }

  .lc__cardTitle{ font-size: 16px; }
  .lc__cardSub{ font-size: 14px; }

  .lc__choiceBtn{
    font-size: 15px;
    padding: 12px 12px 12px 44px;
    border-radius: 14px;
  }

  .lc__field{
    padding: 14px 16px;
    font-size: 16px;
  }

  .lc__cta{
    padding: 14px 16px;
    font-size: 16px;
  }
}

/* ✅ ПРАВКА: на очень мелких — 1 колонка */
@media (max-width: 360px){
  .lc__cards{
    grid-template-columns: 1fr;
  }
  .lc__cardTitle{ font-size: 16px; }
  .lc__cardSub{ font-size: 14px; }
}

/* Нижняя панель с кнопкой Telegram */
.lc__tgbar{
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Кнопка Telegram */
.lc__tgbtn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #229ED9;    /* Telegram blue */
  color: #fff;
  text-decoration: none;

  padding: 14px 18px;
  border-radius: 14px;
  line-height: 1;

  width: 100%;
  max-width: 520px;       /* можно любую, я сделал аккуратно */
  text-align: center;
}

/* Ховер */
.lc__tgbtn:hover{
  filter: brightness(0.97);
}

/* Мобилка: кнопка всё равно 100% */
@media (max-width: 480px){
  .lc__tgbtn{
    max-width: 100%;
  }
}


