/* AddiPress Listings — messaging (contact form, inbox, conversation). */
:root { --m-primary: var(--apl-primary, #4f46e5); --m-line: var(--apl-line, #e2e8f0); --m-muted: var(--apl-muted, #64748b); --m-bg2: var(--apl-bg-2, #f8fafc); }

/* Contact form on single listing */
.apl-contact { margin: 28px 0; padding: 20px; border: 1px solid var(--m-line); border-radius: 14px; background: #fff; }
.apl-contact__title { margin: 0 0 12px; font-size: 18px; font-weight: 800; }
.apl-contact__form textarea, .apl-convo__reply textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--m-line); border-radius: 10px; font: inherit; resize: vertical; margin-bottom: 10px; }
.apl-contact__ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; }
.apl-contact__own { color: var(--m-muted); }

/* Inbox: thread list */
.apl-threads { display: grid; gap: 8px; }
.apl-thread { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--m-line); border-radius: 12px; background: #fff; color: inherit; align-items: center; }
.apl-thread:hover { background: var(--m-bg2); }
.apl-thread.is-unread { border-color: var(--m-primary); box-shadow: 0 0 0 1px var(--m-primary) inset; }
.apl-thread__avatar { border-radius: 999px; flex: 0 0 auto; }
.apl-thread__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.apl-thread__top { display: flex; justify-content: space-between; gap: 8px; }
.apl-thread__top time { font-size: 12px; color: var(--m-muted); }
.apl-thread__list { font-size: 12px; color: var(--m-primary); font-weight: 600; }
.apl-thread__snippet { font-size: 14px; color: var(--m-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Conversation */
.apl-convo__head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.apl-convo__meta { color: var(--m-muted); }
.apl-convo__stream { display: grid; gap: 10px; margin-bottom: 16px; }
.apl-msg { display: flex; flex-direction: column; max-width: 78%; }
.apl-msg--me { margin-left: auto; align-items: flex-end; }
.apl-msg--them { margin-right: auto; align-items: flex-start; }
.apl-msg__bubble { padding: 10px 14px; border-radius: 14px; font-size: 15px; line-height: 1.45; }
.apl-msg--me .apl-msg__bubble { background: var(--m-primary); color: #fff; border-bottom-right-radius: 4px; }
.apl-msg--them .apl-msg__bubble { background: var(--m-bg2); color: var(--apl-ink, #0f172a); border: 1px solid var(--m-line); border-bottom-left-radius: 4px; }
.apl-msg__time { font-size: 11px; color: var(--m-muted); margin-top: 3px; }
.apl-convo__reply { display: flex; gap: 10px; align-items: flex-end; }
.apl-convo__reply textarea { margin: 0; }
