/* ===== Telegram windows (light) ===== */

.tg-phones{
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 22px;
  align-items: start;
}

@media (max-width: 980px){
  .tg-phones{ grid-template-columns: 1fr; }
}

.tg-phone{
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.tg-topbar{
  display:flex;
  justify-content: space-between;
  padding: 10px 14px;
  font-weight: 600;
  color:#111827;
  font-size: 13px;
}

.tg-chathead{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 14px 12px;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
}

.tg-back{ color:#2a7de1; font-weight:700; }

.tg-ava{
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,.06);
}

.tg-title .tg-name{ color:#2a7de1; font-weight:800; font-size:14px; line-height:1.1; }
.tg-title .tg-city{ color:#8e8e93; font-size:12px; margin-top:2px; }

.tg-wall{
  background: #eaf2fb;
  padding: 14px;
  min-height: 360px;
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.tg-msg{
  background:#fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}

.tg-msg-name{
  color:#2a7de1;
  font-weight:800;
  font-size:14px;
  margin-bottom: 6px;
}

.tg-msg-text{
  color:#111827;
  font-size:14px;
  line-height:1.55;
  white-space: pre-line;
}

.tg-msg-foot{
  margin-top: 10px;
  display:flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color:#9aa0a6;
}

.tg-open{
  margin-top: auto;
  background:#fff;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 10px 12px;
  color:#2a7de1;
  font-weight:800;
  text-decoration:none;
  text-align:center;
}
.tg-open:hover{ text-decoration: underline; }

.tg-input{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 12px 14px;
  background:#f7f9fc;
  border-top: 1px solid #eef2f7;
}

.tg-placeholder{
  flex:1;
  background:#fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 10px 12px;
  color:#9aa0a6;
  font-size: 13px;
}

.tg-clip{ opacity:.7; }
.tg-send{ color:#2a7de1; font-weight:900; }

/* 1) фикс высота окна (как у первого) */
.tg-phone{
  height: 900px;            /* можешь менять: 620 / 640 / 680 */
  display: flex;
  flex-direction: column;
}

/* 2) чтобы "стена" занимала всё доступное место */
.tg-wall{
  flex: 1;
  min-height: 0;            /* важно для корректного скролла */
  overflow: hidden;         /* скролл будет внутри текста */
}

/* 3) делаем сообщение "сжимаемым", чтобы текст мог скроллиться */
.tg-msg{
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* 4) фиксируем высоту текстового блока и включаем прокрутку */
.tg-msg-text{
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 6px;       /* чтобы скролл не прилипал к тексту */
}

/* 5) чуть аккуратнее скролл (не обязательно, но красиво) */
.tg-msg-text::-webkit-scrollbar{
  width: 8px;
}
.tg-msg-text::-webkit-scrollbar-thumb{
  background: rgba(42,125,225,.25);
  border-radius: 10px;
}
.tg-msg-text::-webkit-scrollbar-track{
  background: transparent;
}

/* Шире контейнер секции с окнами */
.reviews-page .container{
  max-width: 1220px;   /* было меньше */
}

/* Сетка: окна крупнее, не ужимаем ниже 320px */
.tg-phones{
  grid-template-columns: repeat(3, minmax(320px, 1fr));
}

/* На средних экранах — 2 колонки */
@media (max-width: 1180px){
  .tg-phones{
    grid-template-columns: repeat(2, minmax(320px, 1fr));
  }
}

/* На мобиле — 1 колонка */
@media (max-width: 780px){
  .tg-phones{
    grid-template-columns: 1fr;
  }
}

/* только на странице отзывов, только для секции телефонов */
.reviews-page .tg-phones{
  max-width: 1220px;
  margin: 0 auto;
}

.reviews-more{
  display: flex;
  justify-content: center;
  margin-top: 22px;
  position: relative;
  z-index: 1;
}
