/* Общий стиль для сообщений */
.chat__message {
  display: flex;
  margin-bottom: 15px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s forwards;
  font-size: 16px;
}

.chat {
  position: relative;
}

/* Сообщения от бота выравниваются влево */
.chat__message--bot {
  justify-content: flex-start;

  strong {
    color: #fac032;
  }
}

.chat__message--user {
  strong {
    color: #ffffff;
  }
}

.chat__text {
  font-family: "Red Hat Display", serif;
  line-height: 125%;
  text-transform: uppercase;
  em {
    color: white;
  }
}

.chat__message--bot .chat__text {
  color: #ffffff;
  font-size: 18px;
  max-width: 70%;
  position: relative;
  white-space: pre-line;
  background: rgb(76, 76, 76);
  border-radius: 30px;
  padding: 14px;
  font-family: "Delicious Handrawn", cursive !important;
}

.chat__message--bot {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Сообщения от пользователя выравниваются вправо */
.chat__message--user {
  justify-content: flex-end;
}

.chat__message--user .chat__text {
  color: #ffffff;
  border-radius: 30px;
  padding: 14px;
  max-width: 70%;
  position: relative;
  background: rgb(200, 158, 75);
}

/* Анимация появления сообщений */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Добавление стрелочек для сообщений */
/*.chat__message--bot .chat__text::after {
    content: '';
    position: absolute;
    top: 17px;
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-style: solid;
    border-color: transparent #ffffff transparent transparent;
}*/

/*.chat__message--user .chat__text::after {
    content: '';
    position: absolute;
    !* top: 7px; *!
    right: -6px;
    border-width: 10px 0 10px 8px;
    border-style: solid;
    border-color: transparent transparent transparent #39e05e;
}*/

#chat-history {
  max-height: 930px;
  overflow-y: auto;
  /*border: 1px solid rgba(255, 255, 255, 0.4);*/
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  padding-right: 20px;
  /*margin-top: 60px;*/
}

/* Анимация для активной кнопки микрофона */
.svg-button.active {
  background-color: #2196f3;
  border-radius: 50%;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(39, 179, 244);
  }
  70% {
    box-shadow: 0 0 10px 20px rgba(255, 165, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 165, 0, 0);
  }
}

/* Индикатор "Listening..." */
.voice-indicator {
  display: none;
  font-size: 14px;
  color: #2196f3;
  margin-top: 5px;
  text-align: center;
}

.voice-indicator.active {
  display: block;
}

.micro {
  cursor: pointer;
}

.chat__text img {
  width: 100%;
}


#message-upload {
  cursor: pointer;
}


/* Основной блок голосового сообщения */
.chat__voice-message {
  display: flex;
  align-items: center;
  background-color: #6b52ff;
  padding: 8px 12px;
  border-radius: 20px;
  min-width: 30%;
  margin: 5px 0;
}

/* Иконка для кнопки воспроизведения */
.voice-icon {
  margin-right: 10px;
}

/* Кнопка воспроизведения */
.voice-play-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  outline: none;
  display: flex;
}

/* Таймлайн (область, имитирующая волну) */
.voice-timeline {
  flex: 1;
  height: 20px;
  background-color: #ffffffa1;
  border-radius: 10px;
  position: relative;
  margin-right: 10px;
  overflow: hidden;
  width: 180px;
}

/* Волнообразный индикатор */
.voice-wave {
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, rgb(0 0 0), rgb(111 96 253));
  border-radius: 10px;
}

/* Метка длительности аудио */
.voice-duration {
  font-size: 12px;
  color: #ffffff;
}

.remove-btn {
  background: rgba(220, 53, 69, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: all 0.3s ease;
  margin-left: 8px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}