/* chat-list.css — стили для экрана списка чатов */

/* Общий контейнер списка чатов */
.chat-list {
  flex: 1;
  overflow-y: auto;
  background: #fff;
}

/* Элемент чата в списке */
.chat-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
  position: relative;
}

.chat-item:hover {
  background-color: #f5f5f5;
}

/* Аватарка в списке чатов - УДАЛЕНА (дублирует .avatar из styles.css) */
/* .chat-item .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #0d7769;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  color: white;
  margin-right: 12px;
  flex-shrink: 0;
  position: relative;
} */

/* Статус онлайн/оффлайн (точка) - УДАЛЕНА (дублирует .status-dot из styles.css) */
/* .chat-item .status-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid white;
} */

/* Для чат-листа нужно другое позиционирование статуса */
.chat-item .status-dot {
  bottom: 4px;
  right: 4px;
}

/* УДАЛЕНЫ цветовые стили статуса (дублируют styles.css) */
/* .chat-item .status-dot.online {
  background-color: #4CAF50;
}
.chat-item .status-dot.offline {
  background-color: #9E9E9E;
} */

/* Информация о чате */
.chat-item .chat-info {
  flex: 1;
  min-width: 0;
  padding-right: 40px; /* место под время и бейдж */
}

.chat-item .chat-info h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
  color: #000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-item .chat-info .last-message {
  font-size: 13px;
  color: #666;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}

/* Время последнего сообщения */
.chat-item .last-message-time {
  position: absolute;
  right: 25px;
  bottom: 8px;
  font-size: 11px;
  color: #999;
}

/* Бейдж непрочитанных сообщений */
.chat-item .unread-badge {
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  background: #9ccc65;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
}

/* Заголовок экрана списка чатов */
#chatListScreen .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #128c7e;
  color: white;
  padding: 16px;
}

#chatListScreen .header h1,
#chatListScreen .header div:first-child {
  font-size: 18px;
  font-weight: 600;
}

/* Шапка открытого чата — в светлой теме та же, что у списка (#128c7e; на веб-десктопе иначе просвечивал #efeae2) */
body:not(.dark-theme) #chatScreen .header,
body:not(.dark-theme) #chatScreen #chatHeader {
  background: #128c7e;
  color: #fff;
}

body:not(.dark-theme) #chatScreen .header i,
body:not(.dark-theme) #chatScreen #chatHeader i {
  color: rgba(255, 255, 255, 0.95);
}

/* Кнопка создания чата */
#createChatButton {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #128c7e;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 20;
}

/* Всплывающее меню (выпадашка) */
#menuPopup {
  position: absolute;
  top: 50px;
  right: 16px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 5px;
  z-index: 20;
  display: none;
  padding: 8px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#menuPopup div {
  padding: 8px 16px;
  cursor: pointer;
  font-size: 15px;
}

#menuPopup div:hover {
  background: #f0f0f0;
}

/* Текст "был(а) X" под именем в шапке чата */
#chatScreen .chat-last-seen {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 1px;
  line-height: 1.2;
}



