/* Общие CSS для Виджета и Рпнель оператра */

.iconFile { width: 32px; height:32px; background:url(/panel_widget/img/iconFile48.png) 0 0 no-repeat; background-size:cover; }
.iconImage { width: 32px; height:32px; background:url(/panel_widget/img/iconImage48.png) 0 0 no-repeat; background-size:cover; }
.iconText { width: 32px; height:32px; background:url(/panel_widget/img/iconText48.png) 0 0 no-repeat; background-size:cover; }
.iconWord { width: 32px; height:32px; background:url(/panel_widget/img/iconWord48.png) 0 0 no-repeat; background-size:cover; }
.iconExcel { width: 32px; height:32px; background:url(/panel_widget/img/iconExcel48.png) 0 0 no-repeat; background-size:cover; }
.iconAccess { width: 32px; height:32px; background:url(/panel_widget/img/iconAccess48.png) 0 0 no-repeat; background-size:cover; }
.iconPowerPoint { width: 32px; height:32px; background:url(/panel_widget/img/iconPowerPoint48.png) 0 0 no-repeat; background-size:cover; }
.iconCsv { width: 32px; height:32px; background:url(/panel_widget/img/iconCsv48.png) 0 0 no-repeat; background-size:cover; }
.iconPdf { width: 32px; height:32px; background:url(/panel_widget/img/iconPdf48.png) 0 0 no-repeat; background-size:cover; }
.iconXml { width: 32px; height:32px; background:url(/panel_widget/img/iconXml48.png) 0 0 no-repeat; background-size:cover; }
.iconEml { width: 32px; height:32px; background:url(/panel_widget/img/iconEml48.png) 0 0 no-repeat; background-size:cover; }
.iconVideo { width: 32px; height:32px; background:url(/panel_widget/img/iconVideo48.png) 0 0 no-repeat; background-size:cover; }
.iconAudio { width: 32px; height:32px; background:url(/panel_widget/img/iconAudio48.png) 0 0 no-repeat; background-size:cover; }
.iconIni { width: 32px; height:32px; background:url(/panel_widget/img/iconIni48.png) 0 0 no-repeat; background-size:cover;}
.iconDll { width: 32px; height:32px; background:url(/panel_widget/img/iconDll48.png) 0 0 no-repeat; background-size:cover;}
.iconZip { width: 32px; height:32px; background:url(/panel_widget/img/iconZip48.png) 0 0 no-repeat; background-size:cover;}
.iconRar { width: 32px; height:32px; background:url(/panel_widget/img/iconRar48.png) 0 0 no-repeat; background-size:cover;}

/* Дял Контекстного меню */
.msg-icon-copy { background:url(/panel_widget/img/copy20.png) 0 0 no-repeat; }
.msg-icon-edit { background:url(/panel_widget/img/edit20.png) 0 0 no-repeat; }
.msg-icon-del { background:url(/panel_widget/img/trash20.png) 0 0 no-repeat; }
.msg-icon-cite { background:url(/panel_widget/img/cite20.png) 0 0 no-repeat; }

.checkOK {
  width: 100%; height:100%;
  background:url(/panel_widget/img/checkOK.png) 0 0 no-repeat;
  background-size:cover;
}

/* -------------- Анимация Печатает ... ------------------ */

/* Анимация 1: Пульсирующие 3 шарика в ряд и слово Печатает ... */

#chat-typing {
  display:block;
  visibility: hidden;
  font-size:14px;
  color: #0d6dc7;
  margin-left:10px;
  float:left;
  line-height:100%;
  width:fit-content;

  padding-top:6px;
  padding-bottom:0px;
/*border:1px solid red; */
}

.chat-typing-dot {
  display:inline-block;
  width: 6px;  height: 6px;
  margin-right: 5px;
  background-color: #487bab;
  border-radius: 50%;
  opacity: 0;
  animation: loadingFade 1.2s infinite;
}
.chat-typing-dot:nth-last-of-type(3) { animation-delay: 0s; margin-left: 8px;}
.chat-typing-dot:nth-last-of-type(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-last-of-type(1) { animation-delay: 0.4s; }

@keyframes loadingFade {
  0% { opacity: 0; }
  50% { opacity: 0.8; }
  100% { opacity: 0; }
}
#chat-typing-label {
  display:inline-block;
  padding-right:6px;
  width:fit-content;
}

/* Анимация 1: Прыгающие шарики (не удалять. Заготовка на будущее)

#chat-typing {
    display: block;
    font-size:14px;
    color: #0d6dc7;
    width:fit-content;

    padding-top:4px;  
    margin-left:10px;
    float:left;
    line-height:100%;
}
.chat-typing-dot {
    display: inline-block;
    border-radius: 50%;
    height: 6px; width: 6px;
    background-color: #0d6dc7;
    margin-right:6px;

    animation-name: wave;
    animation-duration: 1s;
    animation-timing-function: ease;
    animation-iteration-count: infinite;
}

.chat-typing-dot:nth-last-of-type(3) {
    animation-delay: 0.33s;
}
.chat-typing-dot:nth-last-of-type(2) {
    animation-delay: 0.5s;
}
.chat-typing-dot:nth-last-of-type(1) {
    animation-delay: 0.67s;
}

@keyframes wave {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(0px);
    }
    75% {
        transform: translateY(-6px);
    }
    100% {
        transform: translateY(0px);
    }
}
*/


/* box объединяющий все, кроме заголовка */

#chat-box-inner {
/*border:2px solid red;*/

  /*flex: 1 1 auto;*/
  flex-grow:1;

  display: flex;
  flex-direction: column;

  background-color:white;

/*  min-height:350px;*/

  box-shadow:
/*   0 1px 4px rgba(0, 0, 0, .3),*/
   -33px 0 20px -33px rgba(0, 0, 0, .1),
   33px 0 20px -33px rgba(0, 0, 0, .1),
   0 0 40px rgba(0, 0, 0, .1);

/*  transition-property: all;
  transition-duration: .5s;
  transition-timing-function: ease-out;
*/

/* border:1px solid red; */
}

/* BODY of widget */

#chat-body {
  flex-grow:2000;  /*: 2 1 auto;*/

  display:flex;
  flex-direction:column;
  justify-content: stretch;

/*  display:block;*/

/*  align-items: stretch;*/
/*  min-height:230px;*/

  /* https://tproger.ru/translations/how-css-flexbox-works/?ysclid=laksa8fmlj346073383 */

/*  position: absolute;
  bottom: 10px;*/
  
  padding:8px;

  margin:0;
  background-color:#f8f8f8;
/*border:1px solid yellow;*/
}
#chat-top-line {
/* outline:1px solid blue;*/

/*  flex-grow: 0;*/
/*  flex: 0 1 auto;*/

  display:block;
  height:22px;
  padding: 0 2px 4px 2px;
/*  background-color:#ffffff;*/
/*  overflow:hidden;*/
}
#chat-messages-wr {
  display:block;
  overflow: hidden;
  overflow-y:auto;
  width:100%;
  height:100%;
  margin:0; padding:0;
  flex-grow:99;
/* border:1px solid blue; */
}
#chat-messages {
  width:100%;
 /* height:100%;*/

  font-family: Arial, Tahoma, Verdana;
  font-size:17px;

  display:block;
  overflow: hidden;
/*
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
*/

/*  row-gap:6px;*/
  padding: 4px;
/*border: 1px solid blue;*/
}

.chat-msg-V, .chat-msg-O, .chat-msg-P {
  max-height:100%;  /*   Это костыль: решает БАГ, когда даже короткое сообщение из 1 короткого слова (только! на Chrome под Android) разрывает и переносит, хотя bubble явно еще не достиг max-width у chat-msg-V, chat-msg-O */
/*border:1px solid red;*/
  margin-right:8px; /* Чтобы облачко не задевало за вертикальную полосу прокрутки */
}

.chat-msg-V {
  /*align-self: end;*/
  /*text-align:left;*/

/*  margin-right:auto;  Выставляется в PrintMsg()*/

  max-width:80%;
  width:fit-content;
/*min-width:70px;*/
}
.chat-msg-O {
/*  align-self: start;*/

/*  margin-left:auto;  Выставляется в PrintMsg()*/

/*  text-align:right;*/
  max-width:80%;
  width:fit-content;
/* min-width:70px; */
/*overflow:hidden;*/
}
.chat-msg-P {
  margin:auto;
/*  align-self: center */
  max-width:80%;
  width:fit-content;
  margin-bottom: 12px;
}

.chat-msg-S {
  margin:auto;

/*  align-self: center;*/

  color:#555;
  font-size:10px;
  text-transform: uppercase;
  padding:12px 0 12px 0;

  display:flex;
  justify-content:center;
/*  align-items:stretch;*/
  width:100%;
/* border:1px solid green;*/
}

.chat-msg-form {
/*  text-align:center;*/
  margin: 8px auto 8px auto;
  padding-right:8px; /* Чтобы справа был зазор до вертикального скролла */
  min-width:280px;
  max-width:560px;
}

.chat-msg-bubble-V, .chat-msg-bubble-O, .chat-msg-bubble-P, .chat-msg-bubble-edit, .chat-msg-form-bubble {
  padding: 8px 12px 8px 12px;
  margin-top:4px;
  border-radius:14px;
  text-align:left;
  overflow-wrap: break-word;
/*border:1px solid red;*/
}
.chat-msg-bubble-V { background-color:#d5dff0; }
.chat-msg-bubble-O { background-color:#dbf7b3; }
.chat-msg-bubble-P { background-color:#e7e7e7; }
.chat-msg-form-bubble { background-color:#e4e4e4; }
.chat-msg-bubble-edit { background-color:#ffa07a; }

.chat-msg-attbox {
  font-family: Arial, Tahoma, Verdana;
  font-size:14px;
  line-height:100%;

  margin-top: 8px;
  display: flex;
  align-items: center;

  cursor: pointer;
}
.chat-msg-text { line-height:120%; }
.chat-msg-attbox-fi {
  flex: 2 1 auto;
  color:black;
  overflow:hidden;
/*border:1px solid red;*/
}
.chat-msg-attbox-fn, .chat-msg-attbox-sz {
/* border:1px solid green; */
  overflow: hidden;  text-overflow: ellipsis;  white-space: nowrap;
  text-align:left;
}
.chat-msg-attbox-fn { height:16px;}
.chat-msg-attbox-sz { color:#444; padding-top:2px;}

.chat-msg-cite-bubble-1, .chat-msg-cite-bubble-2 {
  flex-grow:2;
  display:flex;
  font-size:18px;
  font-family: Arial, sans-serif;
  padding:8px;
  margin-bottom:4px;
  line-height:100%;
  border-radius:6px;
/*  border:1px solid red;*/
}
.chat-msg-cite-bubble-1 { background-color:#eaf5ff; border-left:7px solid #6f8fc4; } /* фон и верт.черта для цитаты */
.chat-msg-cite-bubble-2 { background-color:#f1ffdd; border-left:7px solid #80bc2a; } /* фон и верт.черта для цитаты */

.chat-msg-cite-cross-btn {
  display:flex;
  align-items: center;
  justify-content:center;

  width:20px;
  margin-right:8px;
/* border:1px solid black;*/
}
.chat-msg-cite-cross {
  width:16px; height:16px;
  background: url(/panel_widget/img/cross16.png) 0px 0px no-repeat;
  cursor:pointer;
  opacity:0.8;
  margin:0 auto;

  transform: scale(0.8);
  -webkit-transform: scale(0.8);
/*border:1px solid magenta;*/
}
.chat-msg-cite-cross:hover {
  transform: scale(1);
  -webkit-transform: scale(1);
  opacity:1;
}
.chat-msg-cite-img { width:36px; height:36px; flex-grow:0; flex-shrink:0; margin-right:8px; }
.chat-msg-cite-icon { width:36px; height:36px; flex-grow:0; flex-shrink:0; margin-right:8px; }
.chat-msg-cite-author {
  overflow: hidden; text-overflow: ellipsis;  white-space: nowrap; /* троеточие */
  font-size:16px;
  font-weight:bold;
/* border:1px solid black; */
}
.chat-msg-cite-text {
  overflow: hidden; text-overflow: ellipsis;  white-space: nowrap; /* троеточие */
  width:100%;
  font-size:16px;
  font-style: italic;
/* border:1px solid green; */
}

/* Панель цитата */

#pnl-cite {
  display: flex;

  width:100%;
/*  min-height: 36px;
  max-height: 74px;*/

  font-family: Arial, Tahoma, Verdana;
  font-size:13px;
  line-height:100%;
  border-bottom:1px solid var(--borderColor);
}

/* Панель Attach */

#pnl-att {
  display: block;

  width:100%;
  min-height: 36px;
  max-height: 74px;
  overflow-y:auto;

  font-family: Arial, Tahoma, Verdana;
  font-size:13px;
  line-height:100%;
  border-bottom:1px solid var(--borderColor);
/*border:1px solid red;*/
}
.att-block {
  float:left;
  margin-right:8px;
  margin-bottom:4px;
  display:flex;
  max-width:150px;
  width:100%;
/* border:1px solid black; */
}
.att-img {
  min-width:32px; min-height:32px;
  max-width:32px; max-height:32px;
  background-size:cover;
/*border:1px solid blue;*/
}
.att-fi {
  flex-grow:2;
  overflow: hidden;
  padding-left:6px;
/* border:1px solid red; */
}
.att-fn, .att-sz {
  overflow: hidden;  text-overflow: ellipsis;  white-space: nowrap;
  text-align:left;
}
.att-fn { color:var(--color); height:16px; }
.att-sz { color:#777777; padding-top:2px; }

.att-cross-box {
  max-width:16px;
  min-width:16px;
}
.att-cross {
  width:10px; height:10px;
  border-radius:50%;
/*  border: 3px solid transparent;*/
  background: url(/panel_widget/img/cross10.png) 0px 0px no-repeat;
  cursor:pointer; 
/*border: 1px solid red;*/
}
.att-cross:hover {
/*  color:white;*/
  background-color:#ff4141;
  border: 3px solid #ff4141;
  background-position: -10px 0;
}


.chat-msg-img-wrapper {
/*border:1px solid red;*/
  min-width: 80px; min-height:80px;
  max-width: 80px; max-height:80px;
  width:80px; height:80px;

  text-align:center;
/*  margin-left: auto;*/

  display: flex;  justify-content: center;  align-items: center;

  margin-right:8px;
/*  background-color: gray;*/
  outline: 1px solid #999;

  border-radius: 12px;
  overflow:hidden;
/*line-height:100%;*/
}
.chat-msg-img-wrapper:hover {
  outline: 2px solid #999;
/*  transition: 0.5s;*/
}
.chat-msg-img {
  max-width: 80px; max-height:80px;

border:0px solid yellow; /*width:100%; height:100%;*/
}
.chat-msg-img-fnicon {
  width:32px; height:32px;
  min-width:32px; min-height:32px;
  background-size: contain;
  margin-right:8px;
  cursor:pointer;
}

.chat-msg-stroke2 {
  padding:2px 2px 4px 0;
  overflow:hidden;
/*border:1px solid red;*/
  font-size:14px;
}
.chat-msg-time-V, .chat-msg-time-O {
  font-family: Calibri, Arial, Verdana, Tahoma;
  color:#333;
  float: right;
  text-align:right;
  padding: 0px 4px 0px 12px;
  line-height:100%;
/*border:1px solid green;*/
}
.chat-msg-checked1 {
/*  display:block;*/
/*  overflow:hidden;*/
  float:right;
  width:20px; height:12px;
  background: url('/panel_widget/img/checked.png') -20px 0 no-repeat;
/*  background-size: 20px 12px; */
/* border:1px solid red;  */
}
.chat-msg-checked2 {
/*  display:block;*/
/*  overflow:hidden;*/
  float:right;
  width:20px; height:12px;
  background: url('/panel_widget/img/checked.png') 0 0 no-repeat;
/*  background-size: 20px 12px;*/
/*border:1px solid red;*/
}
.chat-msg-boundary {
  min-width:20px;
  margin:6px 8px 0 8px;
  border-top:1px solid grey;
  flex:1 1 auto;
/* overflow:hidden;*/
/*border:1px solid blue;*/
}

#chat-footer {
/*  flex-grow: 1; */ /*1 1 auto;*/
 
/*  display:flex;
  flex-direction:column;
*/
  display:block;

  padding:8px;
  margin:0;

  border-top:1px solid #bbb;
/*
  min-height:150px;
  max-height:150px;
  height:150;pw;
*/
  overflow:hidden;
/*border:1px solid blue;*/
}
.chat-footer1 { /* footer от tab1 когда выбран чат из "Мои" */
  min-height: 110px;  /* 110 */
  max-height: 110px;  /* 110 */
}
.chat-footer2 { /* footer от tab1 когда выбран чат из "В очереди" */
  min-height: 32px;
  max-height: 32px;
}
.chat-footer3 { /* footer от tab3 когда выбран чат из "Архив" */
}

#chat-input-zone {

/*  flex:1 1 auto;*/
/*  flex-grow: 2;
  flex-shrink:1;*/

  display:flex;
  flex-direction: row;
  margin-top:4px;
/*  height:80px;*/
/*border:1px solid green;*/
}
#chat-textarea {
  width:100%;
  height:100%;
/*  box-sizing: border-box; С ЭТОЙ СТРОКОЙ БАГ: КОнтекстное меню обрезается по высоте, заходя под textarea  */ /* <input>, с width:100% выходит за пределы родительского эл-та (применить box-sizing) */
  font-family: Arial, Tahoma, Verdana;
  font-size:18px;
  border:0;
  resize:none;  
/* border:1px solid red; */
}
#chat-textarea, #chat-textarea:focus { outline: none; } /* Убирает стандартный border при фокусе */

.chat-send-button-enabled, .chat-send-button-disabled {
  display:block;
  width:32px;  min-width:32px; max-width:32px;
  height:32px;
  margin-top:0;
  border-radius:22px;
  text-align:center;  
  background: url(/panel_widget/img/sendbutt.png) 8px 8px no-repeat;
}
.chat-send-button-enabled { background-color: #6695ab; cursor:pointer; }
.chat-send-button-enabled:hover { background-color: #607d8b; }
.chat-send-button-disabled { background-color: #ddd; }

#chat-send-progress {
  display:block;
  width:32px; min-width:32px; max-width:32px;
  height:32px;
  text-align:center;
  background-image: url(/img/progress_rolling54.gif);
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: cover;
}
#chat-canceledit-button { 
  display: block;
  width:32px; height:32px;
  background-image: url(/panel_widget/img/cancel22.png);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 22px 22px;
  margin-left:10px;
  margin-top:0px ;
  cursor:pointer;
  border-radius:22px;
/*outline:1px solid red;*/
}
#chat-canceledit-button:hover {
/*  background-color: #feddd6;*/
  background-size: 26px 26px;
}

#chat-bottom-line {
  display:flex;
  flex-direction:row;
/*  justify-content: flex-start;*/
/*  align-items: normal;*/

  padding-top:4px;
  padding-bottom:4px;

/*  min-height:26px;
  max-height:26px;
  height:26px;
*/

/*border:1px solid magenta;*/
}

#chat-attach-input {
  opacity: 0;
}

.btn-adds-menu { background:url(/panel_widget/img/adds24.png) 0 0 no-repeat; } /* Для моб.устройств вместо кнопок выше */
.chat-attach-icon { background:url(/panel_widget/img/screp24.png) 0 0 no-repeat; }
.chat-download-icon { background:url(/panel_widget/img/download24.png) 0 0 no-repeat; }
.chat-form-icon { background:url(/panel_widget/img/form24.png) 0 0 no-repeat; }

#sel-files {
  display:inline-block;
  max-width:110px;
  font-size:11px;
  margin-left:6px;
  user-select:none;
  line-height:14px;
/*border:1px solid red;*/
}
#sel-file-count, #sel-total-size {

  overflow: hidden;  text-overflow: ellipsis;  white-space: nowrap;
  color:var(--color);
/*border:1px solid green;*/
}
#sel-total-size { color:#777; }
/*
#pastedpic {
  display:block;
  width:50px; height:50px;
  border:1px solid #aaa;
  text-align:center;
}*/

#all-attach-del-cross {

  display:flex;
  flex-direction:column;
  align-items: center;
  justify-content: start;

  width:28px;
  min-width:28px;
  color:black;
/*border: 1px solid red;*/
}
#all-attach-del-cross div {
  width:10px; height:10px;
  border-radius:12px;
  background: url(/panel_widget/img/cross10.png) 0px 0px no-repeat;
  cursor:pointer; 
}
#all-attach-del-cross div:hover {
/*  color:white;*/
  background-color:#ff4141;
  border: 3px solid #ff4141;
  background-position: -10px 0;
}

#tbAttFiles {
  width: 100%;
  border-spacing:0px; border-collapse:0px;
  border-bottom:1px solid #aaa;
}
#tbAttFiles tr td { vertical-align: top; padding-top:3px; padding-bottom:3px; padding-right:0; }
#tbAttFiles tr td:nth-child(1) { max-width: 186px; border:0px solid red;  overflow: hidden; text-overflow: ellipsis;  white-space: nowrap; /* чтобы многоточие ставилось */  }
#tbAttFiles tr td:nth-child(2) { min-width: 54px; border:0px solid red; max-width:54px; text-align: right; }

#bottom-info {
/*  display:inline-block;*/
  margin-left:2px;
  flex-grow:2;
  font-size:12px;
/*  max-width:140px;*/
/*  height:100%;*/
/*  text-align:right;*/

  /*text-align:right;*/

  display: flex;
  align-items: flex-end;
  justify-content: end;
  text-align:right;
  padding:0;
  line-height:110%;
/*  max-width:200px;*/
/*  color: #0d6dc7;*/
/*border:1px solid red;*/
}

/* .SendColor { color: #0d6dc7; } */
.ErrorColor { color: red; }

.ligthword {
   background-color:yellow;
   color:black;
}

/* Стили для форм */

.form-caption {
  font-family: sans-serif, Arial, Verdana, Tahoma;
  font-size:18px;
  font-weight:bold;
  margin-top:4px;
  margin-bottom:12px;
  line-height:120%;
  color:#527c9e; /* #483D8B; */
}
.form-text {
  margin-top:8px;
  line-height:120%;
}

.form-field-caption {
  margin-top: 10px;
  font-family: Arial, Verdana, Tahoma;
  font-size:16px;
  width:fit-content;
/*border:1px solid red;*/
}
.form-field-wr { /* Обертка над полями ввода */
  box-sizing: border-box; /* <input>, с width:100% выходит за пределы родительского эл-та (применить box-sizing попробовать к input, а если не поможет, то к к div, внутри которого input) */
  padding-top: 4px;
  font-family: Arial, Verdana, Tahoma;
  font-size:16px;
  width:100%;
/*border:1px solid red;*/
}
.winput.winput.winput {
  padding:6px 6px 6px 6px;
}
.form-button, .form-button:disabled {
  margin-top:18px;
  font: inherit;
  outline: none;
  border:1px solid #ccc;
  padding: 8px 15px 8px 15px;
  border-radius: 8px;
  background-color:var(--btnDialogBackColor);
  color: var(--btnDialogForeColor);
  text-align:center;

  display: flex; align-items: center;  /* верт.выравн-е текста внутри кнопки */

  user-select: none;
}
.form-field-err-label {
  display:none;
  font-family: Arial, Verdana, Tahoma;
  font-size:12px;
/*  float:right;*/
  color:red;
  max-width: 250px;
  overflow: hidden; text-overflow: ellipsis;  white-space: nowrap; /* троеточие */
/*border:1px solid red;*/
}
.form-button:hover {
  background-color:var(--btnDialogHoverBackColor);
  cursor:pointer;  
}
.form-button:disabled {
/*  background-color: #aaaaaa !important;*/
  background-color:var(--btnDialogBackColor);
  color: var(--btnDialogForeColorDisabled);

  cursor:default;
  opacity:0.8;
}

.form-button:not(:last-child) {
  margin-right:12px;
}
.form-progress {
  display:none;
  float:right;
  width:32px; height:32px;
  background: url(/img/progress_rolling54.gif) 0 0 no-repeat;
  background-size: cover;
/*border:1px solid red;*/
}
.form-sent-label {
  visibility: hidden; /* вместо display:none, иначе анимация не будет работать */
  opacity:0;
  float:right;
  text-align:right;
  max-width:110px;
  margin-top:0px;
/*  opacity:1;*/
  color:#fff;
  background-color:#73a42f;
  font-size:70%;
  border-radius:6px;
  padding:4px 8px;
  transition: all .7s ease;
/*border:1px solid red;*/
}


/* Media Queries - перекрываем некот.верхние стили, если ширина экрана мала */
@media all and (max-width : 560px)   /* Если это число меняем, то и на JS в обраб-ке windows.resize меняем!!! */
{
  #chat-messages { font-size:18px; }
}