/* dialogs.css  v1.1 – базовые стили (при желании доработайте) */

.sud-dialog-list      { list-style:none; padding:0; margin:0 }
.sud-dialog-list li   { margin:4px 0 }

.sud-badge,
.sud-dialog-notify    { background:#d40000; color:#fff; padding:2px 6px; border-radius:12px; font-size:12px; display:inline-block }

.sud-dialog-notify    { display:none } /* глобальный счётчик в меню скрыт, пока 0 */

.sud-thread           { border:1px solid #ddd; padding:8px; margin-top:12px; border-radius:6px }
.sud-thread p         { margin:6px 0; max-width:80% }
.sud-thread .sent     { text-align:right; margin-left:auto }
.sud-thread .received { text-align:left;  margin-right:auto }

.sud-thread span      { display:inline-block; background:#f2f2f2; padding:6px 10px; border-radius:6px }
.sud-thread .sent span{ background:#c7e0ff }

.sud-thread em        { display:block; font-size:11px; color:#666; margin-top:2px }

.sud-compose          { margin-top:10px; display:flex; flex-direction:column; gap:6px }
.sud-compose textarea { width:100%; resize:vertical; padding:6px }
.sud-compose button   { align-self:flex-end; padding:6px 14px; background:#0057d8; color:#fff; border:none; border-radius:4px; cursor:pointer }
.sud-compose button:hover { background:#0042a8 }

/* — модалка — */
.sud-modal {
  position: fixed; top:0; left:0; width:100%; height:100%;
  background: rgba(0,0,0,0.5); display:flex;
  align-items:center; justify-content:center; z-index:1000;
}
.sud-modal-content {
  background:#fff; padding:20px; border-radius:6px;
  width:90%; max-width:400px; position:relative;
}
.sud-modal-close {
  position:absolute; top:8px; right:12px;
  font-size:20px; cursor:pointer;
}
#sud-modal-new {
  width:100%; height:100px; padding:8px; margin:10px 0;
}
#sud-modal-send {
  padding:8px 16px; background:#0057d8; color:#fff;
  border:none; border-radius:4px; cursor:pointer;
}
#sud-modal-send:hover { background:#0042a8; }

/* Модальное окно для popup_write_to */
.sud-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  display: flex;
}
.sud-modal {
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  max-width: 400px;
  width: 90%;
  position: relative;
}
.sud-modal-close {
  position: absolute;
  top: 8px; right: 8px;
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.sud-popup-button,
.sud-popup-send {
  padding: 6px 14px;
  background: #0057d8;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.sud-popup-button:hover,
.sud-popup-send:hover {
  background: #0042a8;
}
.sud-modal textarea {
  width: 100%;
  resize: vertical;
  padding: 6px;
  margin-top: 10px;
}