/* Private inbox (inside the cabinet shell) and the "write to the seller" card on public pages. */
.dm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dm-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e5e7e3; border-radius: 14px; padding: 12px 14px; text-decoration: none; color: inherit; }
.dm-row:hover { background: #f6faf8; text-decoration: none; }
.dm-row.is-unread { border-color: #145447; background: #f1f8f4; }
.dm-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #dcebe5; color: #145447; font-weight: 800; }
.dm-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dm-peer { color: #153e35; }
.dm-snippet { color: #64706c; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; color: #64706c; }
.dm-badge { font-style: normal; background: #145447; color: #fff; border-radius: 999px; padding: 0 7px; font-weight: 700; }

.dm-back { font-size: 13px; color: #64706c; text-decoration: none; }
.dm-tools form { margin: 0; }
.dm-messages { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid #e5e7e3; border-radius: 16px; padding: 16px; min-height: 220px; margin-bottom: 12px; }
.dm-bubble { max-width: 78%; align-self: flex-start; background: #f3f1ea; border-radius: 14px 14px 14px 4px; padding: 8px 12px; }
.dm-bubble.is-mine { align-self: flex-end; background: #e4efe9; border-radius: 14px 14px 4px 14px; }
.dm-bubble p { margin: 0; word-break: break-word; }
.dm-time { display: block; margin-top: 2px; font-size: 11px; color: #64706c; text-align: right; }
.dm-form { display: flex; gap: 10px; align-items: flex-end; }
.dm-form textarea { flex: 1; border: 1px solid #d6dcd8; border-radius: 12px; padding: 10px 12px; font: inherit; resize: vertical; background: #fff; }
.dm-note, .dm-wait, .dm-empty { color: #64706c; font-size: 12.5px; margin: 8px 0 0; }
.dm-request { background: #fff6df; border: 1px solid #ecd9a8; color: #5c4a12; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.dm-request p { margin: 0 0 8px; }
.dm-request-actions { display: flex; gap: 8px; }
.dm-request-actions form { margin: 0; }

.msg-start .msg-hint { margin: 0 0 10px; color: #64748b; font-size: 13px; }
.msg-form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.msg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.msg-chip { border: 1px solid #cfd8d3; border-radius: 999px; background: #fff; padding: 5px 11px; font-size: 12.5px; font-weight: 600; color: #153e35; cursor: pointer; }
.msg-form textarea { box-sizing: border-box; width: 100%; border: 1px solid #d9d4c7; border-radius: 10px; padding: 8px 10px; font: inherit; background: #fff; }

@media (max-width: 640px) {
  .dm-bubble { max-width: 92%; }
  /* The messages page is the phone entry point of the header icon: keep it inside the screen. */
  .dm-page { min-width: 0; overflow-wrap: anywhere; }
  .dm-page .ms-head { margin-bottom: 14px; }
  .dm-page .ms-head h1 { font-size: 24px; }
  .dm-page .ms-tabs { margin-bottom: 14px; }
  .dm-row { gap: 10px; padding: 10px 12px; }
  .dm-peer { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dm-messages { padding: 12px; }
  .dm-form { flex-direction: column; align-items: stretch; }
}
