/* MSG-1: личные сообщения — список диалогов, лента переписки, отправка.
   Подключается шаблонами smarty/templates/user/pm/*_v2.tpl */

.cb-pm { }

/* ---------------- вкладки папок ---------------- */
.pm-tabs { margin: 0 0 20px 0; }
.pm-tabs .pm-tab-active {
  background: #00aeef !important;
  color: #fff !important;
  border-color: #00aeef !important;
}
.pm-tabs .ro-button { text-decoration: none; }

/* ---------------- список диалогов ---------------- */
.pm-dialogs { border-top: 1px solid #ececec; }

.pm-dialog-item {
  display: block;
  position: relative;
  padding: 14px 16px 14px 92px;
  border-bottom: 1px solid #ececec;
  text-decoration: none;
  color: inherit;
  min-height: 60px;
}
.pm-dialog-item:hover { background: #f7fbfc; }
.pm-dialog-item.is-unread { background: #f2fbfd; }

.pm-dialog-avatar {
  position: absolute;
  left: 16px;
  top: 14px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  background: #ececec;
  display: block;
}
.pm-dialog-avatar img { width: 60px; height: 60px; display: block; object-fit: cover; }
.pm-dialog-avatar-empty:after {
  content: "";
  display: block;
  width: 60px; height: 60px;
  background: #e2e2e2;
}

.pm-dialog-top { margin-bottom: 4px; }
.pm-dialog-name {
  font-size: 15px;
  font-weight: bold;
  color: #000;
  margin-right: 8px;
}
.pm-dialog-date {
  float: right;
  font-size: 12px;
  color: #9d9d9d;
  line-height: 20px;
}
.pm-dialog-subject {
  font-size: 13px;
  color: #333;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-dialog-text {
  font-size: 12px;
  color: #8d8d8d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-dialog-out .pm-dialog-text:before { content: "Вы: "; color: #b5b5b5; }
.pm-dialog-badge {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  margin-left: 6px;
  border-radius: 10px;
  background: #fe00c3;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  text-align: center;
  vertical-align: middle;
}
.pm-dialog-cnt { font-size: 11px; color: #b5b5b5; margin-left: 6px; }

/* ---------------- лента диалога ---------------- */
.pm-dialog-head { margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid #ececec; }
.pm-dialog-head-avatar {
  display: inline-block;
  width: 48px; height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: #ececec;
  vertical-align: middle;
  margin-right: 12px;
}
.pm-dialog-head-avatar img { width: 48px; height: 48px; display: block; object-fit: cover; }
.pm-dialog-head-name { font-size: 20px; font-weight: bold; vertical-align: middle; }
.pm-dialog-head-actions { float: right; line-height: 48px; }

.pm-feed { margin-bottom: 22px; }
.pm-msg { margin-bottom: 16px; overflow: hidden; }
.pm-msg-inner {
  position: relative;
  max-width: 720px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #f1f1f1;
  font-size: 14px;
  line-height: 20px;
  color: #232323;
  word-wrap: break-word;
}
.pm-msg-out { text-align: right; }
.pm-msg-out .pm-msg-inner {
  display: inline-block;
  text-align: left;
  background: #e3f7fb;
}
.pm-msg-in .pm-msg-inner { display: inline-block; }
.pm-msg-meta {
  font-size: 11px;
  color: #9d9d9d;
  margin-bottom: 6px;
}
.pm-msg-subject { font-weight: bold; color: #232323; margin-bottom: 4px; font-size: 13px; }
.pm-msg-text { white-space: pre-wrap; }
.pm-msg-out .pm-msg-meta { text-align: right; }

/* ---------------- форма отправки ---------------- */
.pm-reply { border-top: 1px solid #ececec; padding-top: 18px; }
.pm-reply textarea {
  width: 100%;
  min-height: 110px;
  padding: 10px;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  box-sizing: border-box;
  resize: vertical;
}
.pm-reply input.pm-subject {
  width: 100%;
  padding: 9px 10px;
  margin-bottom: 10px;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  box-sizing: border-box;
}
.pm-reply-actions { margin-top: 12px; }
.pm-reply-status { font-size: 13px; margin-left: 12px; color: #8d8d8d; }
.pm-reply-status.ok { color: #34cb00; }
.pm-reply-status.err { color: #d0021b; }

/* ---------------- форма нового письма ---------------- */
.pm-compose-row { margin-bottom: 14px; }
.pm-compose-row label { display: block; font-size: 13px; color: #6d6d6d; margin-bottom: 6px; }
.pm-compose-row input.pm-input {
  width: 460px;
  padding: 9px 10px;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
}
.pm-compose-ac {
  position: absolute;
  z-index: 40;
  background: #fff;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  min-width: 340px;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  display: none;
}
.pm-compose-ac div { padding: 8px 12px; font-size: 13px; cursor: pointer; }
.pm-compose-ac div:hover { background: #e3f7fb; }
.pm-compose-ac .pm-ac-empty { color: #9d9d9d; cursor: default; }

/* ---------------- служебное ---------------- */
.pm-empty { padding: 42px 0; text-align: center; color: #8d8d8d; font-size: 15px; }
.pm-count { font-size: 13px; color: #9d9d9d; margin-left: 8px; }
.pm-flat { border-top: 1px solid #ececec; }
.pm-flat-item { padding: 13px 4px; border-bottom: 1px solid #ececec; overflow: hidden; }
.pm-flat-item .pm-flat-peer { font-weight: bold; color: #000; }
.pm-flat-item .pm-flat-date { float: right; font-size: 12px; color: #9d9d9d; }
.pm-flat-item .pm-flat-subject { font-size: 13px; color: #333; margin: 4px 0; }
.pm-flat-item .pm-flat-text { font-size: 12px; color: #8d8d8d; }
.pm-flat-item.is-unread .pm-flat-subject { color: #000; }
.pm-flat-unread { display: inline-block; padding: 1px 6px; margin-left: 6px; border-radius: 10px;
  background: #fe00c3; color: #fff; font-size: 11px; font-weight: bold; }
