@charset "UTF-8";
.content__chat {
  margin: 30px 0;
}

/*.chat-container {*/
/*  display: flex;*/
/*  flex-direction: row;*/
/*  height: 100vh; !* Full viewport height *!*/
/*}*/

#chat__with, #chat__role{
  text-transform:lowercase; 
}

.chat__row {
  display: flex;
  flex: 1; /* Take up remaining space */
  overflow: hidden; /* Prevent overflow */
  padding: 3px;
}

.empty {
  padding: 10px;
  margin: 5px;
}

/*.chat__left, .chat__right {*/

  /* flex: 1; Equal width for left and right panels */
  /* display: flex;
  flex-direction: column;
  overflow: hidden; Prevent overflow */
/*}*/

/*.chat__list, .chat-box {*/
  /* flex: 1;
  overflow-y: auto; 
  padding-bottom: 50px; */
/*}*/

/*.chat__navigation {*/
/*  display: flex;*/
/*  align-items: center;*/
/*  padding: 10px;*/
/*  background: #ffffff; !* Background color for the navigation area *!*/
/*  !* position: sticky;*/
/*  bottom: 0; *!*/
/*}*/

/*.chat__navigation input[type="text"] {*/
/*  flex: 1; !* Make the input take up remaining space *!*/
/*  padding: 10px;*/
/*  margin-right: 10px;*/
/*  border: 1px solid #ddd;*/
/*  border-radius: 4px;*/
/*}*/

/*.chat__navigation button, .chat__navigation input[type="file"] {*/
/*  margin-right: 10px;*/
/*}*/

.upload-button img {
  height: 20px;
  width: 20px;
  margin: 4px;
}

/*.chat-container {*/
/*  width: 100%;*/
/*  height: 100hv;*/
/*  padding: 20px;*/
/*  background-color: #FFF;*/
/*  border-radius: 20px;*/
/*}*/

/*.chat-box {*/
/*  border: 1px solid #ccc;*/
/*  border-radius: 4px;*/
/*  padding: 10px;*/
/*  height: 85%;*/
/*  overflow-y: auto;*/
/*  display: flex;*/
/*  flex-direction: column;*/
/*  align-items: flex-start;*/
/*  border-radius: 20px;*/
/*  background-color: #c6cdc6;*/
/*}*/
/*.chat-box > img {*/
/*  margin: 10px 0;*/
/*  width: 300px;*/
/*}*/

/*.chat-box {*/
/*  display: flex;*/
/*  flex-direction: column; */
/*  width:100%;*/
/*}*/

.list-view {
  display: flex;
  flex-direction: column; 
  width:100%;
}


/*#message-input {*/
/*  border-radius: 10px;*/
/*  width: 100%;*/
/*  padding: 5px;*/
/*  margin-bottom: 5px;*/
/*  margin-top: 5px;*/
/*  !* background-color: #f4f7f8; *!*/
/*  color: #1d1c1c;*/
/*  font-family: Inter;*/
/*  font-size: 16px;*/
/*  font-style: normal;*/
/*  !* font-weight: 600; *!*/
/*  line-height: normal;*/
/*  border: 1px solid #364337;*/
/*  overflow: hidden;*/
/*}*/

#file-input,
#image-input {
  display: none;
  /* Скрыть само поле ввода файла */
}

/*.upload-button {*/
/*  width: 30px;*/
/*  height: 30px;*/
/*  border-radius: 50%;*/
/*  background-color: #abe0ad;*/
/*  border: none;*/
/*  cursor: pointer;*/
/*}*/

/*.upload-button img {*/
/*  width: 20px;*/
/*  height: 20px;*/
/*}*/
/*#send-button {*/
/*  padding: 10px 40px;*/
/*  background: #224523;*/
/*  color: #FFF;*/
/*  font-family: Inter;*/
/*  font-size: 16px;*/
/*  font-style: italic;*/
/*  font-weight: 500;*/
/*  line-height: normal;*/
/*  border-radius: 30px;*/
/*}*/
#chart-search {
  display: flex;
  /* padding: 10px 40px;
  background: #224523;
  color: #FFF;
  font-family: Inter;
  font-size: 16px;
  font-style: italic;
  font-weight: 500;
  line-height: normal;
  border-radius: 30px; */
}

.chat-box .message.user {
  text-align: right;
  align-self: flex-end;
  float: right;
  clear: both;
  max-width: 100%;
}



/*.message.user {*/
/*  margin: 10px 10px 10px 20px;*/
/*  display: inline-block;*/
/*  padding: 0px 10px;*/
/*  background-color: #abe0ad;*/
/*  margin-bottom: 10px;*/
/*  border-radius: 10px;*/
/*  padding: 7px;*/
/*}*/

.message.user.viewed {
  margin: 10px 0;
  display: inline-block;
  padding: 0px 10px;
  background-color: #78df97;
  margin: 9px;
  border-radius: 10px;
}

#chat_back{
  display: none;
}

/*.message {*/
/*  margin: 10px 0 0 5px;*/
/*  display: inline-block;*/
/*  padding: 0px 10px;*/
/*  background-color: #275C29;*/
/*  margin-bottom: 10px;*/
/*  border-radius: 10px;*/
/*}*/

/*.message span,*/
/*.message a {*/
/*  !* color: #FFF; *!*/
/*  font-family: Inter;*/
/*  font-size: 14px;*/
/*  font-style: normal;*/
/*  font-weight: 400;*/
/*  line-height: normal;*/
/*}*/

.message-content {
  display: flex;
  flex-direction: column;
  overflow: auto;
}

/*.message-text {*/
/*  margin-bottom: 5px;*/
/*  word-wrap: break-word; !* Older CSS property *!*/
/*  overflow-wrap: break-word; !* Newer CSS property *!*/
/*  word-break: break-word; !* Ensures words are broken to fit the container *!*/
/*  hyphens: auto; /*/
/*}*/

.file-link {
  text-decoration: none;
  color: #007bff;
  margin-bottom: 5px;
}

.message-image {
  max-width: 100px;
  border-radius: 5px;
}

/*.message-time {*/
/*  align-self: flex-end;*/
/*  font-size: 12px;*/
/*  color: #777;*/
/*}*/

.avatar > img {
  margin: 10px 0;
  border-radius: 50%;
  height: 50px;
  width: 50px;
}

/* .message.bot{
  margin: 20px 10px 10px 10px;
} */

/*.bot .message-text {*/
/*  color: rgb(10, 10, 10);*/
/*}*/
/*.bot{*/
/*  background-color: white;*/
/* */
/*}*/
.chat-date-container {
  text-align: center; /* Center child elements horizontally */
  margin: 10px 0; /* Add some vertical spacing */
}

.chat-date {
  background-color: rgba(255, 255, 255, 0.3);
  padding: 5px;
  color: #5b5c5b;
  display: inline-block; /* Allows the element to be centered */
  border-radius: 5px; /* Optional: round the corners */
}



/*.chat__left {*/
/*  !* width: 300px; *!*/
/*  height: 95%;*/
/*  border-radius: 10px;*/
/*  background-color: #c6cdc6;*/
/*  !* padding: 10px 0px 9px 1px; *!*/
/*  margin: 1px 0px 11px 0px;*/
/*  overflow: hidden;*/
/*  overflow-y: auto;*/
/*  border: 1px solid #7c7d7c;*/
/*}*/

/*#chat_left{*/
/*  padding: 0;*/
/*}*/

/*.chat-box{*/
/*  margin: 1px 0px 11px 0px;*/
/*}*/

/*.chat__right {*/
/*  width: 70%;*/
/*  height: 100%;*/
/*  padding: 3px;*/
/*  position: relative;*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*    overflow: hidden;*/
/*}*/

.chat__row {
  display: flex;
}

/*.list__line {*/
/*  border-radius: 20px 20px 0 0;*/
/*  background: #c6cdc6;*/
/*  display: flex;*/
/*  height: 40px;*/
/*  width: 100%;*/
/*  align-items: center;*/
/*  justify-content: center;*/
/*}*/
/*.list__line span {*/
/*  color: #323232;*/
/*  font-family: Quantico;*/
/*  font-size: 20px;*/
/*  font-style: italic;*/
/*  font-weight: 700;*/
/*  line-height: 20px;*/
/*  text-transform: uppercase;*/
/*}*/

/*.user__block {*/
/*  padding: 10px;*/
/*  display: flex;*/
/*  align-items: center;*/
/*  background: #c6cdc6;*/
/*  border-top: 1px solid #5b5c5b;*/
/*  border-bottom: 1px solid #5b5c5b;*/
/*}*/

/*.user__block:hover {*/
/*  background: #e4e9e5;*/
/*}*/

/*.user__block.active {*/
/*  background: #e4e9e5;*/
/*}*/

.user__avatar img {
  width: 45px;
  border-radius: 50%;
  height: 45px;
  /*margin: 0 10px 0 10px*/
}

/*.user__name {*/
/*  margin: 0 0 0 10px;*/
/*}*/
/*.user__name span {*/
/*  color: #323232;*/
/*  font-family: Inter;*/
/*  font-size: 16px;*/
/*  !* font-style: italic; *!*/
/*  font-weight: 500;*/
/*  line-height: normal;*/
/*}*/

/*.list__users {*/
/*  height: 100%;*/
/*  overflow: auto;*/
/*}*/

/*.list__users::-webkit-scrollbar {*/
/*  display: none;*/
/*}*/

@media (max-width: 1024px) {


  #send-button {
    padding: 10px 20px;
  }

  

}
@media (max-width: 768px) {
  .list__line{
    display: none;
  }

  .ava__chat{
    display: none;
  }

  .chatNone{
    display: none;
  }

  .chat__navigation {
    padding: 5px; /* Уменьшаем отступы на мобильных устройствах */
  }

  .chat__navigation input[type="text"]  {
    padding: 8px; /* Увеличиваем отступы внутри textarea на мобильных устройствах */
  }


  .stick-bottom {
    position: fixed !important;
    bottom: 0 !important;
    width:95% !important;
    max-width:960px !important;
  }

  #send-button {
    padding: 10px 20px;
  }
  /* .chat__left {
    z-index: 1;
    transition: 1s all;
    position: absolute;
    right: 1000px;
  } */
  .chat__burger {
    transition: 1s all;
    top: 10px;
    left: 9px;
    z-index: 1;
    position: absolute;
    display: flex;
    order: 3;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 3px;
    background: #D9D9D9;
  }
  .chat__burger span {
    display: block;
    transition: 1s all;
    width: 35px;
    height: 3px;
    background: #224523;
    border-radius: 5px;
  }
  .chat__burger::after, .chat__burger::before {
    content: "";
    transition: 1s all;
    position: relative;
    display: block;
    width: 35px;
    height: 3px;
    background: #224523;
    border-radius: 5px;
  }
  .chat__burger::after {
    bottom: 0;
  }
  .chat__burger::before {
    top: 0;
  }
  .chat__burger.active span {
    transition: 1s all;
    transform: scale(0);
  }
  .chat__burger.active::after {
    transition: 1s all;
    bottom: 10px;
    transform: rotate(45deg);
  }
  .chat__burger.active::before {
    transition: 1s all;
    top: 10.5px;
    transform: rotate(-45deg);
  }
  .chat__left.active {
    transition: 1s all;
    width: 96%;
    height: 95%;
    position: absolute;
    right: 0;
    z-index: 1;
  }
  .list__line {
    height: 55px;
  }
  #chat_back{
    display: block;
    height: 30px !important;
    margin-right: 50px;
    cursor: pointer;
  }
  .chat-container .chat__right {
    display: none;
  }

}
@media (max-width: 578px) {
  .chat__left{
    height: 95vh;
  }
  .chat__right{
    height: 95vh;
  }


  .chat-container, .chat__left, .chat-box{
    padding: 0;
    margin: 0;
    border-radius: 0;
  }

  .chat__row{
    height: 95vh;
  }
  /* #message-input {
    max-width: 200px;
    width: 100%;
  } */
}
@media (max-width: 540px) {
  .chat-box > img {
    width: 200px;
  }
}
:root {
  --primary-color: #00A550;
  --secondary-color: #003B26;
  --accent-color: #008C45;
  --light-gray: #f5f5f5;
  --medium-gray: #e0e0e0;
  --dark-gray: #666;
  --border-radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}
span, a, li, label, h1 {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}
.content.chat {
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.5;
}

/* Контейнер чата */
.content__chat {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Заголовок */
.chat__line {
  padding: 1.5rem 0;
  border-bottom: 2px solid var(--light-gray);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.chat__line span {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--secondary-color);
}

/* Основной контейнер чата */
.chat-container {
  display: flex;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 600px;
}

/* Левая колонка - список диалогов */
.chat__left {
  width: 35%;
  border-right: 1px solid var(--medium-gray);
  background: #fafafa;
  display: flex;
  flex-direction: column;
}

/* Поиск в чате */
.list__line {
  padding: 1.2rem;
  background: var(--light-gray);
  border-bottom: 1px solid var(--medium-gray);
}

.list__line span {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--secondary-color);
}

.chart__search {
  padding: 1rem;
  border-bottom: 1px solid var(--medium-gray);
  position: relative;
}
#serchformu {
  width: 100%;
}
.chart__search .center__search {
  position: relative;
  width: 100%;
}

.chart__search .search {
  width: 100%;
  padding: 0.8rem 2.5rem 0.8rem 1rem;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  font-size: 1.15rem;
  background: white;
  transition: border-color 0.3s;
}

.chart__search .search:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 165, 80, 0.1);
}

.chart__search a {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

/* Список пользователей */
/*.list__users {*/
/*  flex: 1;*/
/*  overflow-y: auto;*/
/*}*/

.user__block {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--light-gray);
  cursor: pointer;
  transition: background-color 0.2s;
}

.user__block:hover {
  background-color: #f0f0f0;
}

.user__block.active {
  background-color: rgba(0, 165, 80, 0.1);
  border-left: 4px solid var(--primary-color);
}

.user__avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
  color: white;
  font-weight: 500;
  font-size: 1.1rem;
}

.user__name {
  flex: 1;
}

/*.user__name a {*/
.chat__list a span {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 1.15rem;
  display: block;
}

/*.user__name a:hover {*/
.chat__list .active a span,
.chat__list a span:hover {
  color: var(--primary-color);
}

/* Правая колонка - окно чата */
.chat__right {
  width: 65%;
  display: flex;
  flex-direction: column;
  background: white;
}

/* Окно сообщений */
.chat-box {
  /*flex: 1;*/
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #f9f9f9;
  /*min-height: 400px;*/
}

/* Пустое состояние */
.chat-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 100%;
  color: var(--dark-gray);
  text-align: center;
  padding: 2rem;
}

.chat-empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--medium-gray);
}

.chat-empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
}
.chat-messages {
  display: flex;
  flex-direction: column;
}

/* Панель ввода сообщения */
.chat__navigation {
  border-top: 1px solid var(--medium-gray);
  padding: 1rem;
  background: white;
}

.chat__navigation textarea {
  width: 100%;
  min-height: 50px;
  max-height: 150px;
  padding: 0.8rem;
  border: 1px solid var(--medium-gray);
  border-radius: var(--border-radius);
  resize: none;
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
  transition: border-color 0.3s;
}

.chat__navigation textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 165, 80, 0.1);
}

/* Кнопки */
.chat-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chat-buttons button,
.chat-buttons .upload-button {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#send-button {
  background-color: var(--primary-color);
  color: white;
  flex: 1;
  justify-content: center;
}

#send-button:hover:not(:disabled) {
  background-color: var(--accent-color);
  transform: translateY(-1px);
}

#send-button:disabled {
  background-color: var(--medium-gray);
  cursor: not-allowed;
  opacity: 0.6;
}

#ref-input {
  background-color: var(--light-gray);
  color: var(--dark-gray);
}

#ref-input:hover {
  background-color: #e0e0e0;
}

.upload-button {
  background-color: white;
  border: 1px solid var(--medium-gray) !important;
  color: var(--dark-gray);
}

.upload-button:hover {
  background-color: var(--light-gray);
  border-color: var(--primary-color) !important;
}

.upload-button img {
  width: 18px;
  height: 18px;
}

/* Скрытые инпуты файлов */
#file-input,
#image-input {
  display: none;
}

/* Стили сообщений (если будут загружены) */
.message {
  /*max-width: 70%;*/
  padding: 0.8rem 1rem;
  border-radius: 18px;
  margin-bottom: 0.5rem;
  position: relative;
}
.message-text {
  font-size: 1.15rem;
  color: #333;
}
.message-incoming {
  display: inline-flex;
  align-self: flex-start;
  background: white;
  border: 1px solid var(--medium-gray);
  border-bottom-left-radius: 4px;
}

.message-outgoing {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-bottom-right-radius: 4px;
}
.message-outgoing .message-time,
.message-outgoing .message-text {
  color: white;
}
.message-time {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.3rem;
  text-align: right;
}

/* Адаптивность */
@media (max-width: 768px) {
  .content__chat {
    padding: 0 10px;
  }

  .chat-container {
    flex-direction: column;
    min-height: calc(100vh - 200px);
  }

  .chat__left,
  .chat__right {
    width: 100%;
    /*height: 50%;*/
  }

  .chat__left {
    border-right: none;
    border-bottom: 1px solid var(--medium-gray);
  }

  .chat__line span {
    font-size: 1.5rem;
  }

  .list__line,
  .chart__search {
    padding: 0.8rem;
  }

  .user__block {
    padding: 0.8rem;
  }

  .chat-buttons {
    justify-content: center;
  }

  #send-button,
  #ref-input {
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  .chat__line {
    padding: 1rem 0;
    margin-bottom: 1rem;
  }

  .chat__line span {
    font-size: 1.3rem;
  }

  .chat-box {
    padding: 1rem;
  }

  .chat__navigation {
    padding: 0.8rem;
  }

  .chat-buttons {
    flex-direction: column;
  }

  .chat-buttons button,
  .chat-buttons .upload-button {
    width: 100%;
    justify-content: center;
  }
}

/* Анимации */
/*@keyframes fadeIn {*/
/*  from { opacity: 0; transform: translateY(10px); }*/
/*  to { opacity: 1; transform: translateY(0); }*/
/*}*/

/*.user__block {*/
/*  animation: fadeIn 0.3s ease-out;*/
/*}*/

/* Полоса прокрутки */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}
